Ad Widget

Collapse

Executing the trigger after the script finishes running.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Danio9004
    Junior Member
    • Sep 2023
    • 13

    #1

    Executing the trigger after the script finishes running.

    I have a trigger defined that runs every 5 minutes. Previously, I run a script in crontab that saves the result to a file. The script runs every 4 minutes. Sometimes it happens that the script takes more than a minute to execute and overlaps with the execution of the trigger. Therefore the file is empty. Is there any simple way to make the trigger execute after the script ends?
    I can increase the interval, but eventually there will be a moment when the trigger and the script will overlap temporarily.​
    Zabbix version 6.0
  • dimir
    Zabbix developer
    • Apr 2011
    • 1080

    #2
    First of all, per-item timeout with a 10 minutes limit is available in 7.0.0alpha5: https://support.zabbix.com/browse/ZBXNEXT-1096

    Secondly, I'm not sure why you need something complex like you described because in Zabbix a trigger is commonly recalculated when a value is received. So I'm not sure how you have your setup but I would use a Trapper item, then your script would feed it with values as soon as available and a trigger would be processed on receiving every new value.

    Comment

    Working...