Plz Look at my telegraf config

hi.
First, I’m Korean so I can’t speak English well! Please understand me even if I’m rude…:slight_smile:

i want to make telegraf input from my kafka broker! and save into influxdb. i don’t have error.

but There’s no measure I’ve named. :frowning: please look at my telegraf config.

[agent]
interval = “10s”
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = “0s”
flush_interval = “10s”
flush_jitter = “0s”
precision = “s”
hostname = “”
omit_hostname = false
###############################################################################

OUTPUT PLUGINS

###############################################################################
[[outputs.influxdb]]
urls = [“http://127.0.0.1:8086”]
database = “telegraf”
skip_database_creation = true
retention_policy = “cy”
write_consistency = “any”
timeout = “5s”
content_encoding = “identity”
influx_uint_support = false

###############################################################################

INPUT PLUGINS

###############################################################################
[[inputs.kafka_consumer]]
brokers = [“192.168.0.200:9092”]
topics = [“abcc”]
max_message_len = 1000000
name_override = “mean1”
tag_keys = [“subject”]
data_format = “json”
data_type = “string”

this is my telegraf log!
cybang@ubuntu:/usr/bin$ sudo ./telegraf -config /etc/telegraf/telegraf.conf
2019-11-12T13:28:24Z I! Starting Telegraf 1.12.4
2019-11-12T13:28:24Z I! Loaded inputs: kernel processes swap cpu diskio system kafka_consumer disk mem
2019-11-12T13:28:24Z I! Loaded aggregators:
2019-11-12T13:28:24Z I! Loaded processors:
2019-11-12T13:28:24Z I! Loaded outputs: influxdb
2019-11-12T13:28:24Z I! Tags enabled: host=ubuntu
2019-11-12T13:28:24Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:“ubuntu”, Flush Interval:10s

this is command and result form my influx

show measurements
name: measurements
name


cpu
disk
diskio
kafka_consumer
kernel
mem
processes
swap
system

Anyong Hashimnikka @cybang,
Welcome! Thanks for your question.
This is strange.
Have you tried setting debug=true on your telegraf config?

It looks like your data is in the measurement kafka_consumer
have you checked to see if your data is in that measurement?

I’m not sure why your name_override = "mean1" isn’t working.

oh! thank you for your consideration!! AnyoungHashimnikka too!!

Now I checked your message and changed it to debug = true

this is kafka_consumer measurement!

select * from kafka_consumer
name: kafka_consumer
time counts host
1573557340238322887 1 ubuntu
1573557340238334081 1 ubuntu
1573557340239005426 1 ubuntu
1573557340239015021 1 ubuntu

and This is the only log that float.
2019-11-12T23:19:50Z D! [outputs.influxdb] Buffer fullness: 20 / 10000 metrics
2019-11-12T23:20:00Z D! [outputs.influxdb] Wrote batch of 29 metrics in 2.923876ms
2019-11-12T23:20:00Z D! [outputs.influxdb] Buffer fullness: 24 / 10000 metrics

It’s repeated.

my kafka consumer and producer is working very well!

thank you for your help!

What do the messages in your Kafka topic look like, can you paste an example message?