Skip to content

Latest commit

 

History

History
39 lines (32 loc) · 1.31 KB

DATA_FORMATS_INPUT.md

File metadata and controls

39 lines (32 loc) · 1.31 KB

Input Data Formats

Telegraf contains many general purpose plugins that support parsing input data using a configurable parser into metrics. This allows, for example, the kafka_consumer input plugin to process messages in either InfluxDB Line Protocol or in JSON format.

Any input plugin containing the data_format option can use it to select the desired parser:

[[inputs.exec]]
  ## Commands array
  commands = ["/tmp/test.sh", "/usr/bin/mycollector --foo=bar"]

  ## measurement name suffix (for separating different commands)
  name_suffix = "_mycollector"

  ## Data format to consume.
  data_format = "json"