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 700ba9a
Showing 1 changed file with 37 additions and 87 deletions.
124 changes: 37 additions & 87 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 @@ -225,34 +176,34 @@ agent.logging.to_stderr: true
# 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
# 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

# The name of the files where the logs are written to.
#name: elastic-agent
# The name of the files where the logs are written to.
#name: elastic-agent

# Configure log file size limit. If limit is reached, log file will be
# automatically rotated
#rotateeverybytes: 10485760 # = 10MB
# Configure log file size limit. If limit is reached, log file will be
# automatically rotated
#rotateeverybytes: 10485760 # = 10MB

# Number of rotated log files to keep. Oldest files will be deleted first.
#keepfiles: 7
# Number of rotated log files to keep. Oldest files will be deleted first.
#keepfiles: 7

# The permissions mask to apply when rotating log files. The default value is 0600.
# Must be a valid Unix-style file permissions mask expressed in octal notation.
#permissions: 0600
# The permissions mask to apply when rotating log files. The default value is 0600.
# Must be a valid Unix-style file permissions mask expressed in octal notation.
#permissions: 0600

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

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

Please sign in to comment.