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
Document list of xi host/ services
-
- Posts: 4380
- Joined: Mon Jun 14, 2010 10:21 am
Re: Document list of xi host/ services
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.
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.
-
- Posts: 120
- Joined: Tue Aug 21, 2012 9:29 am
Re: Document list of xi host/ services
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
But I find the Core interface has more relevant info. Thanks so much
-
- Posts: 4380
- Joined: Mon Jun 14, 2010 10:21 am