Hi All,
I need Nagios Plugin for to check service statuses of the Linux System.
Please let me know where do I get this plugin?
I done with shell script. But not working with nagios when nagios calling.
This is the script I wrote:
#!/bin/sh
host="$1"
service="$2"
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
fi
----------------------------------------------------------------------------------------
Here, above code working fine but /etc/init.d/$service status is not executing when nagios calling. means for example /etc/init.d/acpid status
nagios unable to execute this command.
how do i execute this command from nagios?
Is there any other way to check service statuses of linux?
Please help!