telegraf/plugins/inputs/file
Daniel Nelson be1dc49ad9
Document distinction between file and tail inputs (#7353)
2020-04-24 16:40:08 -07:00
..
dev Add ability to set measurement from matched text in grok parser (#4433) 2018-08-17 13:45:22 -07:00
README.md Document distinction between file and tail inputs (#7353) 2020-04-24 16:40:08 -07:00
file.go Document distinction between file and tail inputs (#7353) 2020-04-24 16:40:08 -07:00
file_test.go Add a nameable file tag to file input plugin (#6650) 2019-11-13 13:00:41 -08:00

README.md

File Input Plugin

The file plugin parses the complete contents of a file every interval using the selected input data format.

Note: If you wish to parse only newly appended lines use the tail input plugin instead.

Configuration:

[[inputs.file]]
  ## Files to parse each interval.  Accept standard unix glob matching rules,
  ## as well as ** to match recursive files and directories.
  files = ["/tmp/metrics.out"]

  ## Data format to consume.
  ## 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_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 = ""