2019-06-04 00:38:21 +00:00
|
|
|
# File Output Plugin
|
2017-02-20 10:50:39 +00:00
|
|
|
|
|
|
|
This plugin writes telegraf metrics to files
|
|
|
|
|
|
|
|
### Configuration
|
2019-06-04 00:38:21 +00:00
|
|
|
|
|
|
|
```toml
|
2017-02-20 10:50:39 +00:00
|
|
|
[[outputs.file]]
|
|
|
|
## Files to write to, "stdout" is a specially handled file.
|
|
|
|
files = ["stdout", "/tmp/metrics.out"]
|
|
|
|
|
2019-06-04 00:38:21 +00:00
|
|
|
## The file will be rotated after the time interval specified. When set
|
|
|
|
## to 0 no time based rotation is performed.
|
|
|
|
# rotation_interval = "0h"
|
|
|
|
|
|
|
|
## The logfile will be rotated when it becomes larger than the specified
|
|
|
|
## size. When set to 0 no size based rotation is performed.
|
|
|
|
# rotation_max_size = "0MB"
|
|
|
|
|
|
|
|
## Maximum number of rotated archives to keep, any older logs are deleted.
|
|
|
|
## If set to -1, no archives are removed.
|
|
|
|
# rotation_max_archives = 5
|
2019-06-02 00:11:47 +00:00
|
|
|
|
2017-02-20 10:50:39 +00:00
|
|
|
## Data format to output.
|
2017-04-27 21:59:18 +00:00
|
|
|
## Each data format has its own unique set of configuration options, read
|
2017-02-20 10:50:39 +00:00
|
|
|
## more about them here:
|
|
|
|
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
|
|
|
|
data_format = "influx"
|
|
|
|
```
|