2021-08-24 04:37:44 +08:00
|
|
|
//go:build !windows
|
2017-08-08 05:36:15 +08:00
|
|
|
|
|
|
|
|
package win_services
|
2023-03-01 21:31:45 +08:00
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
_ "embed"
|
|
|
|
|
|
|
|
|
|
"github.com/influxdata/telegraf"
|
|
|
|
|
"github.com/influxdata/telegraf/plugins/inputs"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
//go:embed sample.conf
|
|
|
|
|
var sampleConfig string
|
|
|
|
|
|
|
|
|
|
type WinServices struct {
|
|
|
|
|
Log telegraf.Logger `toml:"-"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (w *WinServices) Init() error {
|
|
|
|
|
w.Log.Warn("current platform is not supported")
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
func (w *WinServices) SampleConfig() string { return sampleConfig }
|
|
|
|
|
func (w *WinServices) Gather(_ telegraf.Accumulator) error { return nil }
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
inputs.Add("win_services", func() telegraf.Input {
|
|
|
|
|
return &WinServices{}
|
|
|
|
|
})
|
|
|
|
|
}
|