nstat plugin cleanups and formatting

closes #1104
closes #1138
This commit is contained in:
Cameron Sparr
2016-05-17 17:00:46 +01:00
parent 7557056a31
commit dc89f029ad
4 changed files with 36 additions and 21 deletions

View File

@@ -40,17 +40,18 @@ type Nstat struct {
}
var sampleConfig = `
# file paths
# e.g: /proc/net/netstat, /proc/net/snmp, /proc/net/snmp6
proc_net_netstat = ""
proc_net_snmp = ""
proc_net_snmp6 = ""
# dump metrics with 0 values too
dump_zeros = true
## file paths for proc files. If empty default paths will be used:
## /proc/net/netstat, /proc/net/snmp, /proc/net/snmp6
## These can also be overridden with env variables, see README.
proc_net_netstat = ""
proc_net_snmp = ""
proc_net_snmp6 = ""
## dump metrics with 0 values too
dump_zeros = true
`
func (ns *Nstat) Description() string {
return "Collect network metrics from '/proc/net/netstat', '/proc/net/snmp' & '/proc/net/snmp6' files"
return "Collect kernel snmp counters and network interface statistics"
}
func (ns *Nstat) SampleConfig() string {