Interval Setting in http_poller is invalid

I am trying to use http_poller plugin to get data at 30 sec internval however its giving me an erorr ""The setting interval in plugin http_poller is obsolete and is no longer available. The interval options is obsolete." i am using "schedule => { cron => "* * * * * UTC"}" but how do i set the interval ?

I cannot test it, but I believe that you want

schedule => { cron => "*/30 * * * * UTC"}

The minimum you can do with cron is 1 min.
*/30 * * * * will run every 30 minutes..

I find this url always helpful with cron settings.
https://crontab.guru/#0/30_*_*_*_*

That didnt seems to work either i tried schedule => { cron => "0,30 * * * UTC"} but that gave me and error as well.

First off, that is a incorrect syntax, it should be 0/30 * * * * but then it will run every 30 minutes. Using cron you cannot poll faster then every minute.

Looking at the documents you can use

{ "every" ⇒ "30s" }

That should be supported according to the documents.

0/30 came up as invalid as well

Yes indeed, I was wrong about that. However I have tested

schedule => { every => "30s" }

as pjanzen suggested and that does work.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.