SQL query that gets the contacts of a service and/or host?

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
riahc3
Posts: 79
Joined: Thu Apr 05, 2018 9:36 am

SQL query that gets the contacts of a service and/or host?

Post by riahc3 »

Hello

Is there a SQL query that I can run that gets all the standalone contacts (their email addresses) related to a host and/or service? It should be able to also retrieve contacts that are nested in contact groups that are associated with the host and/or service.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: SQL query that gets the contacts of a service and/or hos

Post by scottwilkerson »

Nagios Core by itself doesn't run any database.

It does have the following URL though that you can enumerate over objects like hostlist and servicelist

Code: Select all

/nagios/jsonquery.html
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked