21 lines
376 B
Go
21 lines
376 B
Go
|
|
package dmcache
|
||
|
|
|
||
|
|
import (
|
||
|
|
"github.com/influxdata/telegraf"
|
||
|
|
"github.com/influxdata/telegraf/plugins/inputs"
|
||
|
|
)
|
||
|
|
|
||
|
|
type DMCache struct {
|
||
|
|
PerDevice bool `toml:"per_device"`
|
||
|
|
getCurrentStatus func() ([]string, error)
|
||
|
|
}
|
||
|
|
|
||
|
|
func init() {
|
||
|
|
inputs.Add("dmcache", func() telegraf.Input {
|
||
|
|
return &DMCache{
|
||
|
|
PerDevice: true,
|
||
|
|
getCurrentStatus: dmSetupStatus,
|
||
|
|
}
|
||
|
|
})
|
||
|
|
}
|