telegraf/plugins/inputs/file
Joshua Powers 0c02f245d6
fix: markdown: resolve all markdown issues with d-f (#10171)
2021-11-24 11:56:26 -07:00
..
dev Add ability to set measurement from matched text in grok parser (#4433) 2018-08-17 13:45:22 -07:00
testdata Support utf-16 in file and tail inputs (#7792) 2020-07-07 12:43:32 -07:00
README.md fix: markdown: resolve all markdown issues with d-f (#10171) 2021-11-24 11:56:26 -07:00
file.go feat: Adds the ability to create and name a tag containing the filename using the directory monitor input plugin (#9860) 2021-10-07 15:38:20 -05:00
file_test.go fix: support 1.17 & 1.16.7 Go versions (#9642) 2021-08-23 15:37:44 -05: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. Cautious when file name variation is high, this can increase the cardinality
  ## significantly. Read more about cardinality here:
  ## https://docs.influxdata.com/influxdb/cloud/reference/glossary/#series-cardinality
  # file_tag = ""