Page 1 of 1

Plugin returns a pipe in status

Posted: Tue Sep 13, 2016 8:52 am
by BanditBBS
I have a custom plugin that run s a sql command and then returns the data. Unfortunately, some of the values of the db columns contain pipes. So when it hits the first one it start adding from that point into the perf data field. Is there a way to escape them so nagios doesn't start processing as perf data? I tried wrapping in ' and " with no luck. Short term fix was to regex and replace the | with -, but I'd much rather it show the true values.

Re: Plugin returns a pipe in status

Posted: Tue Sep 13, 2016 10:30 am
by tmcdonald
Yea, that's the easy way.

The hard but more fun way would be to write a NEB module that lets you specify certain checks to catch, and allow a different separator for those, but that's a little absurd :)

Re: Plugin returns a pipe in status

Posted: Tue Sep 13, 2016 10:32 am
by BanditBBS
Thanks Trevor, feel free to close this up!