Nagios does not display information after the (|) pipe

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dLans
Posts: 40
Joined: Tue May 27, 2014 1:54 am

Nagios does not display information after the (|) pipe

Post by dLans »

Good morning,

I've got a plugin working and am currently writing a bash script to run the check and report the status to Nagios. When I run my command on the RHEL server locally I get all the information that I'm looking for:
./check_sap_bash
EU_PUT History = EU_PUT | 00102301 | Be▒ind. |, started at 2016-10-27,00:10:24 finished at 2016-10-27,00:10:31

But Nagios only displays 'EU_PUT History = EU_PUT'. I want to write my plugin to check for a string in the output, in this case 'Be▒ind.'. But the information is not reaching Nagios and therefor I cannot use it. I cannot modify the output. So my question:
Is there a way to make Nagios see the information that follows the pipe symbol? How do people manage writing their own custom checks when facing the pipe symbol?


Kind regards,
Dennis Lans
dLans
Posts: 40
Joined: Tue May 27, 2014 1:54 am

Re: Nagios does not display information after the (|) pipe

Post by dLans »

Fixed it by using:
echo $output | tr --delete '|'.

The only problem I have left is that the umlauts are displayed incorrectly in both Nagios and RHEL (but its a rhel issue). Can be closed ^^
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: Nagios does not display information after the (|) pipe

Post by avandemore »

Thanks for using the Nagios forums. Please open another thread or ticket if you have further issues.
Previous Nagios employee
Locked