Files
telegraf/plugins/inputs/zfs/zfs.go
Rickard von Essen 9f7a758bf9 RFR: Initial support for ZFS on FreeBSD (#1224)
* WIP: Initial support for ZFS on FreeBSD

* Added build directives

* Ignore 'kstatPath' config option on FreeBSD

* Added tests for ZFS FreeBSD input plugin.

* Updated the README to confrom with the guidelines and added FreeBSD info

* Fixed indents

* Spell check
2016-05-31 17:49:56 +01:00

34 lines
776 B
Go

package zfs
type Sysctl func(metric string) ([]string, error)
type Zpool func() ([]string, error)
type Zfs struct {
KstatPath string
KstatMetrics []string
PoolMetrics bool
sysctl Sysctl
zpool Zpool
}
var sampleConfig = `
## ZFS kstat path. Ignored on FreeBSD
## If not specified, then default is:
# kstatPath = "/proc/spl/kstat/zfs"
## By default, telegraf gather all zfs stats
## If not specified, then default is:
# kstatMetrics = ["arcstats", "zfetchstats", "vdev_cache_stats"]
## By default, don't gather zpool stats
# poolMetrics = false
`
func (z *Zfs) SampleConfig() string {
return sampleConfig
}
func (z *Zfs) Description() string {
return "Read metrics of ZFS from arcstats, zfetchstats, vdev_cache_stats, and pools"
}