2021-08-24 04:37:44 +08:00
|
|
|
//go:build !windows
|
2020-09-29 06:15:28 +08:00
|
|
|
|
|
|
|
|
package win_eventlog
|
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 WinEventLog struct {
|
|
|
|
|
Log telegraf.Logger `toml:"-"`
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (w *WinEventLog) Init() error {
|
|
|
|
|
w.Log.Warn("current platform is not supported")
|
|
|
|
|
return nil
|
|
|
|
|
}
|
2023-03-11 05:11:50 +08:00
|
|
|
func (*WinEventLog) SampleConfig() string { return sampleConfig }
|
|
|
|
|
func (*WinEventLog) Gather(_ telegraf.Accumulator) error { return nil }
|
|
|
|
|
func (*WinEventLog) Start(_ telegraf.Accumulator) error { return nil }
|
|
|
|
|
func (*WinEventLog) Stop() {}
|
2023-03-01 21:31:45 +08:00
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
inputs.Add("win_eventlog", func() telegraf.Input {
|
|
|
|
|
return &WinEventLog{}
|
|
|
|
|
})
|
|
|
|
|
}
|