Hi
We are using a shell script to do a series of checks in a trigger. This script accesses remote network services and sometimes (a few each day) it stalls and the execution returns a timeout.
Is there any way to set a defined number of times the script fails or times out before an email is sent? We can assume a couple of consecutive failures before sending out an alert.
Current trigger expresion is as follows:
({host:system.run[/etc/zabbix/scripts/shellscript.sh].str(OK)})=0
I have unsucesfully tried to modify it so it checked the previous value like this:
(({host:system.run[/etc/zabbix/scripts/shellscript.sh].str(OK)})=0)&(({host:system.run[/etc/zabbix/scripts/shellscript.sh].prev(0)})#OK)
The script returns "OK" if everything is OK and a variable output iin case it fails. Currently we are getting alert mails only because the script times out.
Can someone give me a hint on how to check previous values and prevent the alert message to be sent when script times out?
Thanks
Javier
We are using a shell script to do a series of checks in a trigger. This script accesses remote network services and sometimes (a few each day) it stalls and the execution returns a timeout.
Is there any way to set a defined number of times the script fails or times out before an email is sent? We can assume a couple of consecutive failures before sending out an alert.
Current trigger expresion is as follows:
({host:system.run[/etc/zabbix/scripts/shellscript.sh].str(OK)})=0
I have unsucesfully tried to modify it so it checked the previous value like this:
(({host:system.run[/etc/zabbix/scripts/shellscript.sh].str(OK)})=0)&(({host:system.run[/etc/zabbix/scripts/shellscript.sh].prev(0)})#OK)
The script returns "OK" if everything is OK and a variable output iin case it fails. Currently we are getting alert mails only because the script times out.
Can someone give me a hint on how to check previous values and prevent the alert message to be sent when script times out?
Thanks
Javier
Comment