2015-08-11 15:50:36 +00:00
|
|
|
# Telegraf configuration
|
|
|
|
|
|
|
|
# Telegraf is entirely plugin driven. All metrics are gathered from the
|
2016-01-07 20:39:43 +00:00
|
|
|
# declared inputs.
|
2015-08-11 15:50:36 +00:00
|
|
|
|
|
|
|
# Even if a plugin has no configuration, it must be declared in here
|
|
|
|
# to be active. Declaring a plugin means just specifying the name
|
|
|
|
# as a section with no variables. To deactivate a plugin, comment
|
|
|
|
# out the name and any variables.
|
|
|
|
|
|
|
|
# Use 'telegraf -config telegraf.toml -test' to see what metrics a config
|
|
|
|
# file would generate.
|
|
|
|
|
|
|
|
# One rule that plugins conform to is wherever a connection string
|
|
|
|
# can be passed, the values '' and 'localhost' are treated specially.
|
|
|
|
# They indicate to the plugin to use their own builtin configuration to
|
|
|
|
# connect to the local system.
|
|
|
|
|
|
|
|
# NOTE: The configuration has a few required parameters. They are marked
|
|
|
|
# with 'required'. Be sure to edit those to make this configuration work.
|
|
|
|
|
2015-09-22 01:38:57 +00:00
|
|
|
# Tags can also be specified via a normal map, but only one form at a time:
|
2016-02-08 22:56:43 +00:00
|
|
|
[global_tags]
|
2016-01-07 17:52:46 +00:00
|
|
|
dc = "us-east-1"
|
2015-09-22 01:38:57 +00:00
|
|
|
|
|
|
|
# Configuration for telegraf agent
|
|
|
|
[agent]
|
2015-11-16 20:12:45 +00:00
|
|
|
# Default data collection interval for all plugins
|
|
|
|
interval = "10s"
|
2015-09-22 01:38:57 +00:00
|
|
|
|
2015-11-16 20:12:45 +00:00
|
|
|
# run telegraf in debug mode
|
|
|
|
debug = false
|
2015-09-22 01:38:57 +00:00
|
|
|
|
2015-11-16 20:12:45 +00:00
|
|
|
# Override default hostname, if empty use os.Hostname()
|
|
|
|
hostname = ""
|
2015-09-22 01:38:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# OUTPUTS #
|
|
|
|
###############################################################################
|
|
|
|
|
|
|
|
# Configuration for influxdb server to send metrics to
|
2015-11-16 17:43:03 +00:00
|
|
|
[[outputs.influxdb]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# The full HTTP endpoint URL for your InfluxDB instance
|
|
|
|
# Multiple urls can be specified for InfluxDB cluster support. Server to
|
|
|
|
# write to will be randomly chosen each interval.
|
|
|
|
urls = ["http://localhost:8086"] # required.
|
2015-08-11 15:50:36 +00:00
|
|
|
|
2015-11-16 20:12:45 +00:00
|
|
|
# The target database for metrics. This database must already exist
|
|
|
|
database = "telegraf" # required.
|
2015-08-11 15:50:36 +00:00
|
|
|
|
2015-11-16 17:43:03 +00:00
|
|
|
[[outputs.influxdb]]
|
|
|
|
urls = ["udp://localhost:8089"]
|
|
|
|
database = "udp-telegraf"
|
|
|
|
|
2015-09-22 01:38:57 +00:00
|
|
|
# Configuration for the Kafka server to send metrics to
|
2015-11-16 17:43:03 +00:00
|
|
|
[[outputs.kafka]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# URLs of kafka brokers
|
|
|
|
brokers = ["localhost:9092"]
|
|
|
|
# Kafka topic for producer messages
|
|
|
|
topic = "telegraf"
|
|
|
|
# Telegraf tag to use as a routing key
|
|
|
|
# ie, if this tag exists, it's value will be used as the routing key
|
|
|
|
routing_tag = "host"
|
2015-08-11 15:50:36 +00:00
|
|
|
|
|
|
|
|
2015-09-22 01:38:57 +00:00
|
|
|
###############################################################################
|
|
|
|
# PLUGINS #
|
|
|
|
###############################################################################
|
2015-08-11 15:50:36 +00:00
|
|
|
|
2015-09-22 01:38:57 +00:00
|
|
|
# Read Apache status information (mod_status)
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.apache]]
|
2016-01-07 17:52:46 +00:00
|
|
|
# An array of Apache status URI to gather stats.
|
|
|
|
urls = ["http://localhost/server-status?auto"]
|
2015-08-11 15:50:36 +00:00
|
|
|
|
|
|
|
# Read metrics about cpu usage
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.cpu]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# Whether to report per-cpu stats or not
|
|
|
|
percpu = true
|
|
|
|
# Whether to report total system cpu stats or not
|
|
|
|
totalcpu = true
|
|
|
|
# Comment this line if you want the raw CPU time metrics
|
|
|
|
drop = ["cpu_time"]
|
2015-08-11 15:50:36 +00:00
|
|
|
|
|
|
|
# Read metrics about disk usage by mount point
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.diskio]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# no configuration
|
2015-08-11 15:50:36 +00:00
|
|
|
|
|
|
|
# Read metrics from one or many disque servers
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.disque]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# An array of URI to gather stats about. Specify an ip or hostname
|
|
|
|
# with optional port and password. ie disque://localhost, disque://10.10.3.33:18832,
|
|
|
|
# 10.0.0.1:10000, etc.
|
|
|
|
#
|
|
|
|
# If no servers are specified, then localhost is used as the host.
|
|
|
|
servers = ["localhost"]
|
2015-08-11 15:50:36 +00:00
|
|
|
|
|
|
|
# Read stats from one or more Elasticsearch servers or clusters
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.elasticsearch]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# specify a list of one or more Elasticsearch servers
|
|
|
|
servers = ["http://localhost:9200"]
|
2015-08-11 15:50:36 +00:00
|
|
|
|
2015-11-16 20:12:45 +00:00
|
|
|
# set local to false when you want to read the indices stats from all nodes
|
|
|
|
# within the cluster
|
|
|
|
local = true
|
2015-08-11 15:50:36 +00:00
|
|
|
|
|
|
|
# Read flattened metrics from one or more commands that output JSON to stdout
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.exec]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# the command to run
|
|
|
|
command = "/usr/bin/mycollector --foo=bar"
|
2016-01-07 20:39:43 +00:00
|
|
|
name_suffix = "_mycollector"
|
2015-08-11 15:50:36 +00:00
|
|
|
|
|
|
|
# Read metrics of haproxy, via socket or csv stats page
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.haproxy]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# An array of address to gather stats about. Specify an ip on hostname
|
|
|
|
# with optional port. ie localhost, 10.10.3.33:1936, etc.
|
|
|
|
#
|
|
|
|
# If no servers are specified, then default to 127.0.0.1:1936
|
|
|
|
servers = ["http://myhaproxy.com:1936", "http://anotherhaproxy.com:1936"]
|
|
|
|
# Or you can also use local socket(not work yet)
|
|
|
|
# servers = ["socket:/run/haproxy/admin.sock"]
|
2015-09-22 01:38:57 +00:00
|
|
|
|
|
|
|
# Read flattened metrics from one or more JSON HTTP endpoints
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.httpjson]]
|
2016-01-07 17:52:46 +00:00
|
|
|
# a name for the service being polled
|
|
|
|
name = "webserver_stats"
|
2015-09-22 01:38:57 +00:00
|
|
|
|
2016-01-07 17:52:46 +00:00
|
|
|
# URL of each server in the service's cluster
|
|
|
|
servers = [
|
|
|
|
"http://localhost:9999/stats/",
|
|
|
|
"http://localhost:9998/stats/",
|
|
|
|
]
|
2015-09-22 01:38:57 +00:00
|
|
|
|
2016-01-07 17:52:46 +00:00
|
|
|
# HTTP method to use (case-sensitive)
|
|
|
|
method = "GET"
|
2015-09-22 01:38:57 +00:00
|
|
|
|
2016-01-07 17:52:46 +00:00
|
|
|
# HTTP parameters (all values must be strings)
|
|
|
|
[httpjson.parameters]
|
|
|
|
event_type = "cpu_spike"
|
|
|
|
threshold = "0.75"
|
2015-08-11 15:50:36 +00:00
|
|
|
|
|
|
|
# Read metrics about disk IO by device
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.diskio]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# no configuration
|
2015-08-11 15:50:36 +00:00
|
|
|
|
|
|
|
# read metrics from a Kafka topic
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.kafka_consumer]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# topic(s) to consume
|
|
|
|
topics = ["telegraf"]
|
|
|
|
# an array of Zookeeper connection strings
|
|
|
|
zookeeper_peers = ["localhost:2181"]
|
|
|
|
# the name of the consumer group
|
|
|
|
consumer_group = "telegraf_metrics_consumers"
|
|
|
|
# Maximum number of points to buffer between collection intervals
|
|
|
|
point_buffer = 100000
|
|
|
|
# Offset (must be either "oldest" or "newest")
|
|
|
|
offset = "oldest"
|
2015-08-11 15:50:36 +00:00
|
|
|
|
|
|
|
# Read metrics from a LeoFS Server via SNMP
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.leofs]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# An array of URI to gather stats about LeoFS.
|
|
|
|
# Specify an ip or hostname with port. ie 127.0.0.1:4020
|
|
|
|
#
|
|
|
|
# If no servers are specified, then 127.0.0.1 is used as the host and 4020 as the port.
|
|
|
|
servers = ["127.0.0.1:4021"]
|
2015-08-11 15:50:36 +00:00
|
|
|
|
|
|
|
# Read metrics from local Lustre service on OST, MDS
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.lustre2]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# An array of /proc globs to search for Lustre stats
|
|
|
|
# If not specified, the default will work on Lustre 2.5.x
|
|
|
|
#
|
|
|
|
# ost_procfiles = ["/proc/fs/lustre/obdfilter/*/stats", "/proc/fs/lustre/osd-ldiskfs/*/stats"]
|
|
|
|
# mds_procfiles = ["/proc/fs/lustre/mdt/*/md_stats"]
|
2015-08-11 15:50:36 +00:00
|
|
|
|
|
|
|
# Read metrics about memory usage
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.mem]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# no configuration
|
2015-08-11 15:50:36 +00:00
|
|
|
|
|
|
|
# Read metrics from one or many memcached servers
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.memcached]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# An array of address to gather stats about. Specify an ip on hostname
|
|
|
|
# with optional port. ie localhost, 10.0.0.1:11211, etc.
|
|
|
|
#
|
|
|
|
# If no servers are specified, then localhost is used as the host.
|
|
|
|
servers = ["localhost"]
|
2015-08-11 15:50:36 +00:00
|
|
|
|
2016-02-11 00:37:24 +00:00
|
|
|
# Telegraf plugin for gathering metrics from N Mesos masters
|
|
|
|
[[inputs.mesos]]
|
|
|
|
# Timeout, in ms.
|
|
|
|
timeout = 100
|
|
|
|
# A list of Mesos masters. e.g. master1:5050, master2:5080, etc.
|
|
|
|
# The port can be skipped if using the default (5050)
|
|
|
|
# Default value is localhost:5050.
|
|
|
|
masters = ["localhost:5050"]
|
|
|
|
# Metrics groups to be collected.
|
|
|
|
# Default, all enabled.
|
|
|
|
master_collections = ["resources","master","system","slaves","frameworks","messages","evqueue","registrar"]
|
|
|
|
|
2015-08-11 15:50:36 +00:00
|
|
|
# Read metrics from one or many MongoDB servers
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.mongodb]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# An array of URI to gather stats about. Specify an ip or hostname
|
|
|
|
# with optional port add password. ie mongodb://user:auth_key@10.10.3.30:27017,
|
|
|
|
# mongodb://10.10.3.33:18832, 10.0.0.1:10000, etc.
|
|
|
|
#
|
|
|
|
# If no servers are specified, then 127.0.0.1 is used as the host and 27107 as the port.
|
|
|
|
servers = ["127.0.0.1:27017"]
|
2015-08-11 15:50:36 +00:00
|
|
|
|
|
|
|
# Read metrics from one or many mysql servers
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.mysql]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# specify servers via a url matching:
|
|
|
|
# [username[:password]@][protocol[(address)]]/[?tls=[true|false|skip-verify]]
|
|
|
|
# e.g.
|
|
|
|
# servers = ["root:root@http://10.0.0.18/?tls=false"]
|
|
|
|
# servers = ["root:passwd@tcp(127.0.0.1:3306)/"]
|
|
|
|
#
|
|
|
|
# If no servers are specified, then localhost is used as the host.
|
|
|
|
servers = ["localhost"]
|
2015-08-11 15:50:36 +00:00
|
|
|
|
|
|
|
# Read metrics about network interface usage
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.net]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# By default, telegraf gathers stats from any up interface (excluding loopback)
|
|
|
|
# Setting interfaces will tell it to gather these explicit interfaces,
|
|
|
|
# regardless of status.
|
|
|
|
#
|
|
|
|
# interfaces = ["eth0", ... ]
|
2015-08-11 15:50:36 +00:00
|
|
|
|
|
|
|
# Read Nginx's basic status information (ngx_http_stub_status_module)
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.nginx]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# An array of Nginx stub_status URI to gather stats.
|
|
|
|
urls = ["http://localhost/status"]
|
2015-09-22 01:38:57 +00:00
|
|
|
|
|
|
|
# Ping given url(s) and return statistics
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.ping]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# urls to ping
|
|
|
|
urls = ["www.google.com"] # required
|
|
|
|
# number of pings to send (ping -c <COUNT>)
|
|
|
|
count = 1 # required
|
|
|
|
# interval, in s, at which to ping. 0 == default (ping -i <PING_INTERVAL>)
|
|
|
|
ping_interval = 0.0
|
|
|
|
# ping timeout, in s. 0 == no timeout (ping -t <TIMEOUT>)
|
|
|
|
timeout = 0.0
|
|
|
|
# interface to send ping from (ping -I <INTERFACE>)
|
|
|
|
interface = ""
|
2015-08-11 15:50:36 +00:00
|
|
|
|
|
|
|
# Read metrics from one or many postgresql servers
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.postgresql]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# specify address via a url matching:
|
|
|
|
# postgres://[pqgotest[:password]]@localhost[/dbname]?sslmode=[disable|verify-ca|verify-full]
|
|
|
|
# or a simple string:
|
|
|
|
# host=localhost user=pqotest password=... sslmode=... dbname=app_production
|
|
|
|
#
|
|
|
|
# All connection parameters are optional. By default, the host is localhost
|
|
|
|
# and the user is the currently running user. For localhost, we default
|
|
|
|
# to sslmode=disable as well.
|
|
|
|
#
|
|
|
|
# Without the dbname parameter, the driver will default to a database
|
|
|
|
# with the same name as the user. This dbname is just for instantiating a
|
|
|
|
# connection with the server and doesn't restrict the databases we are trying
|
|
|
|
# to grab metrics for.
|
|
|
|
#
|
|
|
|
|
|
|
|
address = "sslmode=disable"
|
|
|
|
|
|
|
|
# A list of databases to pull metrics about. If not specified, metrics for all
|
|
|
|
# databases are gathered.
|
|
|
|
|
|
|
|
# databases = ["app_production", "blah_testing"]
|
|
|
|
|
|
|
|
# [[postgresql.servers]]
|
|
|
|
# address = "influx@remoteserver"
|
2015-08-11 15:50:36 +00:00
|
|
|
|
|
|
|
# Read metrics from one or many prometheus clients
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.prometheus]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# An array of urls to scrape metrics from.
|
|
|
|
urls = ["http://localhost:9100/metrics"]
|
2015-08-11 15:50:36 +00:00
|
|
|
|
|
|
|
# Read metrics from one or many RabbitMQ servers via the management API
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.rabbitmq]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# Specify servers via an array of tables
|
|
|
|
# name = "rmq-server-1" # optional tag
|
|
|
|
# url = "http://localhost:15672"
|
|
|
|
# username = "guest"
|
|
|
|
# password = "guest"
|
2015-08-11 15:50:36 +00:00
|
|
|
|
2015-11-16 20:12:45 +00:00
|
|
|
# A list of nodes to pull metrics about. If not specified, metrics for
|
|
|
|
# all nodes are gathered.
|
|
|
|
# nodes = ["rabbit@node1", "rabbit@node2"]
|
2015-08-11 15:50:36 +00:00
|
|
|
|
|
|
|
# Read metrics from one or many redis servers
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.redis]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# An array of URI to gather stats about. Specify an ip or hostname
|
|
|
|
# with optional port add password. ie redis://localhost, redis://10.10.3.33:18832,
|
|
|
|
# 10.0.0.1:10000, etc.
|
|
|
|
#
|
|
|
|
# If no servers are specified, then localhost is used as the host.
|
|
|
|
servers = ["localhost"]
|
2015-08-11 15:50:36 +00:00
|
|
|
|
|
|
|
# Read metrics from one or many RethinkDB servers
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.rethinkdb]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# An array of URI to gather stats about. Specify an ip or hostname
|
|
|
|
# with optional port add password. ie rethinkdb://user:auth_key@10.10.3.30:28105,
|
|
|
|
# rethinkdb://10.10.3.33:18832, 10.0.0.1:10000, etc.
|
|
|
|
#
|
|
|
|
# If no servers are specified, then 127.0.0.1 is used as the host and 28015 as the port.
|
|
|
|
servers = ["127.0.0.1:28015"]
|
2015-08-11 15:50:36 +00:00
|
|
|
|
|
|
|
# Read metrics about swap memory usage
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.swap]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# no configuration
|
2015-08-11 15:50:36 +00:00
|
|
|
|
2015-09-22 01:38:57 +00:00
|
|
|
# Read metrics about system load & uptime
|
2016-01-07 20:39:43 +00:00
|
|
|
[[inputs.system]]
|
2015-11-16 20:12:45 +00:00
|
|
|
# no configuration
|