Skip to content

Commit

Permalink
fix config file
Browse files Browse the repository at this point in the history
Signed-off-by: ChrsMark <[email protected]>
  • Loading branch information
ChrsMark committed Sep 1, 2022
1 parent 3761e5b commit 608ba31
Showing 1 changed file with 32 additions and 82 deletions.
114 changes: 32 additions & 82 deletions elastic-agent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,72 +15,23 @@ outputs:
# username: "elastic"
# password: "changeme"

providers:
local_dynamic:
items:
- vars:
key: value1
proc:
- add_fields:
fields:
custom: match424242
target: dynamic
- add_fields:
fields:
hints: true
target: kubernetes

inputs:
- type: logfile
enabled: true
streams:
- paths:
- /var/log/${local_dynamic.key}
processors:
${local_dynamic.proc}
# processors:
# - ${local_dynamic.proc|'~'}

- type: system/metrics

#providers:
# kubernetes:
# kube_config: /Users/chrismark/.kube/config
# node: "kind-control-plane"
# hints.enabled: true
#
#inputs:
# - name: templates.d/redis/0.3.6
# type: redis/metrics
# data_stream.namespace: default
# use_output: default
# streams:
# - data_stream:
# dataset: redis.info
# type: metrics
# metricsets:
# - info
# hosts:
# - "${kubernetes.hints.redis.info.host|kubernetes.hints.redis.host|'127.0.0.1:6379'}"
# idle_timeout: 20s
# maxconn: 10
# network: tcp
# period: "${kubernetes.hints.redis.info.period|kubernetes.hints.redis.period|'10s'}"
# condition: ${kubernetes.hints.redis.info.enabled} == true or ${kubernetes.hints.redis.enabled} == true
# - data_stream:
# dataset: redis.key
# type: metrics
# metricsets:
# - key
# hosts:
# - "${kubernetes.hints.redis.key.host|kubernetes.hints.redis.host|'127.0.0.1'}:${kubernetes.hints.redis.info.port|'6379'}"
# idle_timeout: 20s
# key.patterns:
# - limit: 20
# pattern: '*'
# maxconn: 10
# network: tcp
# period: "${kubernetes.hints.redis.key.period|kubernetes.hints.redis.period|'10s'}"
# condition: ${kubernetes.hints.redis.key.enabled} == true and ${kubernetes.hints.redis.enabled} == true
# Namespace name must conform to the naming conventions for Elasticsearch indices, cannot contain dashes (-), and cannot exceed 100 bytes
# For index naming restrictions, see https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html#indices-create-api-path-params
data_stream.namespace: default
use_output: default
streams:
- metricset: cpu
# Dataset name must conform to the naming conventions for Elasticsearch indices, cannot contain dashes (-), and cannot exceed 100 bytes
data_stream.dataset: system.cpu
- metricset: memory
data_stream.dataset: system.memory
- metricset: network
data_stream.dataset: system.network
- metricset: filesystem
data_stream.dataset: system.filesystem

# agent.monitoring:
# # enabled turns on monitoring of running processes
Expand Down Expand Up @@ -205,26 +156,26 @@ inputs:
# Send all logging output to stderr. The default is false.
agent.logging.to_stderr: true

# Send all logging output to syslog. The default is false.
#agent.logging.to_syslog: false
# Send all logging output to syslog. The default is false.
#agent.logging.to_syslog: false

# Send all logging output to Windows Event Logs. The default is false.
#agent.logging.to_eventlog: false
# Send all logging output to Windows Event Logs. The default is false.
#agent.logging.to_eventlog: false

# If enabled, Elastic-Agent periodically logs its internal metrics that have changed
# in the last period. For each metric that changed, the delta from the value at
# the beginning of the period is logged. Also, the total values for
# all non-zero internal metrics are logged on shutdown. This setting is also passed
# to beats running under the agent. The default is true.
#agent.logging.metrics.enabled: true
# If enabled, Elastic-Agent periodically logs its internal metrics that have changed
# in the last period. For each metric that changed, the delta from the value at
# the beginning of the period is logged. Also, the total values for
# all non-zero internal metrics are logged on shutdown. This setting is also passed
# to beats running under the agent. The default is true.
#agent.logging.metrics.enabled: true

# The period after which to log the internal metrics. The default is 30s.
#agent.logging.metrics.period: 30s
# The period after which to log the internal metrics. The default is 30s.
#agent.logging.metrics.period: 30s

# Logging to rotating files. Set logging.to_files to false to disable logging to
# files.
#agent.logging.to_files: true
#agent.logging.files:
# Logging to rotating files. Set logging.to_files to false to disable logging to
# files.
#agent.logging.to_files: true
#agent.logging.files:
# Configure the path where the logs are written. The default is the logs directory
# under the home path (the binary location).
#path: /var/log/elastic-agent
Expand Down Expand Up @@ -252,7 +203,7 @@ agent.logging.to_stderr: true

# Rotate existing logs on startup rather than appending to the existing
# file. Defaults to true.
# rotateonstartup: true
# rotateonstartup: true

# Set to true to log messages in JSON format.
#agent.logging.json: false
Expand Down Expand Up @@ -300,4 +251,3 @@ agent.logging.to_stderr: true
# - vars:
# my_var: key3


0 comments on commit 608ba31

Please sign in to comment.