telegraf/docs/DATA_FORMATS_INPUT.md

41 lines
1.3 KiB
Markdown
Raw Normal View History

2018-09-18 02:45:08 +08:00
# Input Data Formats
2018-09-18 02:45:08 +08: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.
- [Binary](/plugins/parsers/binary)
2018-09-18 02:45:08 +08:00
- [Collectd](/plugins/parsers/collectd)
- [CSV](/plugins/parsers/csv)
- [Dropwizard](/plugins/parsers/dropwizard)
- [Graphite](/plugins/parsers/graphite)
- [Grok](/plugins/parsers/grok)
- [InfluxDB Line Protocol](/plugins/parsers/influx)
2018-09-18 02:45:08 +08:00
- [JSON](/plugins/parsers/json)
2021-08-25 04:18:08 +08:00
- [JSON v2](/plugins/parsers/json_v2)
2018-09-18 02:45:08 +08:00
- [Logfmt](/plugins/parsers/logfmt)
- [Nagios](/plugins/parsers/nagios)
- [Prometheus](/plugins/parsers/prometheus)
- [PrometheusRemoteWrite](/plugins/parsers/prometheusremotewrite)
2018-09-18 02:45:08 +08:00
- [Value](/plugins/parsers/value), ie: 45 or "booyah"
- [Wavefront](/plugins/parsers/wavefront)
2021-08-25 04:18:08 +08:00
- [XPath](/plugins/parsers/xpath) (supports XML, JSON, MessagePack, Protocol Buffers)
2018-09-18 02:45:08 +08:00
Any input plugin containing the `data_format` option can use it to select the
desired parser:
```toml
[[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"
```
2018-09-18 02:45:08 +08:00
[metrics]: /docs/METRICS.md