Adding upstream version 1.34.4.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
e393c3af3f
commit
4978089aab
4963 changed files with 677545 additions and 0 deletions
25
plugins/outputs/discard/README.md
Normal file
25
plugins/outputs/discard/README.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Discard Output Plugin
|
||||
|
||||
This plugin discards all metrics written to it and is meant for testing
|
||||
purposes.
|
||||
|
||||
⭐ Telegraf v1.2.0
|
||||
🏷️ testing
|
||||
💻 all
|
||||
|
||||
## Global configuration options <!-- @/docs/includes/plugin_config.md -->
|
||||
|
||||
In addition to the plugin-specific configuration settings, plugins support
|
||||
additional global and plugin configuration settings. These settings are used to
|
||||
modify metrics, tags, and field or create aliases and configure ordering, etc.
|
||||
See the [CONFIGURATION.md][CONFIGURATION.md] for more details.
|
||||
|
||||
[CONFIGURATION.md]: ../../../docs/CONFIGURATION.md#plugins
|
||||
|
||||
## Configuration
|
||||
|
||||
```toml @sample.conf
|
||||
# Send metrics to nowhere at all
|
||||
[[outputs.discard]]
|
||||
# no configuration
|
||||
```
|
28
plugins/outputs/discard/discard.go
Normal file
28
plugins/outputs/discard/discard.go
Normal file
|
@ -0,0 +1,28 @@
|
|||
//go:generate ../../../tools/readme_config_includer/generator
|
||||
package discard
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
|
||||
"github.com/influxdata/telegraf"
|
||||
"github.com/influxdata/telegraf/plugins/outputs"
|
||||
)
|
||||
|
||||
//go:embed sample.conf
|
||||
var sampleConfig string
|
||||
|
||||
type Discard struct{}
|
||||
|
||||
func (*Discard) SampleConfig() string {
|
||||
return sampleConfig
|
||||
}
|
||||
|
||||
func (*Discard) Connect() error { return nil }
|
||||
func (*Discard) Close() error { return nil }
|
||||
func (*Discard) Write([]telegraf.Metric) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
outputs.Add("discard", func() telegraf.Output { return &Discard{} })
|
||||
}
|
3
plugins/outputs/discard/sample.conf
Normal file
3
plugins/outputs/discard/sample.conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Send metrics to nowhere at all
|
||||
[[outputs.discard]]
|
||||
# no configuration
|
Loading…
Add table
Add a link
Reference in a new issue