[global_tags] # Telegraf has a few options you can configure under the [agent] section of the config. [agent] # Default data collection interval for all inputs interval = "10s" # Rounds collection interval to interval. # For example, if interval is set to 10s then always collect on :00, :10, :20, etc. round_interval = true # Telegraf will send metrics to output in batch of at most metric_batch_size metrics. metric_batch_size = 1000 # Telegraf will cache metric_buffer_limit metrics for each output, and will flush this buffer on a successful write. # This should be a multiple of metric_batch_size and could not be less than 2 times metric_batch_size. metric_buffer_limit = 10000 # Collection jitter is used to jitter the collection by a random amount. # Each plugin will sleep for a random time within jitter before collecting. This can be used to avoid many plugins # querying things like sysfs at the same time, which can have a measurable effect on the system. collection_jitter = "0s" # Default data flushing interval for all outputs. # You should not set this below interval. Maximum flush_interval will be flush_interval + flush_jitter flush_interval = "10s" # Jitter the flush interval by a random amount. This is primarily to avoid large write spikes for users running a large number of Telegraf instances. # For example, a flush_jitter of 5s and flush_interval of 10s means flushes will happen every 10-15s. flush_jitter = "0s" # By default, precision will be set to the same timestamp order as the collection interval, with the maximum being 1s. # Precision will NOT be used for service inputs, such as logparser and statsd. Valid values are ns, us (or µs), ms, and s. precision = "" # Override default hostname, if empty use os.Hostname(). hostname = "" # If true, do no set the host tag in the Telegraf agent omit_hostname = false # Configuration for sending metrics to InfluxDB [[outputs.influxdb]] ## The full HTTP or UDP URL for your InfluxDB instance. ## ## Multiple URLs can be specified for a single cluster, only ONE of the ## urls will be written to each interval. urls = ["http://influxdb-service:8086"] ## The target database for metrics; will be created as needed. ## For UDP url endpoint database needs to be configured on server side. database = "telegraf" ## HTTP Basic Auth username = "mdenys" password = "mdenys" [[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 ## If true, compute and report the sum of all non-idle CPU states. report_active = false [[inputs.disk]] ## By default stats will be gathered for all mount points. ## Set mount_points will restrict the stats to only the specified mount points. # mount_points = ["/"] ## Ignore mount points by filesystem type. ignore_fs = ["tmpfs", "devtmpfs", "devfs", "iso9660", "overlay", "aufs", "squashfs"] # REF: https://github.com/influxdata/telegraf/tree/master/plugins/inputs/docker # Read metrics about docker containers [[inputs.docker]] ## Docker Endpoint ## To use TCP, set endpoint = "tcp://[ip]:[port]" ## To use environment variables (ie, docker-machine), set endpoint = "ENV" endpoint = "unix:///var/run/docker.sock" ## Set to true to collect Swarm metrics(desired_replicas, running_replicas) ## Note: configure this in one of the manager nodes in a Swarm cluster. ## configuring in multiple Swarm managers results in duplication of metrics. gather_services = false ## Only collect metrics for these containers. Values will be appended to ## container_name_include. ## Deprecated (1.4.0), use container_name_include container_names = [] ## Set the source tag for the metrics to the container ID hostname, eg first 12 chars source_tag = false ## Containers to include and exclude. Collect all if empty. Globs accepted. container_name_include = [] container_name_exclude = [] ## Timeout for docker list, info, and stats commands timeout = "5s" ## Whether to report for each container per-device blkio (8:0, 8:1...) and ## network (eth0, eth1, ...) stats or not perdevice = true ## Whether to report for each container total blkio and network stats or not total = false ## docker labels to include and exclude as tags. Globs accepted. ## Note that an empty array for both will include all labels as tags docker_label_include = [] docker_label_exclude = ["annotation.kubernetes*"] ## Which environment variables should we use as a tag tag_env = ["JAVA_HOME", "HEAP_SIZE"] ## Optional TLS Config # tls_ca = "/etc/telegraf/ca.pem" # tls_cert = "/etc/telegraf/cert.pem" # tls_key = "/etc/telegraf/key.pem" ## Use TLS but skip chain & host verification # insecure_skip_verify = false