Page 1 of 2
Monitoring Windows Mount Points
Posted: Wed Apr 18, 2012 10:16 am
by rdhall01
We have several DB servers that have mount points with vaious volumes, and I need to be able to monitor them similar to drives! I have nsclienttpp on the windows servers (this is working for all other checks).
I tried commands similar to this:
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c CheckDriveSize -a Drive=H:\ FilterType=REMOTE ShowAll MaxWarnUsed=90%
but the error is:
UNKNOWN: Could not get free space for: H: FilterType=REMOTE H: FilterType=REMOTE reason: 3: The system cannot find the path specified.
Any insight on how to accomplish this would be helpful
Redhat 5x
NagiosXI
nsclientpp
Re: Monitoring Windows Mount Points
Posted: Wed Apr 18, 2012 1:27 pm
by scottwilkerson
Drive letters are user specific mapping, try the UNC path without the filter
Try this
Code: Select all
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c CheckDriveSize -a 'Drive=\\<SERVER>\<SHARENAME> ShowAll MaxWarnUsed=90%'
Re: Monitoring Windows Mount Points
Posted: Wed Apr 18, 2012 2:07 pm
by rdhall01
Im just not getting it too work with the following other nrpe checks are still working
command used
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c CheckDriveSize -a 'Drive=\\dbw049\data01 ShowAll MaxWarnUsed=90 MaxCritUsed=95'
results
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
Re: Monitoring Windows Mount Points
Posted: Wed Apr 18, 2012 3:00 pm
by lmiltchev
What does the log say?
Can you try using this command and see if this is going to work?
Code: Select all
$USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c CheckDriveSize -a Drive=\\\\dbw049\\data01\\ ShowAll MaxWarnUsed=90% MaxCritUsed=95%
Re: Monitoring Windows Mount Points
Posted: Thu Apr 19, 2012 10:14 am
by rdhall01
This is from the log
2012-04-18 19:07:31: error:.\NRPEListener.cpp:374: Request arguments contained illegal metachars!
2012-04-18 19:07:31: error:.\NRPEListener.cpp:336: NRPEException: Request command contained illegal metachars
Re: Monitoring Windows Mount Points
Posted: Thu Apr 19, 2012 10:50 am
by lmiltchev
Try editing the NSC.ini file so that you will have:
Code: Select all
[code];# COMMAND ALLOW NASTY META CHARS
; This option determines whether or not the NRPE daemon will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.
allow_nasty_meta_chars=1
[/code]
After this, restart the nsclient++ service:
From DOS Command Prompt:
Code: Select all
net stop nsclientpp
net start nsclientpp
See if this is going to make a difference.
Re: Monitoring Windows Mount Points
Posted: Mon Apr 23, 2012 9:18 am
by rdhall01
reults are as follows
CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
from the log file
2012-04-23 14:17:17: error:.\NRPEListener.cpp:374: Request arguments contained illegal metachars!
2012-04-23 14:17:17: error:.\NRPEListener.cpp:336: NRPEException: Request command contained illegal metachars!
Re: Monitoring Windows Mount Points
Posted: Mon Apr 23, 2012 9:38 am
by lmiltchev
I just noticed that my previous post didn't print out correctly - sorry about that. In the NSC.ini file, you should have:
Code: Select all
;# COMMAND ALLOW NASTY META CHARS
; This option determines whether or not the NRPE daemon will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.
allow_nasty_meta_chars=1
Then you have to restart nsclient++ service.
Re: Monitoring Windows Mount Points
Posted: Mon Apr 23, 2012 10:23 am
by rdhall01
ok first mistake I didnt change the 0 to 1 for meta data
recycled the service
entries from the log file
2012-04-23 15:04:20: message:CACHE.\NSClient++.cpp:370: Attempting to start NSCLient++ - 0.3.5.1 2008-09-24
2012-04-23 15:04:20: message:CACHE.\FileLogger.cpp:93: Log path is: C:\Program Files (x86)\NSClient++\\nsclient.log
2012-04-23 15:04:20: message:.\NSClient++.cpp:476: NSCLient++ - 0.3.5.1 2008-09-24 Started
and now I get the following in nagios
UNKNOWN: Could not get free space for: \\xx.xx.xx.xx\data01\ \\xx.xx.xx.xx\data01\ reason: 67: The network name cannot be found.
I removed the ips and replaced xx to show the error
OK let me try to clear this up abit We have a MS 2008 server that has a network mount point with several volumes on it
I have ben able to monitor the mount point but I also need to be able to monitor the volumes (similar to drives)
We are using the following version of NSCLient++ - 0.3.5. If I need to change I am open to some insight
I Need to get this resolved as soon as posible to get the clusters monitored
Re: Monitoring Windows Mount Points
Posted: Mon Apr 23, 2012 11:24 am
by lmiltchev
Every "\" in the path should be escaped with another "\" character. Most probably your command should be:
Code: Select all
./check_nrpe -H $HOSTADDRESS$ -t 30 -c CheckDriveSize -a Drive=\\\\dbw049\\data01\\ ShowAll MaxWarnUsed=90% MaxCritUsed=95%
instead of
Code: Select all
./check_nrpe -H $HOSTADDRESS$ -t 30 -c CheckDriveSize -a Drive=\\dbw049\data01\ ShowAll MaxWarnUsed=90% MaxCritUsed=95%
Can you try this and post the output?