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.
Help with Reports
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: Help with Reports
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.
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
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
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
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
Re: Help with Reports
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
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
Re: Help with Reports
Can you show us the command that you tried? Hide sensitive info.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?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Help with Reports
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>
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>
Re: Help with Reports
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.
Re: Help with Reports
You're right. That made it work.
Thanks!
Thanks!