Page 1 of 2

nrds plugins multi-line output to XI server

Posted: Wed Oct 01, 2014 4:07 pm
by grenley
Hi.

I've got a custom plugin that runs as a passive (nrds) service on each agent.
It's a logfile monitor that looks for many regular expressions in a given file.
From the plugin perspective, it will send multiple distinct alerts; one for each matched regex.
From the XI perspective, it would look like a bunch of \n-separated lines.

On the XI server, I only see one line of output on the Service Detail window.

1) we need to see each line.
2) as these are being picked up by a third-party notification tool (IBM's Netcool) that connects to XI, each line must be processable

I see many multi-line output questions/issues on the forum, but can't get a handle on exactly what I need to do.

Thanks,
Rick

Re: nrds plugins multi-line output to XI server

Posted: Wed Oct 01, 2014 4:35 pm
by grenley
Just got an update from a team member.
This same plugin is run actively (nrpe) with the same result (one line only on XI)

Here's a sample of the output:

Code: Select all

this is a test: vx_disable - occurred 1 times since Wed Oct  1 20:34:43 2014 (pattern: vx_disable)
this is a test: vx_dataioerr - occurred 1 times since Wed Oct  1 20:34:43 2014 (pattern: vx_dataioerr)
I've attached an example of what's in the service detail on the XI server
XI-Multiline.JPG

Re: nrds plugins multi-line output to XI server

Posted: Thu Oct 02, 2014 2:24 pm
by grenley
FYI...
Netcool gets the Service output through send_service_trap.
Here's the defn:

Code: Select all

define command {
       command_name                  		send_service_trap
       command_line                  		/usr/bin/snmptrap -v 2c -c public our.netcool.att.com:15162 '' NAGIOS-NOTIFY-MIB::nSvcEvent nSvcHostname s "$HOSTNAME$" nSvcDesc s "$SERVICEDESC$" nSvcStateID i $SERVICESTATEID$ nSvcOutput s "$SERVICEOUTPUT$"
}	

Re: nrds plugins multi-line output to XI server

Posted: Thu Oct 02, 2014 2:26 pm
by abrist
Do the multiple lines show when you browse to the object in question on the "detail" page?

Re: nrds plugins multi-line output to XI server

Posted: Thu Oct 02, 2014 2:50 pm
by grenley
You mean the "Service Detail"?
No. A screenshot is posted above.

Re: nrds plugins multi-line output to XI server

Posted: Thu Oct 02, 2014 2:53 pm
by tmcdonald
I believe he means clicking the actual service name and viewing the output there.

Re: nrds plugins multi-line output to XI server

Posted: Thu Oct 02, 2014 3:12 pm
by grenley
Nope.
XI-Multiline2.JPG

Re: nrds plugins multi-line output to XI server

Posted: Thu Oct 02, 2014 3:54 pm
by Box293
Click the Advanced tab and click See this service in Nagios Core.

Do the multilines appear there?

Re: nrds plugins multi-line output to XI server

Posted: Thu Oct 02, 2014 4:05 pm
by grenley
Nope.
XI-Multiline3.JPG

Re: nrds plugins multi-line output to XI server

Posted: Thu Oct 02, 2014 4:06 pm
by grenley
And BTW, it seems random which of the two lines is the lucky one that appears in XI