From ba959e84e79287d4e1135b8e34c915ab01d99132 Mon Sep 17 00:00:00 2001 From: gunnaraasen Date: Fri, 29 May 2015 16:11:29 -0700 Subject: [PATCH 1/3] Explicitly name the config file as an example --- config.toml.example | 134 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) create mode 100644 config.toml.example diff --git a/config.toml.example b/config.toml.example new file mode 100644 index 000000000..e9628e3fa --- /dev/null +++ b/config.toml.example @@ -0,0 +1,134 @@ +# Telegraf configuration + +# If this file is missing an [agent] section, you must first generate a +# valid config with 'telegraf -sample-config > telegraf.toml' + +# Telegraf is entirely plugin driven. All metrics are gathered from the +# declared plugins. + +# 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. + +# Configuration for influxdb server to send metrics to +[influxdb] +# The full HTTP endpoint URL for your InfluxDB instance +url = "http://localhost:8086" # required. + +# The target database for metrics. This database must already exist +database = "telegraf" # required. + +# username = "telegraf" +# password = "metricsmetricsmetricsmetrics" + +# Set the user agent for the POSTs (can be useful for log differentiation) +# user_agent = "telegraf" +# tags = { "dc": "us-east-1" } + +# Tags can also be specified via a normal map, but only one form at a time: + +# [influxdb.tags] +# dc = "us-east-1" + +# Configuration for telegraf itself +# [agent] +# interval = "10s" +# debug = false +# hostname = "prod3241" + +# PLUGINS + +# Read metrics about cpu usage +[cpu] + # no configuration + +# Read metrics about disk usage by mount point +[disk] + # no configuration + +# Read metrics about docker containers +[docker] + # no configuration + +# Read metrics about disk IO by device +[io] + # no configuration + +# Read metrics about memory usage +[mem] + # no configuration + +# Read metrics from one or many mysql servers +[mysql] + +# specify servers via a url matching: +# [username[:password]@][protocol[(address)]]/[?tls=[true|false|skip-verify]] +# e.g. root:root@http://10.0.0.18/?tls=false +# +# If no servers are specified, then localhost is used as the host. +servers = ["localhost"] + +# Read metrics about network interface usage +[net] + +# 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", ... ] + +# Read metrics from one or many postgresql servers +[postgresql] + +# specify servers via an array of tables +[[postgresql.servers]] + +# specify address via a url matching: +# postgres://[pqgotest[:password]]@localhost?sslmode=[disable|verify-ca|verify-full] +# or a simple string: +# host=localhost user=pqotest password=... sslmode=... +# +# 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. +# + +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" + +# Read metrics from one or many redis servers +[redis] + +# An array of address to gather stats about. Specify an ip on hostname +# with optional port. ie localhost, 10.10.3.33:18832, etc. +# +# If no servers are specified, then localhost is used as the host. +servers = ["localhost"] + +# Read metrics about swap memory usage +[swap] + # no configuration + +# Read metrics about system load +[system] + # no configuration + From 70a17bd660bfc4299f74e5cbdaff0b451561e947 Mon Sep 17 00:00:00 2001 From: gunnaraasen Date: Fri, 29 May 2015 16:12:16 -0700 Subject: [PATCH 2/3] Remove telegraph.toml config file --- telegraf.toml | 134 -------------------------------------------------- 1 file changed, 134 deletions(-) delete mode 100644 telegraf.toml diff --git a/telegraf.toml b/telegraf.toml deleted file mode 100644 index c43e575b3..000000000 --- a/telegraf.toml +++ /dev/null @@ -1,134 +0,0 @@ -# Telegraf configuration - -# If this file is missing an [agent] section, you must first generate a -# valid config with 'telegraf -sample-config > telegraf.toml' - -# Telegraf is entirely plugin driven. All metrics are gathered from the -# declared plugins. - -# 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. - -# Configuration for influxdb server to send metrics to -[influxdb] -# The full HTTP endpoint URL for your InfluxDB instance -url = "http://10.20.2.4:8086" # required. - -# The target database for metrics. This database must already exist -database = "telegraf" # required. - -# username = "telegraf" -# password = "metricsmetricsmetricsmetrics" - -# Set the user agent for the POSTs (can be useful for log differentiation) -# user_agent = "telegraf" -# tags = { "dc": "us-east-1" } - -# Tags can also be specified via a normal map, but only one form at a time: - -# [influxdb.tags] -# dc = "us-east-1" - -# Configuration for telegraf itself -# [agent] -# interval = "10s" -# debug = false -# hostname = "prod3241" - -# PLUGINS - -# Read metrics about cpu usage -[cpu] - # no configuration - -# Read metrics about disk usage by mount point -[disk] - # no configuration - -# Read metrics about docker containers -[docker] - # no configuration - -# Read metrics about disk IO by device -[io] - # no configuration - -# Read metrics about memory usage -[mem] - # no configuration - -# Read metrics from one or many mysql servers -[mysql] - -# specify servers via a url matching: -# [username[:password]@][protocol[(address)]]/[?tls=[true|false|skip-verify]] -# e.g. root:root@http://10.0.0.18/?tls=false -# -# If no servers are specified, then localhost is used as the host. -servers = ["localhost"] - -# Read metrics about network interface usage -[net] - -# 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", ... ] - -# Read metrics from one or many postgresql servers -[postgresql] - -# specify servers via an array of tables -[[postgresql.servers]] - -# specify address via a url matching: -# postgres://[pqgotest[:password]]@localhost?sslmode=[disable|verify-ca|verify-full] -# or a simple string: -# host=localhost user=pqotest password=... sslmode=... -# -# 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. -# - -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" - -# Read metrics from one or many redis servers -[redis] - -# An array of address to gather stats about. Specify an ip on hostname -# with optional port. ie localhost, 10.10.3.33:18832, etc. -# -# If no servers are specified, then localhost is used as the host. -servers = ["localhost"] - -# Read metrics about swap memory usage -[swap] - # no configuration - -# Read metrics about system load -[system] - # no configuration - From 7abdd3b4535ff0abeca4bfa665cb9fd769edc970 Mon Sep 17 00:00:00 2001 From: Todd Persen Date: Wed, 17 Jun 2015 22:46:47 -0700 Subject: [PATCH 3/3] Move config to `etc` --- config.toml.example => etc/config.sample.toml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename config.toml.example => etc/config.sample.toml (100%) diff --git a/config.toml.example b/etc/config.sample.toml similarity index 100% rename from config.toml.example rename to etc/config.sample.toml