I have this script as a media script:
Whenever an event happens that requires an action to this media type, it'll be logged as "sent/ok" in event's data, but none of those echos to selfhealer.log file will not happen and I can't get the result of that ssh command.
I've even added an "exit 1" command at the top of this script, but zabbix still reports it `sent` and completely ok! I've tried to use a wrong script name in media type definition, and zabbix understood it and reported it correctly for "no such file or directory".
It seems zabbix is finding the script and it's path, but it is not executing it... The script's permission is 777 here.
Code:
#!/bin/bash
URL="${1}${2}"
echo $URL
echo $URL > /var/log/selfhealer.log
echo "FINE" >> /var/log/selfhealer.log
CMD="curl ${URL}"
ssh [email protected] '${CMD}'
I've even added an "exit 1" command at the top of this script, but zabbix still reports it `sent` and completely ok! I've tried to use a wrong script name in media type definition, and zabbix understood it and reported it correctly for "no such file or directory".
It seems zabbix is finding the script and it's path, but it is not executing it... The script's permission is 777 here.
Comment