Looking for Nagios Mysql Query with Contact Names

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
mrochelle
Posts: 238
Joined: Fri May 04, 2012 11:20 am
Location: Heart of America

Looking for Nagios Mysql Query with Contact Names

Post by mrochelle »

I'm looking for a mysql query to pull basic monitoring details, ( Host, Service, Notification Contact ) for each service and host monitor. If anyone has something close, I would appreciate it.
Thanks,
Marcus
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Looking for Nagios Mysql Query with Contact Names

Post by tmcdonald »

I wouldn't have anything off-hand since the database is so relational, but the REST API in XI 5 should be able to do what you want. Have you tried that? All the info is under the Help menu.
Former Nagios employee
User avatar
mrochelle
Posts: 238
Joined: Fri May 04, 2012 11:20 am
Location: Heart of America

Re: Looking for Nagios Mysql Query with Contact Names

Post by mrochelle »

Yes, I spent some time reviewing the REST API but did not find a query that linked the monitor detail to the configured notification contacts for the monitor.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Looking for Nagios Mysql Query with Contact Names

Post by ssax »

I don't have a SQL query for you but you should be able to get the information from this page:

Code: Select all

http://YOURXISERVER/nagios/cgi-bin/config.cgi
Let us know if that works for you.


Thank you
User avatar
mrochelle
Posts: 238
Joined: Fri May 04, 2012 11:20 am
Location: Heart of America

Re: Looking for Nagios Mysql Query with Contact Names

Post by mrochelle »

Outstanding! That works...Thank You! :D
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Looking for Nagios Mysql Query with Contact Names

Post by ssax »

No problem, are we okay to mark this as resolved and lock the topic?
User avatar
mrochelle
Posts: 238
Joined: Fri May 04, 2012 11:20 am
Location: Heart of America

Re: Looking for Nagios Mysql Query with Contact Names

Post by mrochelle »

Yes, definitely.
Locked