Check host and service notification contacts

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Check host and service notification contacts

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Check host and service notification contacts

Post 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.
Former Nagios employee
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Re: Check host and service notification contacts

Post 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?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Check host and service notification contacts

Post 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".
Be sure to check out our Knowledgebase for helpful articles and solutions!
jkinning
Posts: 747
Joined: Wed Oct 09, 2013 2:54 pm

Re: Check host and service notification contacts

Post by jkinning »

I guess there is no "report" or means in which to export this information?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Check host and service notification contacts

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Check host and service notification contacts

Post 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).
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked