Output Plugin with different interval?

Hi all, In appears we can set different intervals for each input plugin. Can we set output intervals or some sort? Or maybe an example how we can control that in Go code? For example, all our data will be collected very 20s, but for output to Kafka, we only want it for every 1 minute. How would this be possible? Do the plugins keep a state internal in memroy while running? Thank you!

1 Like

@DennisBr Are you asking about the flush_interval?

Hey Jack!
No, what I mean is, We want to send data every 20s to Influx, but say, every 60s to kafka output plugin. I suppose this is possible via kafka output plugin modifications? The question is, how? So to summarize, kafka output plugin would get 1/3 of the data points we send to influx directly.

Thanks!

@DennisBr You would need to run 2 separate telegraf instances to accomplish that.

Hadn’t thought about that, but yeah not ideal. What if we put an internal timer in the output plugin? So we’d ignore 2 out of the 3 data points in the output plugin? Not ideal, but it’s something. Otherwise we may just go down the 1 minute resolution. Thanks for the quick responses!

@DennisBr You are more than welcome to make a PR on telegraf to add this feature, but its not on our priority list. Running 2 instances is the way to do this.