我有一个docker compose文件:
influx:
image: influxdb:latest
container_name: influxdb
ports:
- "8083:8083"
- "8086:8086"
- "8090:8090"
telegraf:
image: telegraf:latest
container_name: telegraf
links:
- influx
volumes:
- ./telegraf.conf:/etc/telegraf/telegraf.conf:ro
grafana:
image: grafana/grafana:latest
container_name: grafana
ports:
- "3000:3000"
links:
- influx
我有一个telegraf conf文件,其中我以kafka主题为输入源
[[inputs.kafka_consumer]]
## topic(s) to consume
topics = ["telegraf"]
## an array of Zookeeper connection strings
zookeeper_peers = ["zookeeper:2181"]
## Zookeeper Chroot
zookeeper_chroot = ""
## the name of the consumer group
consumer_group = "telegraf_metrics_consumers"
## Offset (must be either "oldest" or "newest")
offset = "oldest"
## 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"
当我运行docker-compose up
时,telegraf容器无法启动。它给出以下错误:
Error parsing /etc/telegraf/telegraf.conf, line 1722: field corresponding to 'zookeeper_peers' is not defined in kafka_consumer.Kafka
但是,我已经在telegraf配置中定义了zookeeper_peers
。