Page 1 of 1

Nagios XI- 5.5.8

Posted: Wed Jan 09, 2019 10:17 am
by dfmco
IS there a way to generate a report showing everything being monitored i.e hosts\interfaces etc

Re: Nagios XI- 5.5.8

Posted: Wed Jan 09, 2019 1:51 pm
by npolovenko
@dfmco, There're a few ways to see all the objects. One of them is to use the JSON Query Generator. Open the following link in the browser:

http://192.168.3.3/nagios/jsonquery.html
*Replace 192.168.3.3 with your XI server IP address.

Then choose CGI -> Object JSON CGI
Query -> servicelist or hostlist

Another way is to use the REST API queries in XI.
In XI web interface go to the Help menu, in the left column click on Objects Reference. Copy and use the following queries:
GET objects/host
GET objects/service

Re: Nagios XI- 5.5.8

Posted: Thu Jan 10, 2019 3:41 pm
by dfmco
Thank you very much. I will give it a try

Re: Nagios XI- 5.5.8

Posted: Thu Jan 10, 2019 3:48 pm
by scottwilkerson
dfmco wrote:Thank you very much. I will give it a try
Let us know how it works out

Re: Nagios XI- 5.5.8

Posted: Thu Jan 10, 2019 4:31 pm
by SteveBeauchemin
I always need to see stuff from a distance. Like... everything at once. Like ALL my running tests and what they do.

In Nagios you basically have to drill in to see things one at a time. Because of this, which is what it is... I took it upon myself a while ago to put something together that lets me see things in a bigger picture.

I am attaching a zip file with some code that you can figure out how to use. Change it to what works for you.

Basically I use perl to do a Database query, then walk through the data and make web pages. I add the web pages to Nagios Tools menu. On the web pages, one for Hosts, one for Services, you can see All your monitors, and search for stuff.

Play with the files I am attaching and maybe use them as a way to learn more about the underside of Nagios. There are many ways to get data. The trick is finding a way to display it.

I use cron to run them once and hour. I use a shell script to fill in locations and environment data which then runs the perl file. You may want to do it differently. Mainly, there is a sql query, and a way to take the data and make a web page. Simple.

My people use this all the time to see what they are responsible for.

Good Luck - see attached - have fun...

Steve B

Re: Nagios XI- 5.5.8

Posted: Thu Jan 10, 2019 4:48 pm
by scottwilkerson
Thanks for sharing @SteveBeauchemin!