nagios: check_triplex_cctv

jjest@house-nagios:~$ cat /usr/local/nagios/libexec/check_triplex_cctv
#!/bin/bash
host=$1
if [[ ! -z $host ]]; then
ssh nagios@triplex.duckdns.org “ping -c 2 $host” > /dev/null
resultant=$?
if [[ $resultant == “0” ]]; then
echo “OK – $host”
exit 0
else
echo “ERROR – $host”
exit 1
fi
else
echo “ERROR – No host value given”
exit 1
fi

Leave a Reply