Page 1 of 1

Nasty characters

Posted: Tue Sep 22, 2015 1:39 pm
by BanditBBS
I have a few hosts that I'd love to be able to use nasty characters in nrpe arguments. I've been googling forever but can only find the option to enable them in NSClient++, is that not an option in linux nrpe?

Re: Nasty characters

Posted: Tue Sep 22, 2015 1:47 pm
by lmiltchev
Can you show us an example of a check that fails because of the "nasty characters" in args?

Re: Nasty characters

Posted: Tue Sep 22, 2015 1:54 pm
by BanditBBS

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 10.143.200.51 -t 180 -c robot_check_ssh -a '-H 192.168.0.36 -t 180 -C "/usr/local/nagios/libexec/check_cpu_stats.sh -w 70,40,60 -c 90,60,70"'
Basically, I am funneling checks to a remote server via nrpe that will than do a check_by_ssh. It is the quotes(") for the -C section of the argument that it is choking on.

Here is the nrpe command

Code: Select all

command[robot_check_ssh]=/usr/local/nagios/libexec/check_by_ssh $ARG1$
If I cant somehow get past this, just means I'll have to create quite a few more commands and I just wanted to create as few as needed.

EDIT: I may have just thought of a way to just modify the commands to not have to use the ". But still, my original question remains, is there a way to use nasty characters?

Re: Nasty characters

Posted: Tue Sep 22, 2015 2:00 pm
by Box293
I don't believe there is an option. I spend some time trying to work this out.

FYI have some steps that I think outline the same thing you are doing:
http://sites.box293.com/nagios/guides/n ... le-hopping