Page 1 of 1

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

Posted: Tue Mar 05, 2019 5:24 pm
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.

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

Posted: Tue Mar 05, 2019 6:01 pm
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