Has someone a script to check if asterisk is running?
Kind Regards,
Tom
Has someone a script to check if asterisk is running?
Kind Regards,
Tom
You mean something like this?
nagiosexchange.org/cgi-bin/p … 8.html;d=1
Yes indeed, but that file is corrupt.
There are a handful of asterisk scripts on nagiosexchange.
nagiosexchange.org/cgi-bin/p … 2.html;d=1
nagiosexchange.org/cgi-bin/p … 4.html;d=1
If you just want to know if the proc is running, write a simple shell script with a ps -ef and a grep, or use the check_proc plugin that comes with the nagios plugins package.
Most of the asterisk plugins on nagiosexchange are corrupt.
So i wrote a little script to test if the status of the service. Works also for me.
#/bin/sh
host="..."
service="asterisk"
t=/etc/init.d/$service status
if echo “$t” |grep -q running; then
echo "OK - $service service is running."
exit 0
else
echo "Critical - $service service is stopped."
exit 2
Thanks