Show platform not supported warning only on plugin creation (#6801)
This commit is contained in:
@@ -7,7 +7,8 @@ import (
|
||||
|
||||
// Wireless is used to store configuration values.
|
||||
type Wireless struct {
|
||||
HostProc string `toml:"host_proc"`
|
||||
HostProc string `toml:"host_proc"`
|
||||
Log telegraf.Logger `toml:"-"`
|
||||
}
|
||||
|
||||
var sampleConfig = `
|
||||
|
||||
@@ -3,19 +3,21 @@
|
||||
package wireless
|
||||
|
||||
import (
|
||||
"log"
|
||||
|
||||
"github.com/influxdata/telegraf"
|
||||
"github.com/influxdata/telegraf/plugins/inputs"
|
||||
)
|
||||
|
||||
func (w *Wireless) Init() error {
|
||||
w.Log.Warn("Current platform is not supported")
|
||||
return nil
|
||||
}
|
||||
|
||||
func (w *Wireless) Gather(acc telegraf.Accumulator) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
inputs.Add("wireless", func() telegraf.Input {
|
||||
log.Print("W! [inputs.wireless] Current platform is not supported")
|
||||
return &Wireless{}
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user