Dummy kernel plugin added for consistent config generation

This commit is contained in:
Cameron Sparr 2016-04-04 17:43:53 -06:00
parent 70ef61ac6d
commit d871e9aee7
2 changed files with 32 additions and 0 deletions

View File

@ -378,6 +378,11 @@
# skip_serial_number = true # skip_serial_number = true
# Get kernel statistics from /proc/stat
[[inputs.kernel]]
# no configuration
# Read metrics about memory usage # Read metrics about memory usage
[[inputs.mem]] [[inputs.mem]]
# no configuration # no configuration

View File

@ -0,0 +1,27 @@
// +build !linux
package system
import (
"github.com/influxdata/telegraf"
"github.com/influxdata/telegraf/plugins/inputs"
)
type Kernel struct {
}
func (k *Kernel) Description() string {
return "Get kernel statistics from /proc/stat"
}
func (k *Kernel) SampleConfig() string { return "" }
func (k *Kernel) Gather(acc telegraf.Accumulator) error {
return nil
}
func init() {
inputs.Add("kernel", func() telegraf.Input {
return &Kernel{}
})
}