Documentation

Telegraf input data formats

Telegraf input plugins consume data in one or more data formats and parse the data into Telegraf [metrics][/telegraf/v1/metrics/]. Many input plugins use configurable parsers for parsing data formats into metrics. This allows input plugins such as kafka_consumer input plugin to consume and process different data formats, such as InfluxDB line protocol or JSON. Telegraf supports the following input data formats:

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.
  ## 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 = "json_v2"
  • Copy
  • Fill window

Input parser plugins

When you specify a data_format in an input plugin configuration that supports it, the input plugin uses the associated parser plugin to convert data from its source format into Telegraf metrics. Many parser plugins provide additional configuration options for specifying details about your data schema and how it should map to fields in Telegraf metrics.


Was this page helpful?

Thank you for your feedback!


The future of Flux

Flux is going into maintenance mode. You can continue using it as you currently are without any changes to your code.

Read more

InfluxDB 3 Core and Enterprise are now in Beta

InfluxDB 3 Core and Enterprise are now available for beta testing, available under MIT or Apache 2 license.

InfluxDB 3 Core is a high-speed, recent-data engine that collects and processes data in real-time, while persisting it to local disk or object storage. InfluxDB 3 Enterprise is a commercial product that builds on Core’s foundation, adding high availability, read replicas, enhanced security, and data compaction for faster queries. A free tier of InfluxDB 3 Enterprise will also be available for at-home, non-commercial use for hobbyists to get the full historical time series database set of capabilities.

For more information, check out: