Page 1 of 1

List of monitored hosts

Posted: Wed Sep 11, 2013 11:17 am
by BanditBBS
I remember seeing a forums post before about someone wanting a list to export of all monitored hosts. At the time I did not chime in(I don't think I did) as I didn't need that feature. Well, guess what! I know it isn't a current feature, are features locked in for the next major release yet? if so, I guess I'll try and write my first XI Component....gulp!

Is there any documentation for writing components yet, or am I just going to open one and play around? Also, is a custom component the proper route I should take?

Thanks!

Re: List of monitored hosts

Posted: Wed Sep 11, 2013 11:21 am
by abrist
The Backend API can give you and XML file of all hosts:

Code: Select all

http://<ip of XI sever>/nagiosxi/backend/?cmd=gethosts&brevity=3

Re: List of monitored hosts

Posted: Wed Sep 11, 2013 11:26 am
by BanditBBS
Awesome, that works for me. Save the xml and import into Excel and it looks great!

Wow, abrist gave me good news....is the world ending?

Re: List of monitored hosts

Posted: Wed Sep 11, 2013 11:47 am
by abrist
BanditBBS wrote:Wow, abrist gave me good news....is the world ending?
hahaha - I am not always the harbinger of doom. But you should withhold judgement as learning about the backend api will just lead to more ideas which lead to more development, etc. At some point in this process I am sure I will bear some more ill tidings.
Eric (our core dev) and myself will be giving a presentation on the backend api in XI at the world conference. You should check it out. In the meantime, here is a doc that covers the basics:
http://assets.nagios.com/downloads/nagi ... nd_API.pdf