File Count Checks Not Working
Posted: Wed Aug 28, 2013 1:55 pm
I am trying to setup a windows file check using this plugin http://exchange.nagios.org/directory/Pl ... TK/details.
I am using the check_nrpe command in nagiosxi and nsclient++ on the server.
Nagios Command: $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_winfile -a '$ARG1$' '$ARG2$' '$ARG3$'
nsc.ini Modifications:
External Scripts
check_winfile=scripts\check_winfile.exe --target $ARG1$ --warn $ARG2$ --critical $ARG3$
arguments and allow nasty characters are enabled
If I run test command from the service I created, it works fine.
If I save service and have Nagios do the checks like normal, I get "File Unknown-Target does not exist".
If I turn on debug mode in the nsc.ini and look at the log. When I run the test command I see these lines:
2013-08-28 13:44:50: debug:NSClient++.cpp
Injecting: check_winfile: D:\\RightFax\\EDC\\Processors\\Convert, 10, 20
2013-08-28 13:44:50: debug:NSClient++.cpp
Injected Result: OK 'FILE OK - 3 files to consider'
2013-08-28 13:44:50: debug:NSClient++.cpp
Injected Performance Result: ''selected files'=3;10;20; 'all files'=3 'deleted files'=0'
When Nagios executes the check like normal I get this:
2013-08-28 13:45:01: debug:NSClient++.cpp
Injecting: check_winfile: D:RightFaxEDCProcessorsConvert, 10, 20
2013-08-28 13:45:01: debug:NSClient++.cpp
Injected Result: WARNING 'FILE UNKNOWN - Target does not exist'
2013-08-28 13:45:01: debug:NSClient++.cpp
Injected Performance Result: ''
It drops the \\ from the file path. Explaining the file unknown error.
I am able to create a new command for each file needing monitored with success, but I would rather not create a command for each check I need to do. I just hard code the path, warning, and critical data in the command located in the nsc.ini. I want to get around this and have it be configured through the NagiosXI interface.
Any idea what the problem could be?
Thanks for your help!
Caleb
I am using the check_nrpe command in nagiosxi and nsclient++ on the server.
Nagios Command: $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_winfile -a '$ARG1$' '$ARG2$' '$ARG3$'
nsc.ini Modifications:
External Scripts
check_winfile=scripts\check_winfile.exe --target $ARG1$ --warn $ARG2$ --critical $ARG3$
arguments and allow nasty characters are enabled
If I run test command from the service I created, it works fine.
If I save service and have Nagios do the checks like normal, I get "File Unknown-Target does not exist".
If I turn on debug mode in the nsc.ini and look at the log. When I run the test command I see these lines:
2013-08-28 13:44:50: debug:NSClient++.cpp
2013-08-28 13:44:50: debug:NSClient++.cpp
2013-08-28 13:44:50: debug:NSClient++.cpp
When Nagios executes the check like normal I get this:
2013-08-28 13:45:01: debug:NSClient++.cpp
2013-08-28 13:45:01: debug:NSClient++.cpp
2013-08-28 13:45:01: debug:NSClient++.cpp
It drops the \\ from the file path. Explaining the file unknown error.
I am able to create a new command for each file needing monitored with success, but I would rather not create a command for each check I need to do. I just hard code the path, warning, and critical data in the command located in the nsc.ini. I want to get around this and have it be configured through the NagiosXI interface.
Any idea what the problem could be?
Thanks for your help!
Caleb