Page 2 of 2
Re: nrds plugins multi-line output to XI server
Posted: Thu Oct 02, 2014 4:31 pm
by Box293
I believe there might be an issue with Core 4 which could be causing the issue.
If you are writing the plugin, instead of a new line, what happens if you put a BR tag there instead?
Re: nrds plugins multi-line output to XI server
Posted: Thu Oct 02, 2014 4:36 pm
by lmiltchev
In addition to this, do you have the "Allow HTML Tags in Host/Service Status" check-box selected under the "System Settings" in Nagios XI (Admin->Manage System Config)?
Re: nrds plugins multi-line output to XI server
Posted: Thu Oct 02, 2014 6:30 pm
by grenley
I tried appending a <br> on every output line:
Code: Select all
this is a test: vx_disable - occurred 6 times since Thu Oct 2 23:29:18 2014 (pattern: vx_disable)<br>
this is a test: vx_dataioerr - occurred 6 times since Thu Oct 2 23:29:18 2014 (pattern: vx_dataioerr)<br>
Here's what I get back when I run nrds.pl from the command line:
ERROR: The NRDP Server said BAD XML
Also, what if there happened to be html tags embedded in the log message I capture, wouldn't these be inadvertently interpreted, as well?
Re: nrds plugins multi-line output to XI server
Posted: Fri Oct 03, 2014 10:38 am
by ss6396
lmiltchev wrote:In addition to this, do you have the "Allow HTML Tags in Host/Service Status" check-box selected under the "System Settings" in Nagios XI (Admin->Manage System Config)?
Yes, Allow HTML Tags in Host/Service Status is checked.
Re: nrds plugins multi-line output to XI server
Posted: Fri Oct 03, 2014 12:05 pm
by Box293
Well that suggestion didn't work.
I'll do some more research.
Re: nrds plugins multi-line output to XI server
Posted: Tue Oct 07, 2014 10:45 am
by grenley
Hi. Any luck?
I can't believe we're the only ones facing this issue.
Re: nrds plugins multi-line output to XI server
Posted: Tue Oct 07, 2014 4:39 pm
by tmcdonald
You might need to escape the <br> tags like so:
It's gross, but HTML will break XML so you'd need to work around that.
Re: nrds plugins multi-line output to XI server
Posted: Thu Oct 09, 2014 4:20 pm
by grenley
well, it's not pretty, but it did the trick.
My internal users are happy, so I am too.
Thanks very much!
You can close this as resolved.
Re: nrds plugins multi-line output to XI server
Posted: Thu Oct 09, 2014 4:25 pm
by tmcdonald
grenley wrote:well, it's not pretty, but it did the trick..
I deal with perl a lot. Comparatively, this solution is a fine piece of art. Glad it worked out for you =)