Hi All,

I need Nagios plugin for to check service statuses of linux system.

Please let me know where do I get this plugin?

I done like with shell script. But not working with nagios monitoring system.



Code:
#!/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



when Nagios executing this shell script not executing `/etc/init.d/$service 
status` command. nothing storing in $t. then result always showing "Critical - 
$service service is stopped.

But which working fine when I am executing this script from terminal as root 
user.

whet is the problem with this?
How do I proceed?

Please help!

------------------------
Ramesh




-------------------- m2f --------------------

Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=5742#5742

-------------------- m2f --------------------



_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to