-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# discard Output Plugin | ||
|
||
This output plugin simply drops all metrics that are sent to it. It is only | ||
meant to be used for testing purposes. | ||
|
||
### Configuration: | ||
|
||
```toml | ||
# Send metrics to nowhere at all | ||
[[outputs.discard]] | ||
# no configuration | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package discard | ||
|
||
import ( | ||
"github.com/influxdata/telegraf" | ||
"github.com/influxdata/telegraf/plugins/outputs" | ||
) | ||
|
||
type Discard struct{} | ||
|
||
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 } | ||
|
||
func init() { | ||
outputs.Add("discard", func() telegraf.Output { return &Discard{} }) | ||
} |