Help with Reports

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
cliftondasilva
Posts: 5
Joined: Thu Oct 02, 2014 8:43 am

Help with Reports

Post by cliftondasilva »

Hey all,

Not sure if this was answered in another post. I'm trying to get an executive summary of all the disk spaced used on all our machine monitored by NAGIOS. Is there a plugin or a way to get an Executive Summary of Disk usage throughout all machines monitored by NAGIOS? I'm currently running Nagios XI 2014R2.7

Any help with getting this will be greatly appreciated!!! or pointing me to the right direction.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: Help with Reports

Post by jdalrymple »

Depends - we have our metrics component which can do a pretty good job of aggregating disk usage for certain service types, but not all. For example (today) we cannot add in disk space gathered using an SNMP check. It's basically just the stuff gathered using NRPE (Linux Server wizard) and NSCP (Windows Server wizard). If you used those wizards for everything, you should be able to get what you want.

If this doesn't suit your needs, the best answer I have to offer is that we're looking to expand the usefulness of that component in the future, but I know of no better way to achieve your goal today.
cliftondasilva
Posts: 5
Joined: Thu Oct 02, 2014 8:43 am

Re: Help with Reports

Post by cliftondasilva »

thanks for the update. I'm currently trying to run a script that will do this for us but haven't been successful yet.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Help with Reports

Post by scottwilkerson »

If all the checks have the same service_description, you can get them from the Backend API URL component

Admin -> Manage Components ->Backend API URL Component -> Edit

Select User

Copy URL for "Current Service Status"

Then, append "&service_description=<YOUR_SERVICE_DESCRIPTION>"

This will filter the XML down to just services that match your description
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Help with Reports

Post by gormank »

I tried that w/ wget and all I got back was authentication error in the saved file. Works fine manually though. I added &password=<correct password> but still no luck. Any hints?

Recent data is also in the DB and is easy to get to via script. I just made a cheesy subroutine in perl to run the sql but would look into DBI once I get the concept worked out.

# mysql
mysql> use nagios
mysql> select name1 Hostname, name2 'Service Name', current_state Status, status_update_time 'Check Time', perfdata 'Performance Data' from nagios_objects, nagios_servicestatus where object_id = service_object_id and is_active = 1 and name2 like 'FS_Win_Usage' order by name1, name2;

https://assets.nagios.com/downloads/nag ... _Model.pdf
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Help with Reports

Post by lmiltchev »

I tried that w/ wget and all I got back was authentication error in the saved file. Works fine manually though. I added &password=<correct password> but still no luck. Any hints?
Can you show us the command that you tried? Hide sensitive info.
Be sure to check out our Knowledgebase for helpful articles and solutions!
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Help with Reports

Post by gormank »

In a browser this works as you said:
https://host/nagiosxi/backend/?cmd=gets ... _Unix_Load

But using a browser defeats the purpose of automating things.
I tried with and without --no-check..., as http/https, and tried curl with the same result.

[root@txslm2mlnag001 services]# wget --no-check-certificate https://txslm2mlnag001/nagiosxi/backend ... _Unix_Load
[1] 13193
[2] 13194
[3] 13195
[root@txslm2mlnag001 services]# --2015-09-29 21:43:16-- https://txslm2mlnag001/nagiosxi/backend ... vicestatus
Resolving txslm2mlnag001... 10.133.134.84
Connecting to txslm2mlnag001|10.133.134.84|:443... connected.
WARNING: cannot verify txslm2mlnag001’s certificate, issued by “/C=--/ST=SomeState/L=SomeCity/O=SomeOrganization/OU=SomeOrganizationalUnit/CN=nagiosxi.verizon/emailAddress=[email protected]”:
Self-signed certificate encountered.
WARNING: certificate common name “nagiosxi.verizon” doesn't match requested host name “txslm2mlnag001”.
HTTP request sent, awaiting response... 200 OK
Length: 108 [text/xml]
Saving to: “index.html?cmd=getservicestatus”

100%[============================================================================================================================>] 108 --.-K/s in 0s

2015-09-29 21:43:17 (6.18 MB/s) - “index.html?cmd=getservicestatus” saved [108/108]


[1] Done wget --no-check-certificate https://txslm2mlnag001/nagiosxi/backend ... vicestatus
[2]- Done username=nagiosadmin
[3]+ Done ticket=-----


[root@txslm2mlnag001 services]# cat index.html\?cmd\=getservicestatus
<?xml version="1.0" encoding="utf-8"?>
<error>
<errormessage>Authentication Failure</errormessage>
</error>
jomann
Development Lead
Posts: 611
Joined: Mon Apr 22, 2013 10:06 am
Location: Nagios Enterprises

Re: Help with Reports

Post by jomann »

When you do the wget command you need to put the entire URL in quotes " "
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Help with Reports

Post by gormank »

You're right. That made it work.
Thanks!
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Help with Reports

Post by hsmith »

Is this one all right to mark resolved?
Former Nagios Employee.
me.
Locked