Skip to content

Commit

Permalink
Update all readme instances of data formats
Browse files Browse the repository at this point in the history
  • Loading branch information
sparrc committed Apr 5, 2016
1 parent 03f2a35 commit 4dd364e
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 35 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ creating the `Parser` object.
You should also add the following to your SampleConfig() return:

```toml
## Data format to consume. This can be "json", "influx" or "graphite"
## Data format to consume.
## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
Expand Down Expand Up @@ -244,7 +244,7 @@ instantiating and creating the `Serializer` object.
You should also add the following to your SampleConfig() return:

```toml
## Data format to output. This can be "influx" or "graphite"
## Data format to output.
## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
Expand Down
16 changes: 9 additions & 7 deletions docs/DATA_FORMATS_INPUT.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Telegraf is able to parse the following input data formats into metrics:
1. InfluxDB Line Protocol
1. JSON
1. Graphite
1. Value, ie 45 or "booyah"
1. Value, ie: 45 or "booyah"
1. Nagios (exec input only)

Telegraf metrics, like InfluxDB
[points](https://docs.influxdata.com/influxdb/v0.10/write_protocols/line/),
Expand Down Expand Up @@ -38,7 +39,7 @@ example, in the exec plugin:
## measurement name suffix (for separating different commands)
name_suffix = "_mycollector"

## Data format to consume. This can be "json", "influx" or "graphite"
## Data format to consume.
## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
Expand All @@ -65,7 +66,7 @@ metrics are parsed directly into Telegraf metrics.
## measurement name suffix (for separating different commands)
name_suffix = "_mycollector"

## Data format to consume. This can be "json", "influx" or "graphite"
## Data format to consume.
## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
Expand Down Expand Up @@ -110,7 +111,7 @@ For example, if you had this configuration:
## measurement name suffix (for separating different commands)
name_suffix = "_mycollector"

## Data format to consume. This can be "json", "influx" or "graphite"
## Data format to consume.
## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
Expand Down Expand Up @@ -165,7 +166,7 @@ plugin.
## override the default metric name of "exec"
name_override = "entropy_available"

## Data format to consume. This can be "json", "value", influx" or "graphite"
## Data format to consume.
## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
Expand Down Expand Up @@ -301,7 +302,8 @@ There are many more options available,
## measurement name suffix (for separating different commands)
name_suffix = "_mycollector"

## Data format to consume. This can be "json", "influx" or "graphite" (line-protocol)
## Data format to consume.
(line-protocol)
## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
Expand Down Expand Up @@ -344,7 +346,7 @@ Note: Nagios Input Data Formats is only supported in `exec` input plugin.
## measurement name suffix (for separating different commands)
name_suffix = "_mycollector"

## Data format to consume. This can be "json", "influx", "graphite" or "nagios"
## Data format to consume.
## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
Expand Down
12 changes: 8 additions & 4 deletions docs/DATA_FORMATS_OUTPUT.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ config option, for example, in the `file` output plugin:
## Files to write to, "stdout" is a specially handled file.
files = ["stdout"]

## Data format to output. This can be "influx" or "graphite"
## Data format to output.

## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
Expand All @@ -53,7 +54,8 @@ metrics are serialized directly into InfluxDB line-protocol.
## Files to write to, "stdout" is a specially handled file.
files = ["stdout", "/tmp/metrics.out"]

## Data format to output. This can be "influx", "json" or "graphite"
## Data format to output.

## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
Expand Down Expand Up @@ -87,7 +89,8 @@ tars.cpu-total.us-east-1.cpu.usage_idle 98.09 1455320690
## Files to write to, "stdout" is a specially handled file.
files = ["stdout", "/tmp/metrics.out"]

## Data format to output. This can be "influx", "json" or "graphite"
## Data format to output.

## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
Expand Down Expand Up @@ -123,7 +126,8 @@ The Json data format serialized Telegraf metrics in json format. The format is:
## Files to write to, "stdout" is a specially handled file.
files = ["stdout", "/tmp/metrics.out"]

## Data format to output. This can be "influx", "json" or "graphite"
## Data format to output.

## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_OUTPUT.md
Expand Down
29 changes: 12 additions & 17 deletions plugins/inputs/exec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,11 @@

Please also see: [Telegraf Input Data Formats](https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md)

The exec input plugin can execute arbitrary commands which output:

* JSON [javascript object notation](http://www.json.org/)
* InfluxDB [line-protocol](https://docs.influxdata.com/influxdb/v0.10/write_protocols/line/)
* Graphite [graphite-protocol](http://graphite.readthedocs.org/en/latest/feeding-carbon.html)


### Example 1 - JSON

#### Configuration

In this example a script called ```/tmp/test.sh``` and a script called ```/tmp/test2.sh```
In this example a script called ```/tmp/test.sh``` and a script called ```/tmp/test2.sh```
are configured for ```[[inputs.exec]]``` in JSON format.

```
Expand All @@ -22,7 +15,8 @@ are configured for ```[[inputs.exec]]``` in JSON format.
# Shell/commands array
commands = ["/tmp/test.sh", "/tmp/test2.sh"]
# Data format to consume. This can be "json", "influx" or "graphite" (line-protocol)
# Data format to consume.
(line-protocol)
# NOTE json only reads numerical measurements, strings and booleans are ignored.
data_format = "json"
Expand Down Expand Up @@ -81,7 +75,7 @@ and strings will be ignored.
### Example 2 - Influx Line-Protocol

In this example an application called ```/usr/bin/line_protocol_collector```
and a script called ```/tmp/test2.sh``` are configured for ```[[inputs.exec]]```
and a script called ```/tmp/test2.sh``` are configured for ```[[inputs.exec]]```
in influx line-protocol format.

#### Configuration
Expand All @@ -94,7 +88,7 @@ in influx line-protocol format.
# command = "/usr/bin/line_protocol_collector"
commands = ["/usr/bin/line_protocol_collector","/tmp/test2.sh"]
# Data format to consume. This can be "json" or "influx" (line-protocol)
# Data format to consume.
# NOTE json only reads numerical measurements, strings and booleans are ignored.
data_format = "influx"
```
Expand All @@ -113,16 +107,16 @@ cpu,cpu=cpu6,host=foo,datacenter=us-east usage_idle=99,usage_busy=1

You will get data in InfluxDB exactly as it is defined above,
tags are cpu=cpuN, host=foo, and datacenter=us-east with fields usage_idle
and usage_busy. They will receive a timestamp at collection time.
and usage_busy. They will receive a timestamp at collection time.
Each line must end in \n, just as the Influx line protocol does.


### Example 3 - Graphite

We can also change the data_format to "graphite" to use the metrics collecting scripts such as (compatible with graphite):

* Nagios [Mertics Plugins] (https://exchange.nagios.org/directory/Plugins)
* Sensu [Mertics Plugins] (https://github.com/sensu-plugins)
* Nagios [Metrics Plugins](https://exchange.nagios.org/directory/Plugins)
* Sensu [Metrics Plugins](https://github.com/sensu-plugins)

In this example a script called /tmp/test.sh and a script called /tmp/test2.sh are configured for [[inputs.exec]] in graphite format.

Expand All @@ -133,7 +127,8 @@ In this example a script called /tmp/test.sh and a script called /tmp/test2.sh a
# Shell/commands array
commands = ["/tmp/test.sh","/tmp/test2.sh"]
# Data format to consume. This can be "json", "influx" or "graphite" (line-protocol)
# Data format to consume.
(line-protocol)
# NOTE json only reads numerical measurements, strings and booleans are ignored.
data_format = "graphite"
Expand Down Expand Up @@ -186,5 +181,5 @@ sensu.metric.net.server0.eth0.rx_dropped 0 1444234982

The templates configuration will be used to parse the graphite metrics to support influxdb/opentsdb tagging store engines.

More detail information about templates, please refer to [The graphite Input] (https://github.com/influxdata/influxdb/blob/master/services/graphite/README.md)
More detail information about templates, please refer to [The graphite Input](https://github.com/influxdata/influxdb/blob/master/services/graphite/README.md)

3 changes: 2 additions & 1 deletion plugins/inputs/kafka_consumer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ from the same topic in parallel.
## Offset (must be either "oldest" or "newest")
offset = "oldest"

## Data format to consume. This can be "json", "influx" or "graphite"
## Data format to consume.

## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/mqtt_consumer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The plugin expects messages in the
## Use SSL but skip chain & host verification
# insecure_skip_verify = false

## Data format to consume. This can be "json", "influx" or "graphite"
## Data format to consume.
## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
Expand Down
3 changes: 2 additions & 1 deletion plugins/inputs/nats_consumer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ from a NATS cluster in parallel.
## Maximum number of metrics to buffer between collection intervals
metric_buffer = 100000

## Data format to consume. This can be "json", "influx" or "graphite"
## Data format to consume.

## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
Expand Down
3 changes: 2 additions & 1 deletion plugins/inputs/tcp_listener/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ This is a sample configuration for the plugin.
## Maximum number of concurrent TCP connections to allow
max_tcp_connections = 250

## Data format to consume. This can be "json", "influx" or "graphite"
## Data format to consume.

## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
Expand Down
3 changes: 2 additions & 1 deletion plugins/inputs/udp_listener/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ This is a sample configuration for the plugin.
## usually 1500 bytes.
udp_packet_size = 1500

## Data format to consume. This can be "json", "influx" or "graphite"
## Data format to consume.

## Each data format has it's own unique set of configuration options, read
## more about them here:
## https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
Expand Down

0 comments on commit 4dd364e

Please sign in to comment.