Ad Widget

Collapse

simple question- how to delay first item execution in 5 min

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yogi
    Junior Member
    • Mar 2016
    • 26

    #1

    simple question- how to delay first item execution in 5 min

    Hi,
    I have LLD with delay of 60 sec, all i want to do is to delay one of my item prototype execution (only for the first time), for example:
    I have item-a in the LLD (with delay of 60 sec):
    What happen now is: the item execute at time: 0 , 1m , 2m , 3m ...
    What i want is to delay the first execution in 5 min (so the item will execute at the first time after 5 min) like at time: 5m, 6m, 7m ...
    Thanks
  • ovas
    Senior Member
    Zabbix Certified Trainer
    Zabbix Certified SpecialistZabbix Certified Professional
    • Apr 2017
    • 138

    #2
    Hello yogi!

    I guess it is possible to make a scheduling interval that would meet your requirements, but that would be hell of an expression: https://www.zabbix.com/documentation...ling_intervals
    It would force you to tie to specific days of week/month as well, therefore it will lack scalability.

    On the other hand, you can script your way in creation of of both discovery and prototypes using Zabbix API. The algorithm would be:
    1) discoveryrule.create - in API call
    2) zabbix_server -R config_cache_reload - in shell terminal
    3) sleep 300
    4) <item/trigger/host/graph>prototype.create - in API call
    5) zabbix_server -R config_cache_reload - in shell terminal

    Again, this may give only approximate results, it will most probably not run within directly 5 minutes, but with an observational error of +-60 seconds if discovery is run by Zabbix server itself.

    Comment

    • yogi
      Junior Member
      • Mar 2016
      • 26

      #3
      Thanks ovas!

      Comment

      Working...