153 lines
4.7 KiB
Plaintext
153 lines
4.7 KiB
Plaintext
# Configuration for telegraf agent
|
|
[agent]
|
|
interval = "10s"
|
|
round_interval = true
|
|
metric_batch_size = 1000
|
|
metric_buffer_limit = 10000
|
|
|
|
collection_jitter = "3s"
|
|
flush_interval = "10s"
|
|
flush_jitter = "5s"
|
|
|
|
debug = false
|
|
quiet = false
|
|
logfile = "/var/log/telegraf/telegraf.log"
|
|
logfile_rotation_interval = "0d"
|
|
logfile_rotation_max_size = "1MB"
|
|
logfile_rotation_max_archives = 5
|
|
|
|
hostname = ""
|
|
|
|
###############################################################################
|
|
# OUTPUT PLUGINS #
|
|
###############################################################################
|
|
|
|
# Configuration for sending metrics to InfluxDB
|
|
[[outputs.influxdb]]
|
|
urls = ["http://influxdb:8086"] # required
|
|
database = "telegraf" # required
|
|
username = "telegraf"
|
|
password = "minitrue"
|
|
## If true, the database tag will not be added to the metric.
|
|
exclude_database_tag = false
|
|
retention_policy = ""
|
|
write_consistency = "any"
|
|
timeout = "5s"
|
|
## If true, no CREATE DATABASE queries will be sent. Set to true when using
|
|
## Telegraf with a user without permissions to create databases or when the
|
|
## database already exists.
|
|
skip_database_creation = false
|
|
|
|
###############################################################################
|
|
# INPUT PLUGINS #
|
|
###############################################################################
|
|
|
|
# Read metrics about cpu usage
|
|
[[inputs.cpu]]
|
|
## Whether to report per-cpu stats or not
|
|
percpu = true
|
|
## Whether to report total system cpu stats or not
|
|
totalcpu = true
|
|
## If true, collect raw CPU time metrics.
|
|
collect_cpu_time = false
|
|
report_active = false
|
|
|
|
# Read metrics about disk usage by mount point
|
|
[[inputs.disk]]
|
|
## Ignore some mountpoints by filesystem type. For example (dev)tmpfs (usually
|
|
## present on /run, /var/run, /dev/shm or /dev).
|
|
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"]
|
|
|
|
# Read metrics about disk IO by device
|
|
[[inputs.diskio]]
|
|
## Setting devices will restrict the stats to the specified devices.
|
|
# devices = ["sda", "sdb"]
|
|
|
|
# Get kernel statistics from /proc/stat
|
|
[[inputs.kernel]]
|
|
# no configuration
|
|
|
|
# Read metrics about memory usage
|
|
[[inputs.mem]]
|
|
# no configuration
|
|
|
|
# Get the number of processes and group them by status
|
|
[[inputs.processes]]
|
|
# no configuration
|
|
|
|
# Read metrics about swap memory usage
|
|
[[inputs.swap]]
|
|
# no configuration
|
|
|
|
# Read metrics about system load & uptime
|
|
[[inputs.system]]
|
|
## Uncomment to remove deprecated metrics.
|
|
# fielddrop = ["uptime_format"]
|
|
|
|
[[inputs.internal]]
|
|
collect_memstats = true
|
|
|
|
# # Read metrics about network interface usage
|
|
[[inputs.net]]
|
|
interfaces = ["eth*"]
|
|
|
|
# # Read metrics about docker containers
|
|
[[inputs.docker]]
|
|
endpoint = "unix:///var/run/docker.sock"
|
|
timeout = "5s"
|
|
|
|
# Statsd Server
|
|
[[inputs.statsd]]
|
|
## Address and port to host UDP listener on
|
|
service_address = ":8125"
|
|
|
|
## Percentiles to calculate for timing & histogram stats.
|
|
percentiles = [50.0, 75.0, 99.0, 99.9]
|
|
|
|
## Delete gauges every interval (default=false)
|
|
delete_gauges = true
|
|
## Delete counters every interval (default=false)
|
|
delete_counters = true
|
|
|
|
## separator to use between elements of a statsd metric
|
|
metric_separator = "_"
|
|
|
|
## convert measurement names, “.” to “_” and “-” to “__”
|
|
convert_names = false
|
|
|
|
## used to parse StatD variable name correctly for InfluxDB
|
|
## it enables to have counters/gauges grouped by measurement
|
|
templates = [
|
|
"* measurement.field"
|
|
]
|
|
|
|
## Parses extensions to statsd in the datadog statsd format
|
|
## currently supports metrics and datadog tags.
|
|
## http://docs.datadoghq.com/guides/dogstatsd/
|
|
datadog_extensions = true
|
|
|
|
## Number of UDP messages allowed to queue up, once filled,
|
|
## the statsd server will start dropping packets
|
|
allowed_pending_messages = 10000
|
|
|
|
## Number of timing/histogram values to track per-measurement in the
|
|
## calculation of percentiles. Raising this limit increases the accuracy
|
|
## of percentiles but also increases the memory usage and cpu time.
|
|
percentile_limit = 1000
|
|
|
|
|
|
# [[inputs.docker_log]]
|
|
# ## To use TCP, set endpoint = "tcp://[ip]:[port]"
|
|
# ## To use environment variables (ie, docker-machine), set endpoint = "ENV"
|
|
# endpoint = "unix:///var/run/docker.sock"
|
|
|
|
# ## When true, container logs are read from the beginning; otherwise
|
|
# ## reading begins at the end of the log.
|
|
# # from_beginning = false
|
|
|
|
# ## docker labels to include. Globs accepted.
|
|
# ## Note that an empty array for both will include all labels as tags
|
|
# docker_label_include = ["logcapture"]
|
|
|
|
# ## Set the source tag for the metrics to the container ID hostname, eg first 12 chars
|
|
# source_tag = true |