I have been trying to use check_files.vbs to return the number of files in a given directory. This works perfectly, only if the directory does not have spaces. I have tried every combination of quotes, double quotes, slashes, back slashes and each one gives me either an illegal character error or a path not found. I came across this http://support.nagios.com/forum/viewtop ... f=7&t=4195 but even hardcoded into the command I get an illegal character.
Here is what works.
From command line on nagios server:
./check_nrpe -H 192.168.201.6 -c check_files -a /path:Z:\Test /searchdepth:1 /selage:ignore /warning:4 /critical:5
From normal usage:
define command{
command_name check_nrpe_external
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$
}
define service{
use generic-service
host_name Images1
service_description FC To Webfeeds
check_command check_nrpe_external!check_files!/path:Z:\Test /searchdepth:1 /selage:ignore /warning:4 /criticical:5
}
Both the above work. The only thing that needs to change is the path. To something like Z:\Folder one\Folder two\Folder three
If anyone can tell me if this is at least possible. Double quotes, double back slashes seem to give me illegal character errors.
Thanks
Bruce
Check_nrpe - Directory with spaces
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Check_nrpe - Directory with spaces
Please post the command in your nsclient.ini file for check_files.
I believe that the $ARGx$ values in the command need to be enclosed in "double quotes" (the command in the nsclient.ini).
Also, what version of NSClient++ are you using?
I believe that the $ARGx$ values in the command need to be enclosed in "double quotes" (the command in the nsclient.ini).
Also, what version of NSClient++ are you using?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.