Telegraf input data formats
This page documents an earlier version of Telegraf. Telegraf v1.21 is the latest stable version. View this page in the v1.21 documentation.
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. Telegraf supports the following input data formats:
Collectd input data format
Use the collectd
input data format to parse the collectd network binary protocol to create tags for host, instance, type, and type instance.
CSV input data format
Use the csv
input data format to parse a document containing comma-separated values into Telegraf metrics.
Dropwizard input data format
Use the dropwizard
input data format to parse Dropwizard JSON representations into Telegraf metrics.
Graphite input data format
Use the Graphite data format to translate Graphite dot buckets directly into Telegraf measurement names, with a single value field, and without any tags.
Grok input data format
Use the grok data format to parse line-delimited data using a regular expression-like language.
InfluxDB Line Protocol input data format
Use the InfluxDB Line Protocol input data format to parse InfluxDB metrics directly into Telegraf metrics.
JSON input data format
Use the JSON input data format to parse [JSON][json] objects, or an array of objects, into Telegraf metric fields.
Logfmt input data format
Use the logfmt
input data format to parse logfmt data into Telegraf metrics.
Nagios input data format
Use the Nagios input data format to parse the output of Nagios plugins into Telegraf metrics.
Prometheus Remote Write input data format
Use the Prometheus Remote Write input data format to write samples directly into Telegraf metrics.
Value input data format
Use the value
input data format to parse single values into Telegraf metrics.
Wavefront input data format
Use the Wavefront input data format to parse Wavefront data into Telegraf metrics.
XML input data format
Use the XML input data format to parse XML data into Telegraf metrics.
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"
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for Telegraf and this documentation. To find support, the following resources are available:
InfluxDB Cloud customers can contact InfluxData Support.