returning special characters using nrpe

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
kcarpenter@soleo.com
Posts: 8
Joined: Mon Jul 08, 2013 5:05 pm

returning special characters using nrpe

Post by kcarpenter@soleo.com »

How do I keep the special characters returned by the plugin ?
The (>) symbol is being stripped out ?

I see the alert with the (>)

[1397151893] SERVICE ALERT: SV724;check_emp;WARNING;HARD;2;WARNING (35) > 10

But the Notification does not have the (>), it seems to be stripped out.

[1397151893] SERVICE NOTIFICATION: NAG01;SV724;check_emp;WARNING;notify-service-Master;WARNING (35) 10

Thanks for any advice
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: returning special characters using nrpe

Post by sreinhardt »

That is actually considered a nasty metacharacter. If you wish to allow it, you will need to download the tar or git clone the nrpe code, and remove that character from src/nrpe.c on line 56, then recompile. This may need to be done for both send_nrpe and the server, or just the server. I would give it a shot on just the server receiving the response and if that does not work, also rebuild the plugin.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
kcarpenter@soleo.com
Posts: 8
Joined: Mon Jul 08, 2013 5:05 pm

Re: returning special characters using nrpe

Post by kcarpenter@soleo.com »

Thanks, I think I try harder to leave it out.
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: returning special characters using nrpe

Post by sreinhardt »

You're welcome, I can see where that is a nice way to display it, but it can cause some issues with nrpe and hence the exclusion of it.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked