influxdb/telegraf/plugins/inputs/disk.go

32 lines
768 B
Go
Raw Normal View History

2018-10-05 21:43:01 +00:00
package inputs
2018-10-16 00:38:36 +00:00
import (
"fmt"
)
2018-10-05 21:43:01 +00:00
// DiskStats is based on telegraf DiskStats.
2018-10-16 00:38:36 +00:00
type DiskStats struct {
baseInput
}
// PluginName is based on telegraf plugin name.
func (d *DiskStats) PluginName() string {
return "disk"
}
2018-10-05 21:43:01 +00:00
2018-10-17 19:51:35 +00:00
// UnmarshalTOML decodes the parsed data to the object
func (d *DiskStats) UnmarshalTOML(data interface{}) error {
return nil
}
2018-10-05 21:43:01 +00:00
// TOML encodes to toml string
func (d *DiskStats) TOML() string {
2018-10-16 00:38:36 +00:00
return fmt.Sprintf(`[[inputs.%s]]
2018-10-17 19:51:35 +00:00
## By default stats will be gathered for all mount points.
## Set mount_points will restrict the stats to only the specified mount points.
# mount_points = ["/"]
## Ignore mount points by filesystem type.
ignore_fs = ["tmpfs", "devtmpfs", "devfs", "overlay", "aufs", "squashfs"]
2018-10-16 00:38:36 +00:00
`, d.PluginName())
2018-10-05 21:43:01 +00:00
}