Page 1 of 2

Windows server mount point space monitoring

Posted: Fri Jan 19, 2018 2:35 pm
by tonkaUser
Hi,

How can I monitor space on mount points ? We are using Windows server 2008R2/2012.

Thanks

Re: Windows server mount point space monitoring

Posted: Fri Jan 19, 2018 4:37 pm
by bolson
Use the CheckDriveSize plugin with NRPE like this:

Code: Select all

./check_nrpe -H <hostname or ip_address> -c CheckDriveSize -a <mount_ponit eg: c:\mount> MaxWarn=85% MaxCrit=90%
Let us know if this works for you.

Re: Windows server mount point space monitoring

Posted: Fri Jan 19, 2018 4:38 pm
by npolovenko
@tonkaUser, You could use the latest version of NSClient with the CheckDisk command. It supports monitoring of mounted points. https://docs.nsclient.org/reference/windows/CheckDisk/
Or you could use a similar CheckDisk with NCPA https://www.nagios.org/ncpa/help.php
Do you already have any agents installed on the server?

Re: Windows server mount point space monitoring

Posted: Fri Jan 19, 2018 5:52 pm
by tonkaUser
We are using NCPA agent. How do I add mount space monitor? I don't see anything in the wizard to specify the disk location.

I cloned an existing C drive monitor and changed to use used disk/mount with the folder that it was mounted to, but got an error.
Example:
/usr/local/nagios/libexec/check_ncpa.py ... -M 'disk/mount/C:|MountRoot|SQLData|Tempdb/used_percent' ...

Error:
The node (C:|MountRoot|SQLData|Tempdb) requested does not exist.

Thanks

Re: Windows server mount point space monitoring

Posted: Mon Jan 22, 2018 3:41 pm
by tonkaUser
Can somebody please provide pointers on how to setup it up with NCPA?
I tried to list mounts and don't see any mounts at all (except for cd-rom).

https://server:5693/api/disk/mount?token=mytoken

Thanks

Re: Windows server mount point space monitoring

Posted: Mon Jan 22, 2018 5:07 pm
by dwhitfield
What versions of check_ncpa.py and ncpa are you using? The way you write checks has changed in recent versions.

Re: Windows server mount point space monitoring

Posted: Tue Jan 23, 2018 8:33 am
by tonkaUser
We use NCPA Agent 2.0.6 on Windows server 2008 R2. Nagios is 5.4.12.

How do I check the version of check_ncpa.py?

Thanks!

Re: Windows server mount point space monitoring

Posted: Tue Jan 23, 2018 9:12 am
by tgriep
The NCPA agent for now, can only check the size of drives and not folders. You would have to add a plugin configuration to the agent to check the sub-folder.
Add this example to the ncpa.cfg file

Code: Select all

%HOSTNAME%|Winfile =  plugins/check_winfile.exe --target c:\\temp  --warn 100 --critical 250
It counts all files in the directory c:\temp. Returns WARNING for more than 100 files or CRITICAL for more than 250 files.
This is just an example of a command so you would have to adjust it to your needs.

The executable and more examples can be found here.
https://itefix.net/check_winfile

Re: Windows server mount point space monitoring

Posted: Tue Jan 23, 2018 12:23 pm
by tonkaUser
Are you saying that NCPA agent cannot check the size of a mount point on Windows server?
I don't see that check_winfile can check mount point size. Is it not supported by NCPA? Do I need to use NRPE agent?


Thanks

Re: Windows server mount point space monitoring

Posted: Tue Jan 23, 2018 5:27 pm
by dwhitfield
tgriep wrote:The NCPA agent for now, can only check the size of drives
If that mount point is a drive, then it will be able to do it.