Hi,
We are using cluster-resourcecheck.ps1 script to Monitor the Cluster resources. We were able to monitor all resources except the resource name "PNOM Submission (Elexon & National Grid)". I think because of & symbol in resource name.
We were receiving below error
[nagios@s930lXXXX ~]$ /usr/local/nagios/libexec/check_nrpe -H CLUSTERNODE -p 5666 -t 60 -c check_mscs_resource -a "'PNOM Submission (Elexon & National Grid)'" "CLUSTERNODE"
The command (check_mscs_resource) returned an invalid return code: 255
[nagios@s930lXXXX ~]$
Kindly advice on how to bypass & symbol ?
Special charectors in Cluster Resource
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Special charectors in Cluster Resource
Hello, @bsivavani. Are you using NSClient? You may enable the following option in nsclient.ini: allow nasty characters = true.
"|`&><'\\[]{};\r\n" All these characters are not allowed in NRPE, and there's not much that can be done besides hardcoding the part of the argument with a special character inside the command itself. Or creating a separate command with everything hardcoded for this particular cluster resource.
Let me know if you need help with that. I'd need to see your current command definition.
"|`&><'\\[]{};\r\n" All these characters are not allowed in NRPE, and there's not much that can be done besides hardcoding the part of the argument with a special character inside the command itself. Or creating a separate command with everything hardcoded for this particular cluster resource.
Let me know if you need help with that. I'd need to see your current command definition.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Special charectors in Cluster Resource
Hi,
I created the command and called from service, but still seeing the error.
Command Definition
$USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -t 60 -c check_mscs_resource -a "PNOM Submission (Elexon & National Grid)" "S988A3000"
Service Definition
/usr/local/nagios/libexec/check_nrpe -H XXXX -p 5666 -t 60 -c check_mscs_resource -a "PNOM Submission (Elexon & National Grid)" "XXXX"
OUTPUT: The command (check_mscs_resource) returned an invalid return code: 255
I created the command and called from service, but still seeing the error.
Command Definition
$USER1$/check_nrpe -H $HOSTADDRESS$ -p 5666 -t 60 -c check_mscs_resource -a "PNOM Submission (Elexon & National Grid)" "S988A3000"
Service Definition
/usr/local/nagios/libexec/check_nrpe -H XXXX -p 5666 -t 60 -c check_mscs_resource -a "PNOM Submission (Elexon & National Grid)" "XXXX"
OUTPUT: The command (check_mscs_resource) returned an invalid return code: 255
-
npolovenko
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Special charectors in Cluster Resource
@bsivavani, You'd need to modify the command on the monitored computer side. Basically, you can't pass any special characters through nrpe but you can hardcode the whole command in nsclint.ini file. In nsclient.ini file please search for "check_mscs_resource". Please post the whole command.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Special charectors in Cluster Resource
Thank You. I am able to resolve this issue.
Please close the request.
Please close the request.
-
kyang
Re: Special charectors in Cluster Resource
Sounds good! I'll be closing this thread!
If you have any more questions, feel free to create another thread.
Thanks for using the Nagios Support Forum!
If you have any more questions, feel free to create another thread.
Thanks for using the Nagios Support Forum!