Closed smga3000 closed 2 months ago
@smga3000,
I believe the service you are talking to requires you to set the kafka consumer's version option to something higher than the default of 0.10.2.0 (the first version to support consumer groups). When I set version = "1.0.0"
I was able to connect and send messages:
2024-08-22T18:40:26Z D! [agent] Starting service inputs
2024-08-22T18:40:36Z D! [outputs.influxdb_v2] Wrote batch of 1000 metrics in 543.391813ms
2024-08-22T18:40:36Z D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2024-08-22T18:40:36Z D! [outputs.influxdb_v2] Wrote batch of 1000 metrics in 137.249748ms
2024-08-22T18:40:36Z D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
2024-08-22T18:40:37Z D! [outputs.influxdb_v2] Wrote batch of 115 metrics in 128.903235ms
2024-08-22T18:40:37Z D! [outputs.influxdb_v2] Buffer fullness: 0 / 10000 metrics
To summarize, for your host, we had two changes:
enable_tls = true
version = "1.0.0"
edit: I have updated the issue's configuration with what I got to work, minus credentials
That is working!
@smga3000,
Two other things I was going to point out, based on your data you could set the timestamp of the metrics by specifying the json_time_key
and json_time_format
options. I forget what the timestamp looked like, but this is an example:
json_time_key = "timestamp"
json_time_format = "2006-01-02T15:04:05Z"
If you give me an example timestamp I can give you a working example.
The other is setting the device name as a tag, I think it was called device:
tag_keys = ["device"]
That way influxdb indexes the tag!
the data looks like this: {"sensorId":"sensor-0","timestamp":1720474028903,"value":40.16614103770828} {"sensorId":"sensor-3","timestamp":1720474029292,"value":43.73939640442152}
Looks like unix millisecond timestamp:
tag_keys = ["sensorId"]
json_time_key = "timestamp"
json_time_format = "unix_ms"
I'm going to close this, but @smga3000 if anything else comes up, feel free to re-open or open another issue!
Relevant telegraf.conf
Logs from Telegraf
System info
telegraf 1.31.3
Docker
No response
Steps to reproduce
Expected behavior
connect successfullly
Actual behavior
not connecting with EOF
Additional info
No response