Trigger input on startup as well as long interval

I have written an input.exec plugin to fetch the kernel version of the server running telegraf. This works very fine and with ‘interval = “2h”’ it doesn’t clog my buckets.

After a kernel update I want to get the new version in my dashboard immediately. So I looked for a startup = true parameter, which doesn’t exist…

I saw ticket Feature Request: Allow collecting and sending metrics immediately on start · Issue #7293 · influxdata/telegraf · GitHub and it seems that the discussion stopped in 2021…

Is there any way to solve this dilemma without sending the data every 10 sec?

thanks Philipp

I tried the suggestion of ‘round_interval = false’ in Gather metrics immediately upon startup · Issue #15414 · influxdata/telegraf · GitHub and this solved the issue for me.

There’s also the --once command argument which does just 1 collection and flush cycle and then exits.