Hi ,
We enabled nrpe @ windows server and trying to execute the command from nagios. but we receive error as below.
Attached the ncs.ini configuration file for reference.
Please advice
Nagios command line :
nagios@nagios_server:/usr/local/nagios/libexec$ ./check_nrpe -H <clientip> -p 5666 -t 60 -c check_Visa_Session_Count_Pos -a '"arg1" "arg2" "arg3"'
Could not construct return packet in NRPE handler check client side (nsclient.log) logs...
@Windows server:
Entry @ NCS.ini
[NRPE Handlers]
command [check_Visa_Session_Count_Neg]=cmd /c echo scripts/netsta_review_Neg $ARG1$; $ARG2$; $ARG3$; exit $LastExitCode | powershell.exe /noprofile -command -
command [check_Visa_Session_Count_Pos]=cmd /c echo scripts/netsta_review_Pos $ARG1$; $ARG2$; $ARG3$; exit $LastExitCode | powershell.exe /noprofile -command -
Nsclient Log:
2018-11-20 18:39:26: message:CACHEmodules\FileLogger\FileLogger.cpp:87: Log path is: C:\Program Files\NSClient++\\nsclient.log
2018-11-20 18:39:26: error:modules\NRPEListener\NRPEListener.cpp:422: Request contained arguments (not currently allowed, check the allow_arguments option).
2018-11-20 18:39:26: error:modules\NRPEListener\NRPEListener.cpp:320: Exception handling NRPE packet
2018-11-20 18:39:35: error:modules\NRPEListener\NRPEListener.cpp:422: Request contained arguments (not currently allowed, check the allow_arguments option).
2018-11-20 18:39:35: error:modules\NRPEListener\NRPEListener.cpp:320: Exception handling NRPE packet
2018-11-20 18:39:46: error:modules\NRPEListener\NRPEListener.cpp:422: Request contained arguments (not currently allowed, check the allow_arguments option).
2018-11-20 18:39:46: error:modules\NRPEListener\NRPEListener.cpp:320: Exception handling NRPE packet
2018-11-20 18:44:42: message:modules\FileLogger\FileLogger.cpp:86: Starting to log for: NSClient++ - 0.3.9.328 2011-08-16
2018-11-20 18:45:10: debug:CACHENSClient++.cpp:557: Attempting to start NSCLient++ - 0.3.9.328 2011-08-16
2018-11-20 18:45:10: message:CACHEmodules\FileLogger\FileLogger.cpp:87: Log path is: C:\Program Files\NSClient++\\nsclient.log
2018-11-20 18:45:10: error:modules\NRPEListener\NRPEListener.cpp:422: Request contained arguments (not currently allowed, check the allow_arguments option).
2018-11-20 18:45:10: error:modules\NRPEListener\NRPEListener.cpp:320: Exception handling NRPE packet
2018-11-20 18:45:36: error:modules\NRPEListener\NRPEListener.cpp:422: Request contained arguments (not currently allowed, check the allow_arguments option).
2018-11-20 18:45:36: error:modules\NRPEListener\NRPEListener.cpp:320: Exception handling NRPE packet
2018-11-20 18:46:55: error:modules\NRPEListener\NRPEListener.cpp:422: Request contained arguments (not currently allowed, check the allow_arguments option).
2018-11-20 18:46:55: error:modules\NRPEListener\NRPEListener.cpp:320: Exception handling NRPE packet
Windows NRPE argument error
-
inas.labib
- Posts: 170
- Joined: Tue Sep 11, 2012 3:48 am
Windows NRPE argument error
You do not have the required permissions to view the files attached to this post.
Re: Windows NRPE argument error
The following directives need to be under the [NRPE] section, NOT under [NRPE Handlers section]:
Also, I believe these two commands:
need to be under the [External Scripts] section.
After saving the changes in the NSC.ini file, you need to restart the NSClient++ service, so that changes can take effect.
Let us know if this helped.
Code: Select all
allow_arguments=1
allow_nasty_meta_chars=1Code: Select all
command [check_Visa_Session_Count_Neg]=cmd /c echo scripts/netsta_review_Neg $ARG1$; $ARG2$; $ARG3$; exit $LastExitCode | powershell.exe /noprofile -command -
command [check_Visa_Session_Count_Pos]=cmd /c echo scripts/netsta_review_Pos $ARG1$; $ARG2$; $ARG3$; exit $LastExitCode | powershell.exe /noprofile -command -After saving the changes in the NSC.ini file, you need to restart the NSClient++ service, so that changes can take effect.
Let us know if this helped.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
inas.labib
- Posts: 170
- Joined: Tue Sep 11, 2012 3:48 am
Re: Windows NRPE argument error
Hi,
We modified as suggested. we are getting error as below in nagios command line :
UNKNOWN: No handler for that command
We modified as suggested. we are getting error as below in nagios command line :
UNKNOWN: No handler for that command
Re: Windows NRPE argument error
I believe you are getting this error because you haven't enabled the external scripts module. Change the line below in the NSC.ini file from this:
to this:
save, exit, restart the NSClient++ service, and test your check again.
Code: Select all
;CheckExternalScripts.dllCode: Select all
CheckExternalScripts.dllBe sure to check out our Knowledgebase for helpful articles and solutions!