Page 1 of 1

Check host and service notification contacts

Posted: Wed Mar 18, 2015 8:04 am
by jkinning
Is there a quick and easy method to check the notification contacts and/or contact groups for hosts and services? I want to make sure all hosts and services have the proper contacts/contactgroups assigned for notifications.

Re: Check host and service notification contacts

Posted: Wed Mar 18, 2015 8:49 am
by tmcdonald
If you run this:

Code: Select all

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
it will tell you if any hosts or services are missing contacts. However it is not possible for Nagios to tell you if you have the wrong contact assigned since our software doesn't have any knowledge of your notification needs.

You can look under /usr/local/nagios/var/objects.cache for a compiled list of all the objects in your setup, but it might take some parsing to grab the host/service name and the contacts.

Re: Check host and service notification contacts

Posted: Wed Mar 18, 2015 1:49 pm
by jkinning
Sorry, I might not have been real clear.

I want to check and see what contact or contactgroups are assigned to each host, service or hostgroup. Is that possible?

Re: Check host and service notification contacts

Posted: Wed Mar 18, 2015 2:23 pm
by lmiltchev
You can do this easily via the Bulk Modifications Tool, which is part of Nagios XI Enterprise Edition. Go to CCM->Bulk Modifications->Remove Contact (or Remove Contact Group)->select a contact/contactgroup from the "Contact"/"Contact Group" drop-down menu and click on "Find Relationships". After you are done, click on "Cancel".

Re: Check host and service notification contacts

Posted: Thu Mar 19, 2015 6:32 am
by jkinning
I guess there is no "report" or means in which to export this information?

Re: Check host and service notification contacts

Posted: Thu Mar 19, 2015 2:21 pm
by tgriep
No, there isn't a report you that you can get this information easily.
This file, /usr/local/nagios/var/objects.cache has all of the information but it would have to be parsed to make it easier to get what you want.

Re: Check host and service notification contacts

Posted: Thu Mar 19, 2015 2:23 pm
by lmiltchev
In addition to what tgriep said:
I guess there is no "report" or means in which to export this information?
Not at this time but we have an internal feature request in place about adding this functionality (task id=761). I don't have an ETA, so I am not sure when/if this will be implemented. One more thing, I almost forgot, you don't even need Enterprise to view the relationships. You can go to CCM->Contacts/Contact Groups->and click on the "Relationship Info" button (the blue circle with white "i" in it).