2018-09-17 18:45:08 +00:00
|
|
|
# Input Data Formats
|
2016-02-06 00:36:35 +00:00
|
|
|
|
2018-09-17 18:45:08 +00:00
|
|
|
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.
|
2016-03-18 00:01:01 +00:00
|
|
|
|
2018-09-17 18:45:08 +00:00
|
|
|
- [InfluxDB Line Protocol](/plugins/parsers/influx)
|
|
|
|
- [Collectd](/plugins/parsers/collectd)
|
|
|
|
- [CSV](/plugins/parsers/csv)
|
|
|
|
- [Dropwizard](/plugins/parsers/dropwizard)
|
|
|
|
- [Graphite](/plugins/parsers/graphite)
|
|
|
|
- [Grok](/plugins/parsers/grok)
|
|
|
|
- [JSON](/plugins/parsers/json)
|
|
|
|
- [Logfmt](/plugins/parsers/logfmt)
|
|
|
|
- [Nagios](/plugins/parsers/nagios)
|
|
|
|
- [Value](/plugins/parsers/value), ie: 45 or "booyah"
|
|
|
|
- [Wavefront](/plugins/parsers/wavefront)
|
2016-03-18 00:01:01 +00:00
|
|
|
|
2018-09-17 18:45:08 +00:00
|
|
|
Any input plugin containing the `data_format` option can use it to select the
|
|
|
|
desired parser:
|
2016-02-06 00:36:35 +00:00
|
|
|
|
|
|
|
```toml
|
|
|
|
[[inputs.exec]]
|
2016-02-18 21:26:51 +00:00
|
|
|
## Commands array
|
2016-02-06 00:36:35 +00:00
|
|
|
commands = ["/tmp/test.sh", "/usr/bin/mycollector --foo=bar"]
|
|
|
|
|
2016-02-18 21:26:51 +00:00
|
|
|
## measurement name suffix (for separating different commands)
|
2016-02-06 00:36:35 +00:00
|
|
|
name_suffix = "_mycollector"
|
|
|
|
|
2016-04-05 20:42:20 +00:00
|
|
|
## Data format to consume.
|
2017-04-27 21:59:18 +00:00
|
|
|
## Each data format has its own unique set of configuration options, read
|
2016-02-18 21:26:51 +00:00
|
|
|
## more about them here:
|
|
|
|
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
|
2016-02-06 00:36:35 +00:00
|
|
|
data_format = "json"
|
|
|
|
```
|
2016-02-25 04:32:22 +00:00
|
|
|
|
2018-09-17 18:45:08 +00:00
|
|
|
[metrics]: /docs/METRICS.md
|