Add a nameable file tag to file input plugin (#6650)

This commit is contained in:
Nick Neisen
2019-11-13 14:00:41 -07:00
committed by Daniel Nelson
parent 4f4063ba01
commit 20bb673a0e
3 changed files with 44 additions and 2 deletions

View File

@@ -7,6 +7,7 @@ Files will always be read in their entirety, if you wish to tail/follow a file
use the [tail input plugin](/plugins/inputs/tail) instead.
### Configuration:
```toml
[[inputs.file]]
## Files to parse each interval.
@@ -22,4 +23,8 @@ use the [tail input plugin](/plugins/inputs/tail) instead.
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
data_format = "influx"
## Name a tag containing the name of the file the data was parsed from. Leave empty
## to disable.
# file_tag = ""
```