is there a way to escape characters like "|" in the message.
sample message:
[1439925251] PROCESS_SERVICE_CHECK_RESULT;localhost;TSERVICE;2;TEST123|456
Escaping characters in the message
Re: Escaping characters in the message
What exactly are you trying to do, just make it so the | does not show up?devnull wrote:is there a way to escape characters like "|" in the message.
sample message:
[1439925251] PROCESS_SERVICE_CHECK_RESULT;localhost;TSERVICE;2;TEST123|456
Former Nagios Employee.
me.
me.
Re: Escaping characters in the message
it only shows TEST123
but if the value of $SERVICEOUTPUT$ is TEST123|456 ACB DEF:HIJ FOO|BAR|TEST|THIS|IS|LONG|Blah: GHJD
notification doesn't even execute
but if the value of $SERVICEOUTPUT$ is TEST123|456 ACB DEF:HIJ FOO|BAR|TEST|THIS|IS|LONG|Blah: GHJD
notification doesn't even execute
Re: Escaping characters in the message
ooopss.. i wanted to show all characters in $SERVICEOUTPUT$ including the pipes.
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Escaping characters in the message
Your plugin should only be returning one pipe in the output.
The pipe is what separates the status information from the performance data.
This is why you only see TEST123
https://nagios-plugins.org/doc/guidelines.html#AEN200
The pipe is what separates the status information from the performance data.
This is why you only see TEST123
https://nagios-plugins.org/doc/guidelines.html#AEN200
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Escaping characters in the message
Are there a list of characters that nagios doesnt allow in the $SERVICEOUTPUT$
Re: Escaping characters in the message
Former Nagios employee
Re: Escaping characters in the message
You can of course edit that list, but remember that the pipe character has special meaning in Nagios. I tried escaping it with a backslash but it had no effect.
Former Nagios employee