2016-11-23 12:21:17 +00:00
|
|
|
package discard
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/influxdata/telegraf"
|
|
|
|
"github.com/influxdata/telegraf/plugins/outputs"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Discard struct{}
|
|
|
|
|
2018-11-05 21:34:28 +00:00
|
|
|
func (d *Discard) Connect() error { return nil }
|
|
|
|
func (d *Discard) Close() error { return nil }
|
|
|
|
func (d *Discard) SampleConfig() string { return "" }
|
|
|
|
func (d *Discard) Description() string { return "Send metrics to nowhere at all" }
|
|
|
|
func (d *Discard) Write(metrics []telegraf.Metric) error {
|
|
|
|
return nil
|
|
|
|
}
|
2016-11-23 12:21:17 +00:00
|
|
|
|
|
|
|
func init() {
|
|
|
|
outputs.Add("discard", func() telegraf.Output { return &Discard{} })
|
|
|
|
}
|