For our stand by shift I have created a bash script that will send out an SMS to the defined cell phone. The script itself works after a bit tweaking, including error logging, however I am a bit concerned by the action status in Zabbix itself.
The SMSs are send by creating an XML file that is fed with curl to an internet SMS sender using https. On our test service this connection is blocked by the firewall (as it should), however Zabbix itself tells us that is has been send. In the script I exit with an error code (exit 100) which is intended to let Zabbix know the alerting was a failure, but somehow it seems that Zabbix isn't picking up on this exit code: if the script has been run and finished it doesn't bother about the exit code. Is there a way for me to set this up so that we can see in the GUI the alerting has been failed?
We are using Zabbix 2.2.1 on RHEL 6.
Screenshots of the GUI and configuration:



The SMSs are send by creating an XML file that is fed with curl to an internet SMS sender using https. On our test service this connection is blocked by the firewall (as it should), however Zabbix itself tells us that is has been send. In the script I exit with an error code (exit 100) which is intended to let Zabbix know the alerting was a failure, but somehow it seems that Zabbix isn't picking up on this exit code: if the script has been run and finished it doesn't bother about the exit code. Is there a way for me to set this up so that we can see in the GUI the alerting has been failed?
We are using Zabbix 2.2.1 on RHEL 6.
Screenshots of the GUI and configuration:



Comment