returning special characters using nrpe

This forum is intended for the discussion of Nagios plugin development. Feature requests, patches, bug fixes, and all types of development-related discussions are welcome!

NOTE: The SourceForge.net nagiosplug-devel mailing list has been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

returning special characters using nrpe

Postby kcarpenter@soleo.com » Thu Apr 10, 2014 12:57 pm

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
kcarpenter@soleo.com
 
Posts: 8
Joined: Mon Jul 08, 2013 5:05 pm

Re: returning special characters using nrpe

Postby sreinhardt » Fri Apr 11, 2014 9:56 am

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.
sreinhardt
-fno-stack-protector
 
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: returning special characters using nrpe

Postby kcarpenter@soleo.com » Fri Apr 11, 2014 10:36 am

Thanks, I think I try harder to leave it out.
kcarpenter@soleo.com
 
Posts: 8
Joined: Mon Jul 08, 2013 5:05 pm

Re: returning special characters using nrpe

Postby sreinhardt » Fri Apr 11, 2014 11:55 am

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.
sreinhardt
-fno-stack-protector
 
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm


Return to Nagios Plugin Development

Who is online

Users browsing this forum: No registered users and 4 guests