From ead52e807e230562a077bcc160044868d5086b51 Mon Sep 17 00:00:00 2001 From: Evan Phoenix Date: Fri, 22 May 2015 16:26:32 -0700 Subject: [PATCH] Improve sample config --- config.go | 16 +++++++++++++--- plugins/mysql/mysql.go | 1 + 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/config.go b/config.go index 6d5a89bf3..6deb2ee53 100644 --- a/config.go +++ b/config.go @@ -213,12 +213,16 @@ type hasDescr interface { var header = `# Tivan configuration +# If this file is missing an [agent] section, you must first generate a +# valid config with 'tivan -sample-config > tivan.toml' + # Tivan 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. +# as a section with no variables. To deactivate a plugin, comment +# out the name and any variables. # Use 'tivan -config tivan.toml -test' to see what metrics a config # file would generate. @@ -233,10 +237,16 @@ var header = `# Tivan configuration # Configuration for influxdb server to send metrics to [influxdb] -url = "http://10.20.2.4:8086" # required. Host and port are necessary as well. -database = "tivan" # required. You need to pre-create this in 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 = "tivan" # required. + # username = "tivan" # password = "metricsmetricsmetricsmetrics" + +# Set the user agent for the POSTs (can be useful for log differentiation) # user_agent = "tivan" # tags = { "dc": "us-east-1" } diff --git a/plugins/mysql/mysql.go b/plugins/mysql/mysql.go index 334171820..95c53909f 100644 --- a/plugins/mysql/mysql.go +++ b/plugins/mysql/mysql.go @@ -16,6 +16,7 @@ type Mysql struct { var sampleConfig = ` # 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"]`