We have a new install of Nagios XI 2014R1.2. It seems to be working well but we'd like it to be able to record and graph historical disk usage on our Windows servers.
I've Googled references to a couple different additional plugins to do that but the posts were quite old. What is the current recommended way to do this? Links to plugins and tech docs would be great, along with any "gotchas."
Thanks,
Todd Bowman
Best/Easiest way to graph disk usage?
- tylerhoadley
- Posts: 43
- Joined: Tue Jul 02, 2013 1:41 pm
Re: Best/Easiest way to graph disk usage?
there is many plugins or agents to use. NSClient++ has made very good development in release months with this plus other checks. One item I have seen to become very handy in recent versions is the ability to specific remain space left instead of a percentage remaining. when using big disks, 1% can be gigs of data left so thresholds and alerting becomes unreliable.
take a look here for 4.2.93
http://nsclient.org/nscp/downloads
install the client, and enable check_nrpe. once installed, open the nsclient.ini and nsclient-sample.ini
read the documentation too
http://nsclient.org/nscp/wiki
either allow args to execute with cmd or hard code them as an alias. (don't forget to stop and start the service to apply saved ini file configuration)
example from nagios server...
cd /usr/local/nagios/libexec/
./check_nrpe -u -H SERVERNAME -t 30 -c CheckDriveSize -a Drive=C: MinWarnFree=2G MinCritFree=26648M ShowAll=long
OK: C:: Total: 39.9GB - Used: 12.965GB - Free: 26.935GB|'C: free'=26GB;2;26;0;39 'C: free %'=67%;5;65;0;100
(notice this uses the size of free space remaining)
./check_nrpe -u -H SERVERNAME -t 30 -c CheckDriveSize -a Drive=C: MinWarnFree=2% MinCritFree=1% ShowAll
OK: C:: Total: 39.9GB - Used: 12.965GB - Free: 26.935GB|'C: free'=26GB;0;0;0;39 'C: free %'=67%;1;0;0;100
(notice this uses the percent of free space remaining)
For performance data, plugins or executed checks use the pipe '|' to tell nagios that everything pass this is perfdata. Pretty simple when scripting or creating one from scratch. in the above two examples, nsclient produces the perfdata after pipe so you will trend and graph this data for historical purposes and capacity planning.
Of course, wmi and snmp can do this too, however up until recent nsclient versions, this ability to define a hard code of remaining space hasn't been there from all different types of checks. so if you have big volumes that are getting full, but the percentage of space to actually space is not a proper threshold, go with this latest 4.2.93 client install and start creating disk checks this way.
the only down fall is that XI doesn't have a dedicated check_nrpe for windows wizard yet as this is the main agent for linux, but thats not to stay that you can't create the templates for these checks with the windows wizard then go to the ccm, and change the check cmd and args there... the wizard can still do the under the hood configuration, like check intervals, alerting, service/host groups configs etc. use your nagios server to test or the ccm to test your checks, then apply configuration and your on your way.
Cheers,
take a look here for 4.2.93
http://nsclient.org/nscp/downloads
install the client, and enable check_nrpe. once installed, open the nsclient.ini and nsclient-sample.ini
read the documentation too
http://nsclient.org/nscp/wiki
either allow args to execute with cmd or hard code them as an alias. (don't forget to stop and start the service to apply saved ini file configuration)
example from nagios server...
cd /usr/local/nagios/libexec/
./check_nrpe -u -H SERVERNAME -t 30 -c CheckDriveSize -a Drive=C: MinWarnFree=2G MinCritFree=26648M ShowAll=long
OK: C:: Total: 39.9GB - Used: 12.965GB - Free: 26.935GB|'C: free'=26GB;2;26;0;39 'C: free %'=67%;5;65;0;100
(notice this uses the size of free space remaining)
./check_nrpe -u -H SERVERNAME -t 30 -c CheckDriveSize -a Drive=C: MinWarnFree=2% MinCritFree=1% ShowAll
OK: C:: Total: 39.9GB - Used: 12.965GB - Free: 26.935GB|'C: free'=26GB;0;0;0;39 'C: free %'=67%;1;0;0;100
(notice this uses the percent of free space remaining)
For performance data, plugins or executed checks use the pipe '|' to tell nagios that everything pass this is perfdata. Pretty simple when scripting or creating one from scratch. in the above two examples, nsclient produces the perfdata after pipe so you will trend and graph this data for historical purposes and capacity planning.
Of course, wmi and snmp can do this too, however up until recent nsclient versions, this ability to define a hard code of remaining space hasn't been there from all different types of checks. so if you have big volumes that are getting full, but the percentage of space to actually space is not a proper threshold, go with this latest 4.2.93 client install and start creating disk checks this way.
the only down fall is that XI doesn't have a dedicated check_nrpe for windows wizard yet as this is the main agent for linux, but thats not to stay that you can't create the templates for these checks with the windows wizard then go to the ccm, and change the check cmd and args there... the wizard can still do the under the hood configuration, like check intervals, alerting, service/host groups configs etc. use your nagios server to test or the ccm to test your checks, then apply configuration and your on your way.
Cheers,
Re: Best/Easiest way to graph disk usage?
Is there a way I can configure Nagios to retain disk usage data so I don't have to load additional agents on my Windows servers? It would seem that since Nagios alerts on disk usage, there should be a way to have it save that data so it can be graphed over a period of time so I can do disk capacity planning. I don't need to save granular data, just general trending is fine. Maybe daily disk average, how much was in use at noon each day, something like that?
I'm a new Nagios user, so if this is obvious or way off base, feel free to let me know that.
Todd Bowman
I'm a new Nagios user, so if this is obvious or way off base, feel free to let me know that.
Todd Bowman
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Best/Easiest way to graph disk usage?
Awesome write-up tyler! I'd agree, the windows monitoring wizards would work well for your use case, you could also use the nrpe wizard which has an option for windows systems, the issue lies in how you have to configure NRPE checks in Nsclient++, it's not quite the same as standard linux NRPE commands, but that is decently documented on their site. The data should always be saved, unless you remove the RRD files. When performance data is returned to nagios it is processed and placed in RRD's, these RRD's are responsible for the majority of the graphs you see in XI.
Re: Best/Easiest way to graph disk usage?
OK, this is now working just dandy. I'm not sure what the issue was, we were in fact using the nslcinet++ with the NPRE as well. I went through these steps until I got it working and then spot-checked a few servers. Turns out they are all keeping graphs already. Very strange, as it was definitely not working at first when I posted. But now I have more options, so thank you and you can mark this as a success!
Thanks for the help.
Todd B.
Thanks for the help.
Todd B.