nrds plugins multi-line output to XI server

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: nrds plugins multi-line output to XI server

Post 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?

Code: Select all

<BR>
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: nrds plugins multi-line output to XI server

Post 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)?
Be sure to check out our Knowledgebase for helpful articles and solutions!
grenley
Posts: 96
Joined: Tue May 13, 2014 6:06 pm

Re: nrds plugins multi-line output to XI server

Post 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?
ss6396
Posts: 35
Joined: Wed Mar 19, 2014 11:26 am

Re: nrds plugins multi-line output to XI server

Post 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.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: nrds plugins multi-line output to XI server

Post by Box293 »

Well that suggestion didn't work.

I'll do some more research.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
grenley
Posts: 96
Joined: Tue May 13, 2014 6:06 pm

Re: nrds plugins multi-line output to XI server

Post by grenley »

Hi. Any luck?
I can't believe we're the only ones facing this issue.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: nrds plugins multi-line output to XI server

Post by tmcdonald »

You might need to escape the <br> tags like so:

Code: Select all

<![CDATA[<br />]]>
It's gross, but HTML will break XML so you'd need to work around that.
Former Nagios employee
grenley
Posts: 96
Joined: Tue May 13, 2014 6:06 pm

Re: nrds plugins multi-line output to XI server

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: nrds plugins multi-line output to XI server

Post 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 =)
Former Nagios employee
Locked