Page 1 of 1

Deploy Nagios to monitor servers for Low Disk in Enterprise

Posted: Mon Jul 24, 2017 4:55 pm
by tmattingly
Is there a non-agent method that Nagios can monitor and alert on low disk space on Windows Servers (2003/2008/2012/2016) in an Enterprise?

Re: Deploy Nagios to monitor servers for Low Disk in Enterpr

Posted: Tue Jul 25, 2017 8:42 am
by mcapra
It depends on what you mean by "non-agent". Strictly speaking, no there isn't a way to monitor those metrics without the use of some sort of agent.

If your concern is avoiding the installation of hundreds of copies of NSClient++ (or NCPA), you could leverage one of the native Windows monitoring agents like WMI or SNMP:

https://assets.nagios.com/downloads/nag ... ios-XI.pdf
https://www.youtube.com/watch?v=tsHeN1F6D7g

If your concern is the security of having an agent that accepts remote commands from other machines, you could have the machines submit their checks to Nagios XI "passively" which would be a one-way street from Remote_Machine -> Nagios XI. No bi-directional communication necessary:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Re: Deploy Nagios to monitor servers for Low Disk in Enterpr

Posted: Tue Jul 25, 2017 9:21 am
by bolson
Thanks Matt!

Do you have any more questions or may we close this topic?

Re: Deploy Nagios to monitor servers for Low Disk in Enterpr

Posted: Tue Jul 25, 2017 1:42 pm
by tmattingly
I didn't try the WMI though I read the article. I DID try the SNMP and it worked far easier than I expected. I think thats the way we will go to roll out our low disk monitoring. One of the AD/GPO guys said he can turn on SNMP, set the community string , set the 'where to accept SNMP packets from' and startup the 'SNMP Service'.

I assume once that has been set on all the servers I can do a 'discovery' and have Nagios use the SNMP functionality on each server that was discovered? Is that correct or do I need to add it one server at a time? (Please don't tell me its the second option!)

Tom

Re: Deploy Nagios to monitor servers for Low Disk in Enterpr

Posted: Tue Jul 25, 2017 3:22 pm
by ssax
The discovery is only done running the wizard so you would need to run the wizard for each host but there are ways to overcome that.

You can run the Windows SNMP wizard against a single host and then use the Bulk Host Cloning and Import wizard to clone the services but the problem comes in that you don't know what disks are on all of the servers and they will likely be different on some systems (some may even be dynamic, like failover cluster disks).

Are you looking to have a single service check all of the disks and report any that exceed the thresholds or are you trying to have a service per disk?

One of the problems with single service disk checks is that the disks may be added or removed over time and that's a problem when updating the RRD files (these contain the data for the graphs). Say that when the very first check is run that you have 6 disks (A:, B:, C:, D:, E:, F:), you have to define the number of datasources when creating the RRD files, when data is being inserted the RRD files are requiring (and expecting) you to throw 6 data points into the RRD file. If one of the data sources (say drive E:) goes away it will fail to insert ANY data into the RRD because it doesn't allow you to insert any data other than the exact amount of datapoints. This also is a problem if you lose a drive (say drive E:) and add a new one (say drive Q:), you will still have 6 datasources but the graphing data will be wrong because now F: would go into the E: data source and the Q: data would go into the F: data source, it only knows them as datasource 1-6 so you can see the issue.

I recommend that you setup separate disk checks for each disk and manage them as they fail or add new ones.

Then you could really just attach the C: drive service to a hostgroup instead of directly on the host and all of the hosts in that hostgroup would get those services, this would achieve your desired goal of minimal effort to get these into the system.

What I mean by this would be to run the Windows SNMP wizard against one of them and have it add the services, then go to Configure > Core Config Manager > Hostgroups, create a windows hostgroup, add all of the windows hosts.

Then you would go to Configure > Core Config Manager > Services, edit the new services, click the Manage Hosts button and remove the host, then click the Manage Hostgroups button and select the windows hostgroup you created.

Then change the Config Name of the service to note that it's for windows-servers or whatever so that you know it's attached to a hostgroup and not a single host.

Then after you are done with all the services all you would need to do is clone or create an existing windows host and add it to the windows hostgroup and those hosts will automatically get all of the services that have been attached to the hostgroup.

Let us know if you have any questions.


Thank you