NSClient++ Help (#1) - (#1002) - Message List
Hello,
I'm having an issue similar to this: http://www.nsclient.org/nscp/discussion/topic/964
Here's my setup:
- I've installed the latest NSClient++ available (0.4.0.172), 64-bit edition on a Windows machine I want to monitor
- I edited the nclient.ini and added this:
[/settings/external scripts/scripts] check_proc_cnt=scripts\\check_winprocess.exe --warn 100 --critical 300 check_proc=scripts\\check_winprocess.exe check_flux=scripts\\check_winprocess.exe --filter "imagename eq flux.exe" --critical 0
- check_winprocess.exe is indeed copied in the scripts sub-directory of the NSClient install directory (you can get it from https://www.itefix.no/i2/check_winprocess if you need to test)
- on the nagios server, I try the following commands:
root@ubuntu:/usr/local/nagios/libexec# ./check_nrpe -H10.0.0.4 -c check_proc_cnt PROCESS OK - 97 process(es)|'processes'=97;100;300
so that one works; on the other hand:
root@ubuntu:/usr/local/nagios/libexec# ./check_nrpe -H10.0.0.4 -c check_flux CHECK_NRPE: No output returned from daemon.
and the NSClient log file contains:
2012-06-20 11:30:28: l:..\..\..\..\trunk\modules\CheckExternalScripts\CheckExternalScripts.cpp:229: Arguments: --filter imagename eq flux.exe --critical 0 2012-06-20 11:30:28: c:D:\source\nscp\trunk\include\nscapi/nscapi_plugin_wrapper.hpp:245: Exception in: NSHandleCommand: bad lexical cast: source type value could not be interpreted as target
And I can't seem to call check_proc with the -a switch on the server, I always end up with errors in the log:
2012-06-20 11:44:32: e:..\..\..\..\trunk\modules\NRPEServer\handler_impl.cpp:17: Request contained arguments (not currently allowed, check the allow arguments option).
Here are some of my attempts from the Nagios server:
root@ubuntu:/usr/local/nagios/libexec# ./check_nrpe -H10.0.0.4 -c check_proc -a "--filter \"imagename eq flux.exe\" --critical 0" Request contained arguments (not currently allowed, check the allow arguments option). root@ubuntu:/usr/local/nagios/libexec# ./check_nrpe -H10.0.0.4 -c check_proc -a "--filter imagename eq flux.exe --critical 0" Request contained arguments (not currently allowed, check the allow arguments option). root@ubuntu:/usr/local/nagios/libexec# ./check_nrpe -H10.0.0.4 -c check_proc -a --warn 100 --critical 300 ./check_nrpe: unrecognized option '--critical' == I've cut the usage screen here == root@ubuntu:/usr/local/nagios/libexec# ./check_nrpe -H10.0.0.4 -c check_proc -a "--warn 100 --critical 300" Request contained arguments (not currently allowed, check the allow arguments option).
So, I'm not even 100% sure it's a NSClient issue, maybe it's a check_process issue... But I have to start somewhere :)
I'm rather new to Nagios too, so maybe it's the way I call it from the server that's no right?
Thanks for your help!
-
Message #2659
First off (the easy part):
- Request contained arguments (not currently allowed, check the allow arguments option).
Has to be configure twice (silly right). Once for NRPEServer to allow it and once for ExternalScripts? to allow it.
Something along the lines of this (not sure as I never recall syntax off the top of my head):
[/settings/NRPE/server] allow arguments=true [/settings/external scripts] allow arguments=true
This is a cast issue (I need to find and resolve): Exception in: NSHandleCommand: bad lexical cast: source type value could not be interpreted as target In short something was supposed to be a number but was not...
Might wanna look at the output from the command as one reason for this could be parsing performance data...
Michael Medin
mickem06/20/12 15:39:53 (11 months ago)








