Page 1 of 2
Network MAP drive monitoring
Posted: Thu Apr 14, 2016 1:37 pm
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.
Re: Network MAP drive monitoring
Posted: Thu Apr 14, 2016 1:49 pm
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.
Re: Network MAP drive monitoring
Posted: Thu Apr 14, 2016 2:01 pm
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.
Re: Network MAP drive monitoring
Posted: Thu Apr 14, 2016 2:04 pm
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]#
,
Re: Network MAP drive monitoring
Posted: Thu Apr 14, 2016 2:07 pm
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.
Re: Network MAP drive monitoring
Posted: Thu Apr 14, 2016 2:12 pm
by Sandeep_Patil
NSClient++ already installed on the server and nsclient.log file attached with ticket.
Re: Network MAP drive monitoring
Posted: Thu Apr 14, 2016 2:17 pm
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.
Re: Network MAP drive monitoring
Posted: Thu Apr 14, 2016 2:31 pm
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

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

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

No handler for command: 'check_drivesize'
2016-04-15 00:59:10: message:include\NSCHelper.cpp:238: No handler for command 'check_drivesize'.
Re: Network MAP drive monitoring
Posted: Thu Apr 14, 2016 2:35 pm
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
Re: Network MAP drive monitoring
Posted: Thu Apr 14, 2016 3:33 pm
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