I have a pretty simple problem that I don’t know how to handle.
I use telegraf to subscribe to matt-topics, however they are being published way too often (and I cannot change that)
This results in way too many metrics in my InfluxDB. Setting up “interval” in the [agent] section does not seem to change anything… What is the best way to handle this?
Thank you very much!
@hermann4 MQTT is a so called “Service plugin” or “listener” where the data-collection is event-based and not controlled by Telegraf. Thus the interval does not have any meaning for those plugins usually.
You could also subsequently reduce the amount of data in influx by having a short retention period for the original data (like a few hours) and creating a second reduced dataset with longer retention period via continuous queries.
Thank you very much for your answers, until now I didn’t know that in some plugins in the interval is not really doing anything. I managed to write a small program in python which I can use with the execd plugin, and there I can configure how often the mqtt topics are being handed over to telegraf.
@hermann4 huh? Why didn’t you use the final aggregator that is doing exactly what you want, it gives the last record in a user-specified period. This is the interval you are looking for… Anyway, glad you found a way…
I‘ll check. Do you know how it handles the different topics that are being emitted? In the documentation they are talking about „contagious series“, but I am not sure whether they distinguish between the different topics of one host…