Dummy kernel plugin added for consistent config generation
This commit is contained in:
27
plugins/inputs/system/kernel_notlinux.go
Normal file
27
plugins/inputs/system/kernel_notlinux.go
Normal 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{}
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user