List Hosts/Services using Individual Contacts for alerts?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

List Hosts/Services using Individual Contacts for alerts?

Post by TBT »

We tend to use Contact Groups to send alert notifications, however, I've discovered a few Hosts/Services where other Administrators have been using Other Individual Contacts. I'm looking for a suggestion on how to list all Hosts/Services that are using Individual Contacts for notifications?
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: List Hosts/Services using Individual Contacts for alerts

Post by scottwilkerson »

I believe the below 2 queries should get you the info you need from the nagiosql database

Code: Select all

mysql -pnagiosxi nagiosql
Hosts

Code: Select all

SELECT host_name
FROM tbl_contact, tbl_host, tbl_lnkHostToContact
WHERE tbl_host.id =  tbl_lnkHostToContact.idMaster
GROUP BY host_name
Services

Code: Select all

SELECT tbl_host.host_name, service_description
FROM tbl_contact, tbl_host, tbl_service, tbl_lnkServiceToContact, tbl_lnkServiceToHost
WHERE tbl_service.id =  tbl_lnkServiceToHost.idMaster
AND tbl_host.id =  tbl_lnkServiceToHost.idSlave
AND tbl_service.id =  tbl_lnkServiceToContact.idMaster
GROUP BY tbl_host.host_name, service_description
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked