Hi
Iam using nagios network application when i trying to found service status value.But finally it shown invalid status value in nagios application. I wrote a code as mentioned below
But as mentioned above code running in command prompt on fedora linux,it shown a correct service status value.But when i trying from nagios.It shows a invalid status value.
If any plugins for checking a service status value or any modification. Please suggest to me on this issue.
Iam using nagios network application when i trying to found service status value.But finally it shown invalid status value in nagios application. I wrote a code as mentioned below
Code:
#!/bin/sh host="$1" service="$2" /etc/init.d/$service status | while read t echo $t do if [[ "$t" == *running* ]] then echo "Service is running " else echo "Service is stopped" fi done
If any plugins for checking a service status value or any modification. Please suggest to me on this issue.
Comment