Skip to content

Commit 608ba31

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

File tree

1 file changed

+32
-82
lines changed

1 file changed

+32
-82
lines changed

elastic-agent.yml

+32-82
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
@@ -205,26 +156,26 @@ inputs:
205156
# Send all logging output to stderr. The default is false.
206157
agent.logging.to_stderr: true
207158

208-
# Send all logging output to syslog. The default is false.
209-
#agent.logging.to_syslog: false
159+
# Send all logging output to syslog. The default is false.
160+
#agent.logging.to_syslog: false
210161

211-
# Send all logging output to Windows Event Logs. The default is false.
212-
#agent.logging.to_eventlog: false
162+
# Send all logging output to Windows Event Logs. The default is false.
163+
#agent.logging.to_eventlog: false
213164

214-
# If enabled, Elastic-Agent periodically logs its internal metrics that have changed
215-
# in the last period. For each metric that changed, the delta from the value at
216-
# the beginning of the period is logged. Also, the total values for
217-
# all non-zero internal metrics are logged on shutdown. This setting is also passed
218-
# to beats running under the agent. The default is true.
219-
#agent.logging.metrics.enabled: true
165+
# If enabled, Elastic-Agent periodically logs its internal metrics that have changed
166+
# in the last period. For each metric that changed, the delta from the value at
167+
# the beginning of the period is logged. Also, the total values for
168+
# all non-zero internal metrics are logged on shutdown. This setting is also passed
169+
# to beats running under the agent. The default is true.
170+
#agent.logging.metrics.enabled: true
220171

221-
# The period after which to log the internal metrics. The default is 30s.
222-
#agent.logging.metrics.period: 30s
172+
# The period after which to log the internal metrics. The default is 30s.
173+
#agent.logging.metrics.period: 30s
223174

224-
# Logging to rotating files. Set logging.to_files to false to disable logging to
225-
# files.
226-
#agent.logging.to_files: true
227-
#agent.logging.files:
175+
# Logging to rotating files. Set logging.to_files to false to disable logging to
176+
# files.
177+
#agent.logging.to_files: true
178+
#agent.logging.files:
228179
# Configure the path where the logs are written. The default is the logs directory
229180
# under the home path (the binary location).
230181
#path: /var/log/elastic-agent
@@ -252,7 +203,7 @@ agent.logging.to_stderr: true
252203

253204
# Rotate existing logs on startup rather than appending to the existing
254205
# file. Defaults to true.
255-
# rotateonstartup: 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)