Is there a way to get a complete list in nagios of what contact group is assigned to a host?
From what I can see the problem overview would show the host/service and who gets alerted based on contact group.
If you look up the specific contact group, it only shows the group members, not the host/service association.
Hosts and services as they correlate to contact groups
Re: Hosts and services as they correlate to contact groups
The following mysql query will show the running hosts and the contact_groups that are assigned to them.
Run it as root and it will output a table that you can use to get that information.
Run it as root and it will output a table that you can use to get that information.
Code: Select all
/usr/bin/mysql -u root -pnagiosxi -e 'SELECT nagios.nagios_hosts.host_object_id,nagios.nagios_host_contactgroups.host_id,nagios.nagios_host_contactgroups.contactgroup_object_id,nagios.nagios_contactgroups.contactgroup_object_id,nagios.nagios_hosts.alias,nagios_hosts.display_name,nagios_contactgroups.alias FROM ((nagios.nagios_hosts INNER JOIN nagios.nagios_host_contactgroups ON nagios.nagios_hosts.host_id = nagios.nagios_host_contactgroups.host_id) INNER JOIN nagios.nagios_contactgroups ON nagios.nagios_host_contactgroups.contactgroup_object_id = nagios.nagios_contactgroups.contactgroup_object_id);'Be sure to check out our Knowledgebase for helpful articles and solutions!