Change config file indentation to 2 spaces

This commit is contained in:
Cameron Sparr 2015-10-15 15:53:29 -06:00
parent 555436a222
commit 4e5ed9d3b9
34 changed files with 387 additions and 381 deletions

View File

@ -355,17 +355,13 @@ var header = `# Telegraf configuration
[agent]
# Default data collection interval for all plugins
interval = "10s"
# If utc = false, uses local time (utc is highly recommended)
utc = true
# Precision of writes, valid values are n, u, ms, s, m, and h
# note: using second precision greatly helps InfluxDB compression
precision = "s"
# run telegraf in debug mode
debug = false
# Override default hostname, if empty use os.Hostname()
hostname = ""

View File

@ -33,13 +33,13 @@ var sampleConfig = `
# The target database for metrics (telegraf will create it if not exists)
database = "telegraf" # required
# # Connection timeout (for the connection with InfluxDB), formatted as a string.
# # Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
# # If not provided, will default to 0 (no timeout)
# Connection timeout (for the connection with InfluxDB), formatted as a string.
# Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
# If not provided, will default to 0 (no timeout)
# timeout = "5s"
# username = "telegraf"
# password = "metricsmetricsmetricsmetrics"
# # Set the user agent for the POSTs (can be useful for log differentiation)
# Set the user agent for the POSTs (can be useful for log differentiation)
# user_agent = "telegraf"
`

View File

@ -104,31 +104,42 @@ func (n *Apache) gatherScores(data string, acc plugins.Accumulator, tags map[str
for _, s := range strings.Split(data, "") {
switch s {
case "_": waiting++
case "S": S++
case "R": R++
case "W": W++
case "K": K++
case "D": D++
case "C": C++
case "L": L++
case "G": G++
case "I": I++
case ".": open++
case "_":
waiting++
case "S":
S++
case "R":
R++
case "W":
W++
case "K":
K++
case "D":
D++
case "C":
C++
case "L":
L++
case "G":
G++
case "I":
I++
case ".":
open++
}
}
acc.Add("scboard_waiting", float64(waiting), tags);
acc.Add("scboard_starting", float64(S), tags);
acc.Add("scboard_reading", float64(R), tags);
acc.Add("scboard_sending", float64(W), tags);
acc.Add("scboard_keepalive", float64(K), tags);
acc.Add("scboard_dnslookup", float64(D), tags);
acc.Add("scboard_closing", float64(C), tags);
acc.Add("scboard_logging", float64(L), tags);
acc.Add("scboard_finishing", float64(G), tags);
acc.Add("scboard_idle_cleanup", float64(I), tags);
acc.Add("scboard_open", float64(open), tags);
acc.Add("scboard_waiting", float64(waiting), tags)
acc.Add("scboard_starting", float64(S), tags)
acc.Add("scboard_reading", float64(R), tags)
acc.Add("scboard_sending", float64(W), tags)
acc.Add("scboard_keepalive", float64(K), tags)
acc.Add("scboard_dnslookup", float64(D), tags)
acc.Add("scboard_closing", float64(C), tags)
acc.Add("scboard_logging", float64(L), tags)
acc.Add("scboard_finishing", float64(G), tags)
acc.Add("scboard_idle_cleanup", float64(I), tags)
acc.Add("scboard_open", float64(open), tags)
}
// Get tag(s) for the apache plugin

View File

@ -156,7 +156,6 @@ func getTags(addr *url.URL) map[string]string {
return map[string]string{"server": host, "port": port}
}
func init() {
plugins.Add("nginx", func() plugins.Plugin {
return &Nginx{}

View File

@ -104,7 +104,7 @@ type cachedtimings struct {
}
func (_ *Statsd) Description() string {
return "Statsd listener"
return "Statsd Server"
}
const sampleConfig = `