Update input data format readme

This commit is contained in:
Cameron Sparr 2016-04-05 16:25:50 -06:00
parent 7e97787d9d
commit 64066c4ea8
1 changed files with 18 additions and 19 deletions

View File

@ -2,11 +2,11 @@
Telegraf is able to parse the following input data formats into metrics: Telegraf is able to parse the following input data formats into metrics:
1. InfluxDB Line Protocol 1. [InfluxDB Line Protocol](https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md#influx)
1. JSON 1. [JSON](https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md#json)
1. Graphite 1. [Graphite](https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md#graphite)
1. Value, ie: 45 or "booyah" 1. [Value](https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md#value), ie: 45 or "booyah"
1. Nagios (exec input only) 1. [Nagios](https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md#nagios) (exec input only)
Telegraf metrics, like InfluxDB Telegraf metrics, like InfluxDB
[points](https://docs.influxdata.com/influxdb/v0.10/write_protocols/line/), [points](https://docs.influxdata.com/influxdb/v0.10/write_protocols/line/),
@ -51,7 +51,7 @@ example, in the exec plugin:
Each data_format has an additional set of configuration options available, which Each data_format has an additional set of configuration options available, which
I'll go over below. I'll go over below.
## Influx: # Influx:
There are no additional configuration options for InfluxDB line-protocol. The There are no additional configuration options for InfluxDB line-protocol. The
metrics are parsed directly into Telegraf metrics. metrics are parsed directly into Telegraf metrics.
@ -73,7 +73,7 @@ metrics are parsed directly into Telegraf metrics.
data_format = "influx" data_format = "influx"
``` ```
## JSON: # JSON:
The JSON data format flattens JSON into metric _fields_. For example, this JSON: The JSON data format flattens JSON into metric _fields_. For example, this JSON:
@ -142,21 +142,20 @@ Your Telegraf metrics would get tagged with "my_tag_1"
exec_mycollector,my_tag_1=foo a=5,b_c=6 exec_mycollector,my_tag_1=foo a=5,b_c=6
``` ```
## Value: # Value:
The "value" data format translates single values into Telegraf metrics. This The "value" data format translates single values into Telegraf metrics. This
is done by assigning a measurement name (which can be overridden using the is done by assigning a measurement name and setting a single field ("value")
`name_override` config option), and setting a single field ("value") as the as the parsed metric.
parsed metric.
#### Value Configuration: #### Value Configuration:
You can tell Telegraf what type of metric to collect by using the `data_type` You **must** tell Telegraf what type of metric to collect by using the
configuration option. `data_type` configuration option.
It is also recommended that you set `name_override` to a measurement name that **Note:** It is also recommended that you set `name_override` to a measurement
makes sense for your metric, otherwise it will just be set to the name of the name that makes sense for your metric, otherwise it will just be set to the
plugin. name of the plugin.
```toml ```toml
[[inputs.exec]] [[inputs.exec]]
@ -171,10 +170,10 @@ plugin.
## more about them here: ## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md ## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
data_format = "value" data_format = "value"
data_type = "integer" data_type = "integer" # required
``` ```
## Graphite: # Graphite:
The Graphite data format translates graphite _dot_ buckets directly into The Graphite data format translates graphite _dot_ buckets directly into
telegraf measurement names, with a single value field, and without any tags. For telegraf measurement names, with a single value field, and without any tags. For
@ -328,7 +327,7 @@ There are many more options available,
] ]
``` ```
## Nagios: # Nagios:
There are no additional configuration options for Nagios line-protocol. The There are no additional configuration options for Nagios line-protocol. The
metrics are parsed directly into Telegraf metrics. metrics are parsed directly into Telegraf metrics.