Page 1 of 1

Looking for Nagios Mysql Query with Contact Names

Posted: Wed Aug 24, 2016 11:22 am
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

Re: Looking for Nagios Mysql Query with Contact Names

Posted: Wed Aug 24, 2016 11:27 am
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.

Re: Looking for Nagios Mysql Query with Contact Names

Posted: Wed Aug 24, 2016 11:34 am
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.

Re: Looking for Nagios Mysql Query with Contact Names

Posted: Wed Aug 24, 2016 12:04 pm
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

Re: Looking for Nagios Mysql Query with Contact Names

Posted: Wed Aug 24, 2016 12:14 pm
by mrochelle
Outstanding! That works...Thank You! :D

Re: Looking for Nagios Mysql Query with Contact Names

Posted: Wed Aug 24, 2016 12:17 pm
by ssax
No problem, are we okay to mark this as resolved and lock the topic?

Re: Looking for Nagios Mysql Query with Contact Names

Posted: Wed Aug 24, 2016 12:19 pm
by mrochelle
Yes, definitely.