Windows server mount point space monitoring

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
tonkaUser
Posts: 54
Joined: Tue Nov 28, 2017 10:27 am

Windows server mount point space monitoring

Post by tonkaUser »

Hi,

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

Thanks
bolson

Re: Windows server mount point space monitoring

Post 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.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Windows server mount point space monitoring

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
tonkaUser
Posts: 54
Joined: Tue Nov 28, 2017 10:27 am

Re: Windows server mount point space monitoring

Post 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
You do not have the required permissions to view the files attached to this post.
tonkaUser
Posts: 54
Joined: Tue Nov 28, 2017 10:27 am

Re: Windows server mount point space monitoring

Post 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
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Windows server mount point space monitoring

Post by dwhitfield »

What versions of check_ncpa.py and ncpa are you using? The way you write checks has changed in recent versions.
tonkaUser
Posts: 54
Joined: Tue Nov 28, 2017 10:27 am

Re: Windows server mount point space monitoring

Post 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!
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: Windows server mount point space monitoring

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
tonkaUser
Posts: 54
Joined: Tue Nov 28, 2017 10:27 am

Re: Windows server mount point space monitoring

Post 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
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Windows server mount point space monitoring

Post 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.
Locked