Ad Widget

Collapse

Scheduled intervals

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Zablab
    Junior Member
    • Jan 2022
    • 28

    #1

    Scheduled intervals

    I'm wanting to use Zabbix to schedule & execute reboots since WSUS and GPO is a convoluted dumpster fire, but having an issue with intervals.

    Per documentation it seems we can schedule intervals in this case I'd like the item to kick off once a month, and I see there's a scheduling option to configure this.


    However it seems Zabbix requires a value for update interval, and if I set it to "0" or anything besides a value within a 24 hour window, it essentially kicks off the item and thus the reboot within that 24 hours.

    Is there a way to ensure the item only executes during the custom interval, in this case something like: md25-31wd1h12m00

    Thanks!,


  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #2
    https://www.zabbix.com/documentation...fig/items/item says:

    Note: The update interval can only be set to '0' if custom intervals exist with a non-zero value. If set to '0', and a custom interval (flexible or scheduled) exists with a non-zero value, the item will be polled during the custom interval duration.
    Note that the first item poll after the item became active or after update interval change might occur earlier than the configured value.
    New items will be checked within 60 seconds of their creation, unless they have Scheduling or Flexible update interval and the Update interval is set to 0.​
    Based on that I would set update interval to 0. What did you mean by saying "it essentially kicks off the item and thus the reboot within that 24 hours"? (Edit: I guess you meant the bolded part)

    Markku

    Comment


    • Zablab
      Zablab commented
      Editing a comment
      It seems the Update interval requires a value. The max value for Update interval is 24 hours up to 1 week I think - so by inputting anything other than 0 the item (in this case a system.run) executes.

      I only want it to execute on the Custom interval period, in this case md25-31wd1h12m00, which to my understanding would mean "any monday, between the 25th and 31st of the month, at 12:00

      However, when I configure the Update interval with 0 along with Custom interval, nothing happens. So I wanted to verify the behavior of the Update interval value before I spend more time on this.

      So short version is, if I set the Update interval to 0, will it fall back to the Custom interval period?
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #3
    If set to '0', and a custom interval (flexible or scheduled) exists with a non-zero value, the item will be polled during the custom interval duration.
    If you see it doesn't behave like that, maybe you should open a bug report on support.zabbix.com.

    Markku

    Comment


    • Zablab
      Zablab commented
      Editing a comment
      Appreciate the sanity check, based on my reading it lines up with what you've posted, that's the desired outcome I was expecting.

      I'll do a bit more testing to verify it's not me, it seems it should work.

      Thanks!

      Update: It was indeed an issue with my script, once resolved I can see the item executes based on the Custom interval. (With Update interval set to 0)
      Last edited by Zablab; 28-11-2022, 23:19.
Working...