I wrote a pretty simple external script to check SMTP status on a remote server.... Worked fine (returned 1 for service up) for a week till I rebooted the zabbix machine for software updates, now Zabbix shows 0 or no result from it, and keeps disabling the item.
script:
How do I go about troubleshooting this? If I run the script manually it returns a 1 as it should.
script:
Code:
(
echo "quit"
) | telnet xxx.xxx.xxx.xxx 25 2>/dev/null | grep 220 > /dev/null 2>&1
if [ "$?" -ne "1" ]; then #Ok
echo "1"
else #Connection failure
echo "0"
fi
date >> /etc/zabbix/externalscripts/SMTPcheck.log
Or a single working example would have helped, as well.
Comment