How to get the notification status of a host's service?
Posted: Thu Nov 29, 2012 1:16 pm
I know how to enable/disable notification alerts for a particular service. Now, how do I get the status to make sure it's been disabled or enabled?
I have the following which seems to work but wasn't sure if there was a "simpler" way.
I have the following which seems to work but wasn't sure if there was a "simpler" way.
Code: Select all
curl -s "http://mydomain.com/nagios/cgi-bin/extinfo.cgi?type=2&host=myserver&service=SSH" -u "nagios:nagios" | grep Notifications | egrep -oh "DISABLED|ENABLED" | tail -n1