telegraf/plugins/outputs/file
Daniel Nelson 80c5edd48e
Add prometheus serializer and use it in prometheus output (#6703)
2019-11-26 15:46:31 -08:00
..
README.md Add prometheus serializer and use it in prometheus output (#6703) 2019-11-26 15:46:31 -08:00
file.go Add prometheus serializer and use it in prometheus output (#6703) 2019-11-26 15:46:31 -08:00
file_test.go Use random name for test sockets to avoid intermittent failure 2018-06-03 20:19:39 -07:00

README.md

File Output Plugin

This plugin writes telegraf metrics to files

Configuration

[[outputs.file]]
  ## Files to write to, "stdout" is a specially handled file.
  files = ["stdout", "/tmp/metrics.out"]

  ## Use batch serialization format instead of line based delimiting.  The
  ## batch format allows for the production of non line based output formats and
  ## may more effiently encode and write metrics.
  # use_batch_format = false

  ## 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

  ## Data format to output.
  ## 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"