Page 1 of 1

Document list of XI host/ services

Posted: Mon Dec 10, 2012 11:28 am
by westernuniv
I would like to have a report with all the host/services monitored in Nagios XI which includes Host, host group, service Des, service group, checks, contact, contact group, notification/escalation info etc.

I tried to get it from nagiosql backend DB tbl_host and tbl_serivce and I couldn’t get the host/service/contact group info for the specific host from the table. Is there any nagiosql db structure doc available to understand the relationship among those nagiosql tables? Or is there any other way to get listed all the info

Thanks

Re: Document list of XI host/ services

Posted: Mon Dec 10, 2012 11:42 am
by mguthrie
Creating that report will be tricky, because at runtime Nagios compiles the configs to be hostgroup->host relationships. You could access all of this information from XI's backend API, but it would take separate calls to get all of the data...

http://yourserver/nagiosxi/backend/?cmd=gethosts
http://yourserver/nagiosxi/backend/?cmd=getservices
http://yourserver/nagiosxi/backend/?cmd ... oupmembers
http://yourserver/nagiosxi/backend/?cmd ... oupmembers

The problem with the nagiosql database is that it won't reflect template relationships.

The closest pre-built thing there is is actually in the Core interface, http://yourserver/nagios -> Configuration. This will give you a table view of the compiled configuration.

Re: Document list of XI host/ services

Posted: Mon Dec 10, 2012 11:53 am
by westernuniv
I did try the backend API, this is all complete lists of host/host groups etc , there is no relationship.
But I find the Core interface has more relevant info. Thanks so much

Re: Document list of XI host/ services

Posted: Mon Dec 10, 2012 12:01 pm
by mguthrie
You bet!