2020-07-02 23:59:29 +08:00
|
|
|
# Execd Output Plugin
|
|
|
|
|
|
|
|
|
|
The `execd` plugin runs an external program as a daemon.
|
|
|
|
|
|
2020-07-10 02:29:12 +08:00
|
|
|
Telegraf minimum version: Telegraf 1.15.0
|
|
|
|
|
|
2022-10-27 03:58:36 +08:00
|
|
|
## 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
|
|
|
|
|
|
2021-11-25 02:47:33 +08:00
|
|
|
## Configuration
|
2020-07-02 23:59:29 +08:00
|
|
|
|
2022-05-25 22:48:59 +08:00
|
|
|
```toml @sample.conf
|
2022-04-08 05:55:03 +08:00
|
|
|
# Run executable as long-running output plugin
|
2020-07-02 23:59:29 +08:00
|
|
|
[[outputs.execd]]
|
2020-07-21 05:41:04 +08:00
|
|
|
## One program to run as daemon.
|
|
|
|
|
## NOTE: process and each argument should each be their own string
|
2020-07-02 23:59:29 +08:00
|
|
|
command = ["my-telegraf-output", "--some-flag", "value"]
|
|
|
|
|
|
2022-05-11 05:34:05 +08:00
|
|
|
## Environment variables
|
|
|
|
|
## Array of "key=value" pairs to pass as environment variables
|
|
|
|
|
## e.g. "KEY=value", "USERNAME=John Doe",
|
|
|
|
|
## "LD_LIBRARY_PATH=/opt/custom/lib64:/usr/local/libs"
|
|
|
|
|
# environment = []
|
|
|
|
|
|
2020-07-02 23:59:29 +08:00
|
|
|
## Delay before the process is restarted after an unexpected termination
|
|
|
|
|
restart_delay = "10s"
|
|
|
|
|
|
2022-09-09 22:00:47 +08:00
|
|
|
## Flag to determine whether execd should throw error when part of metrics is unserializable
|
|
|
|
|
## Setting this to true will skip the unserializable metrics and process the rest of metrics
|
|
|
|
|
## Setting this to false will throw error when encountering unserializable metrics and none will be processed
|
|
|
|
|
# ignore_serialization_error = false
|
|
|
|
|
|
2020-07-02 23:59:29 +08:00
|
|
|
## Data format to export.
|
|
|
|
|
## Each data format has its own unique set of configuration options, read
|
|
|
|
|
## more about them here:
|
|
|
|
|
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
|
|
|
|
|
data_format = "influx"
|
|
|
|
|
```
|
|
|
|
|
|
2021-11-25 02:47:33 +08:00
|
|
|
## Example
|
2020-07-02 23:59:29 +08:00
|
|
|
|
|
|
|
|
see [examples][]
|
|
|
|
|
|
2022-04-21 23:45:47 +08:00
|
|
|
[examples]: examples/
|