Skip to content

Commit 700ba9a

Browse files
committed
fix config file
Signed-off-by: ChrsMark <[email protected]>
1 parent 3761e5b commit 700ba9a

File tree

1 file changed

+37
-87
lines changed

1 file changed

+37
-87
lines changed

elastic-agent.yml

+37-87
Original file line numberDiff line numberDiff line change
@@ -15,72 +15,23 @@ outputs:
1515
# username: "elastic"
1616
# password: "changeme"
1717

18-
providers:
19-
local_dynamic:
20-
items:
21-
- vars:
22-
key: value1
23-
proc:
24-
- add_fields:
25-
fields:
26-
custom: match424242
27-
target: dynamic
28-
- add_fields:
29-
fields:
30-
hints: true
31-
target: kubernetes
32-
3318
inputs:
34-
- type: logfile
35-
enabled: true
36-
streams:
37-
- paths:
38-
- /var/log/${local_dynamic.key}
39-
processors:
40-
${local_dynamic.proc}
41-
# processors:
42-
# - ${local_dynamic.proc|'~'}
43-
19+
- type: system/metrics
4420

45-
#providers:
46-
# kubernetes:
47-
# kube_config: /Users/chrismark/.kube/config
48-
# node: "kind-control-plane"
49-
# hints.enabled: true
50-
#
51-
#inputs:
52-
# - name: templates.d/redis/0.3.6
53-
# type: redis/metrics
54-
# data_stream.namespace: default
55-
# use_output: default
56-
# streams:
57-
# - data_stream:
58-
# dataset: redis.info
59-
# type: metrics
60-
# metricsets:
61-
# - info
62-
# hosts:
63-
# - "${kubernetes.hints.redis.info.host|kubernetes.hints.redis.host|'127.0.0.1:6379'}"
64-
# idle_timeout: 20s
65-
# maxconn: 10
66-
# network: tcp
67-
# period: "${kubernetes.hints.redis.info.period|kubernetes.hints.redis.period|'10s'}"
68-
# condition: ${kubernetes.hints.redis.info.enabled} == true or ${kubernetes.hints.redis.enabled} == true
69-
# - data_stream:
70-
# dataset: redis.key
71-
# type: metrics
72-
# metricsets:
73-
# - key
74-
# hosts:
75-
# - "${kubernetes.hints.redis.key.host|kubernetes.hints.redis.host|'127.0.0.1'}:${kubernetes.hints.redis.info.port|'6379'}"
76-
# idle_timeout: 20s
77-
# key.patterns:
78-
# - limit: 20
79-
# pattern: '*'
80-
# maxconn: 10
81-
# network: tcp
82-
# period: "${kubernetes.hints.redis.key.period|kubernetes.hints.redis.period|'10s'}"
83-
# condition: ${kubernetes.hints.redis.key.enabled} == true and ${kubernetes.hints.redis.enabled} == true
21+
# Namespace name must conform to the naming conventions for Elasticsearch indices, cannot contain dashes (-), and cannot exceed 100 bytes
22+
# For index naming restrictions, see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html#indices-create-api-path-params
23+
data_stream.namespace: default
24+
use_output: default
25+
streams:
26+
- metricset: cpu
27+
# Dataset name must conform to the naming conventions for Elasticsearch indices, cannot contain dashes (-), and cannot exceed 100 bytes
28+
data_stream.dataset: system.cpu
29+
- metricset: memory
30+
data_stream.dataset: system.memory
31+
- metricset: network
32+
data_stream.dataset: system.network
33+
- metricset: filesystem
34+
data_stream.dataset: system.filesystem
8435

8536
# agent.monitoring:
8637
# # enabled turns on monitoring of running processes
@@ -225,34 +176,34 @@ agent.logging.to_stderr: true
225176
# files.
226177
#agent.logging.to_files: true
227178
#agent.logging.files:
228-
# Configure the path where the logs are written. The default is the logs directory
229-
# under the home path (the binary location).
230-
#path: /var/log/elastic-agent
179+
# Configure the path where the logs are written. The default is the logs directory
180+
# under the home path (the binary location).
181+
#path: /var/log/elastic-agent
231182

232-
# The name of the files where the logs are written to.
233-
#name: elastic-agent
183+
# The name of the files where the logs are written to.
184+
#name: elastic-agent
234185

235-
# Configure log file size limit. If limit is reached, log file will be
236-
# automatically rotated
237-
#rotateeverybytes: 10485760 # = 10MB
186+
# Configure log file size limit. If limit is reached, log file will be
187+
# automatically rotated
188+
#rotateeverybytes: 10485760 # = 10MB
238189

239-
# Number of rotated log files to keep. Oldest files will be deleted first.
240-
#keepfiles: 7
190+
# Number of rotated log files to keep. Oldest files will be deleted first.
191+
#keepfiles: 7
241192

242-
# The permissions mask to apply when rotating log files. The default value is 0600.
243-
# Must be a valid Unix-style file permissions mask expressed in octal notation.
244-
#permissions: 0600
193+
# The permissions mask to apply when rotating log files. The default value is 0600.
194+
# Must be a valid Unix-style file permissions mask expressed in octal notation.
195+
#permissions: 0600
245196

246-
# Enable log file rotation on time intervals in addition to size-based rotation.
247-
# Intervals must be at least 1s. Values of 1m, 1h, 24h, 7*24h, 30*24h, and 365*24h
248-
# are boundary-aligned with minutes, hours, days, weeks, months, and years as
249-
# reported by the local system clock. All other intervals are calculated from the
250-
# Unix epoch. Defaults to disabled.
251-
#interval: 0
197+
# Enable log file rotation on time intervals in addition to size-based rotation.
198+
# Intervals must be at least 1s. Values of 1m, 1h, 24h, 7*24h, 30*24h, and 365*24h
199+
# are boundary-aligned with minutes, hours, days, weeks, months, and years as
200+
# reported by the local system clock. All other intervals are calculated from the
201+
# Unix epoch. Defaults to disabled.
202+
#interval: 0
252203

253-
# Rotate existing logs on startup rather than appending to the existing
254-
# file. Defaults to true.
255-
# rotateonstartup: true
204+
# Rotate existing logs on startup rather than appending to the existing
205+
# file. Defaults to true.
206+
# rotateonstartup: true
256207

257208
# Set to true to log messages in JSON format.
258209
#agent.logging.json: false
@@ -300,4 +251,3 @@ agent.logging.to_stderr: true
300251
# - vars:
301252
# my_var: key3
302253

303-

0 commit comments

Comments
 (0)