<commit_before>---
title: Telegraf input data formats
description: Telegraf, the plugin-driven server agent component of the InfluxData time series platform, supports parsing input data formats into metrics for InfluxDB Line Protocol, JSON, Graphite, Value, Nagios, Collectd, and Dropwizard.
menu:
  telegraf_1_6:
    name: Input data formats
    weight: 20
    parent: concepts
---

Telegraf is able to parse the following input data formats into metrics:

1. [InfluxDB Line Protocol](#influxdb-line-protocol)
2. [JSON](#json-data-format)
3. [Graphite](#graphite-data-format)
4. [Value](value), ie: 45 or "booyah"
5. [Nagios](#nagios-data-format)
6. [Collectd](#collectd-data-format)
7. [Dropwizard](#dropwizard-data-format)

Telegraf metrics, like InfluxDB
[points](/influxdb/latest/write_protocols/line_protocol_tutorial/),
are a combination of four basic parts:

1. Measurement name
2. Tags
3. Fields
4. Timestamp

These four parts are easily defined when using the [InfluxDB Line Protocol](/influxdb/latest/write_protocols/line_protocol_reference/) as a data format.
Other data formats may require more advanced configuration to create usable Telegraf metrics.

Plugins such as the Exec (`exec`) input plugin and the Kafka Consumer (`kafka_consumer`) input plugin parse textual data. Up until now,
these plugins were statically configured to parse just a single
data format. The Exec (`exec`) input plugin mostly only supported parsing JSON, and the Kafka Consumer (`kafka_consumer`) only
supported data in InfluxDB line-protocol.

Now, we are normalizing the parsing of various data formats across all
plugins that can support it. You will be able to identify a plugin that supports
different data formats by the presence of a `data_format` config option, for
example, in the Exec (`exec`) input plugin:

```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.
  ## Each data format has its own unique set of configuration options, read
  ## more about them here:<commit_msg>Remove unnecessary hyphen.<commit_after>---
title: Telegraf input data formats
description: Telegraf, the plugin-driven server agent component of the InfluxData time series platform, supports parsing input data formats into metrics for InfluxDB Line Protocol, JSON, Graphite, Value, Nagios, Collectd, and Dropwizard.
menu:
  telegraf_1_6:
    name: Input data formats
    weight: 20
    parent: concepts
---

Telegraf is able to parse the following input data formats into metrics:

1. [InfluxDB Line Protocol](#influxdb-line-protocol)
2. [JSON](#json-data-format)
3. [Graphite](#graphite-data-format)
4. [Value](value), ie: 45 or "booyah"
5. [Nagios](#nagios-data-format)
6. [Collectd](#collectd-data-format)
7. [Dropwizard](#dropwizard-data-format)

Telegraf metrics, like InfluxDB
[points](/influxdb/latest/write_protocols/line_protocol_tutorial/),
are a combination of four basic parts:

1. Measurement name
2. Tags
3. Fields
4. Timestamp

These four parts are easily defined when using the [InfluxDB Line Protocol](/influxdb/latest/write_protocols/line_protocol_reference/) as a data format.
Other data formats may require more advanced configuration to create usable Telegraf metrics.

Plugins such as the Exec (`exec`) input plugin and the Kafka Consumer (`kafka_consumer`) input plugin parse textual data. Up until now,
these plugins were statically configured to parse just a single
data format. The Exec (`exec`) input plugin mostly only supported parsing JSON, and the Kafka Consumer (`kafka_consumer`) only
supported data in InfluxDB line protocol.

Now, we are normalizing the parsing of various data formats across all
plugins that can support it. You will be able to identify a plugin that supports
different data formats by the presence of a `data_format` config option, for
example, in the Exec (`exec`) input plugin:

```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.
  ## Each data format has its own unique set of configuration options, read
  ## more about them here:
{'fraction_non_alphanumeric': 0.08631433187168244, 'fraction_numerical': 0.007846757442880221, 'mean_word_length': 4.840970350404312, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5211956', 'n_tokens_mistral': 1287, 'n_tokens_neox': 1198, 'n_words': 534}