Network MAP drive monitoring

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Sandeep_Patil
Posts: 39
Joined: Tue Dec 22, 2015 2:32 am

Network MAP drive monitoring

Post by Sandeep_Patil »

Hi Team,

Please suggest the plugin for monitoring network MAP drive in windows server or monitor.

Network MAP drive availability and capacity.

Thanks,
Sandeep Patil.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Network MAP drive monitoring

Post by rkennedy »

NSClient++ using NRPE has a function built in called check_drivesize. You should be able to use this.

An example -

Code: Select all

[root@localhost libexec]# ./check_nrpe -H 192.168.5.47 -c check_drivesize -a drive=c:
OK All 1 drive(s) are ok|'c: used'=119.60528GB;374.89921;421.76161;0;468.62402 'c: used %'=25%;80;90;0;100
See this for more information, http://docs.nsclient.org/reference/wind ... kDisk.html.
Former Nagios Employee
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Network MAP drive monitoring

Post by eloyd »

Checking for drive space may be different than checking to see if the drive is mapped properly. You may want to look into https://docs.nsclient.org/reference/win ... ize.filter to see if the drive is mounted first, before checking its size.

If you're looking at network mapped filesystem sizes, you're better off looking for the space on the source, not the destination. Otherwise you're checking a bunch of clients when it's really the server that matters.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Sandeep_Patil
Posts: 39
Joined: Tue Dec 22, 2015 2:32 am

Re: Network MAP drive monitoring

Post by Sandeep_Patil »

Command output also log file attached

[root@localhost libexec]# ./check_nrpe -H 10.7.127.74
I (0.3.9.327 2011-08-16) seem to be doing fine...

[root@localhost libexec]# ./check_nrpe -H 10.7.127.74 -c check_drivesize -a drive=c:
Could not construct return packet in NRPE handler check client side (nsclient.log) logs...

[root@localhost libexec]#
,
You do not have the required permissions to view the files attached to this post.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Network MAP drive monitoring

Post by eloyd »

You need to install NSclient++ on the Windows machine before this will work. https://assets.nagios.com/downloads/nag ... ios-XI.pdf should help.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
Sandeep_Patil
Posts: 39
Joined: Tue Dec 22, 2015 2:32 am

Re: Network MAP drive monitoring

Post by Sandeep_Patil »

NSClient++ already installed on the server and nsclient.log file attached with ticket.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Network MAP drive monitoring

Post by rkennedy »

Take a look at your nsclient.log file -

Code: Select all

2016-04-15 00:26:48: error:modules\NRPEListener\NRPEListener.cpp:422: Request contained arguments (not currently allowed, check the allow_arguments option).
2016-04-15 00:26:48: error:modules\NRPEListener\NRPEListener.cpp:320: Exception handling NRPE packet
You need to open up your NSClient++ configuration file, and change allow_arguments from 0 to 1.
Former Nagios Employee
Sandeep_Patil
Posts: 39
Joined: Tue Dec 22, 2015 2:32 am

Re: Network MAP drive monitoring

Post by Sandeep_Patil »

Command output :

[root@localhost libexec]# ./check_nrpe -H 10.7.127.74
I (0.3.9.327 2011-08-16) seem to be doing fine...
[root@localhost libexec]# ./check_nrpe -H 10.7.127.74 -c check_drivesize -a drive=v:
UNKNOWN: No handler for that command

NSClient Log :

2016-04-15 00:58:36: message:NSClient++.cpp:1195: No handler for command: 'check_drivesize'
2016-04-15 00:58:36: message:include\NSCHelper.cpp:238: No handler for command 'check_drivesize'.
2016-04-15 00:58:39: message:NSClient++.cpp:1195: No handler for command: 'check_drivesize'
2016-04-15 00:58:39: message:include\NSCHelper.cpp:238: No handler for command 'check_drivesize'.
2016-04-15 00:59:10: message:NSClient++.cpp:1195: No handler for command: 'check_drivesize'
2016-04-15 00:59:10: message:include\NSCHelper.cpp:238: No handler for command 'check_drivesize'.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Network MAP drive monitoring

Post by rkennedy »

You'll need to update NSClient++, or use one of the legacy commands.

Code: Select all

check_drivesize 	Check the size (free-space) of a drive or volume.
check_files 	Check various aspects of a file and/or folder.
checkdrivesize 	Legacy version of check_drivesize
checkfiles 	Legacy version of check_drivesize
Former Nagios Employee
User avatar
WillemDH
Posts: 2320
Joined: Wed Mar 20, 2013 5:49 am
Location: Ghent
Contact:

Re: Network MAP drive monitoring

Post by WillemDH »

In my experience, monitoring remote shares can only be done properly by using a Windows gateway where NSClient runs as a user with permissions on the share. Configure the nscp service to run with this user and create the command which monitors the size.
This wil also only work with very recent NSClient versions, as in very early version, it was not possible to monitor remote shares, and a bit later, there was a bug. If it doesn't work with the version you are running now, try https://github.com/mickem/nscp/releases/tag/0.5.0.43
Nagios XI 5.8.1
https://outsideit.net
Locked