add new consumer related information to readme.md

add new consumer related information to readme.md
This commit is contained in:
Kirk Young
2016-07-27 10:07:54 -07:00
parent b6926c36e8
commit 97fcfc0e0a
3 changed files with 52 additions and 5 deletions

View File

@@ -6,11 +6,15 @@ line protocol. [Consumer Group](http://godoc.org/github.com/wvanbergen/kafka/con
is used to talk to the Kafka cluster so multiple instances of telegraf can read
from the same topic in parallel.
## Configuration
Now supports kafka new consumer (version 0.9+) with TLS
## Configuration[0.8]
```toml
# Read metrics from Kafka topic(s)
[[inputs.kafka_consumer]]
## is new consumer?
new_consumer = false
## topic(s) to consume
topics = ["telegraf"]
## an array of Zookeeper connection strings
@@ -30,6 +34,41 @@ from the same topic in parallel.
data_format = "influx"
```
## Configuration[0.9+]
```toml
# Read metrics from Kafka topic(s)
[[inputs.kafka_consumer]]
## is new consumer?
new_consumer = true
## topic(s) to consume
topics = ["telegraf"]
## an array of kafka 0.9+ brokers
broker_list = ["localhost:9092"]
## the name of the consumer group
consumer_group = "telegraf_kafka_consumer_group"
## Offset (must be either "oldest" or "newest")
offset = "oldest"
## Optional SSL Config
ssl_ca = "/etc/telegraf/ca.pem"
ssl_cert = "/etc/telegraf/cert.pem"
ssl_key = "/etc/telegraf/cert.key"
## Use SSL but skip chain & host verification
insecure_skip_verify = false
## 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
data_format = "influx"
```
## Testing
Running integration tests requires running Zookeeper & Kafka. See Makefile

View File

@@ -72,7 +72,7 @@ type Kafka struct {
var sampleConfig = `
## is new consumer?
new_consumer = true
new_consumer = false
## topic(s) to consume
topics = ["telegraf"]
## an array of Zookeeper connection strings