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.
grenley
Posts: 96
Joined: Tue May 13, 2014 6:06 pm

nrds plugins multi-line output to XI server

Post 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
grenley
Posts: 96
Joined: Tue May 13, 2014 6:06 pm

Re: nrds plugins multi-line output to XI server

Post 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
You do not have the required permissions to view the files attached to this post.
grenley
Posts: 96
Joined: Tue May 13, 2014 6:06 pm

Re: nrds plugins multi-line output to XI server

Post 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$"
}	
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: nrds plugins multi-line output to XI server

Post by abrist »

Do the multiple lines show when you browse to the object in question on the "detail" page?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
grenley
Posts: 96
Joined: Tue May 13, 2014 6:06 pm

Re: nrds plugins multi-line output to XI server

Post by grenley »

You mean the "Service Detail"?
No. A screenshot is posted above.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: nrds plugins multi-line output to XI server

Post by tmcdonald »

I believe he means clicking the actual service name and viewing the output there.
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 »

Nope.
XI-Multiline2.JPG
You do not have the required permissions to view the files attached to this post.
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 »

Click the Advanced tab and click See this service in Nagios Core.

Do the multilines appear there?
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 »

Nope.
XI-Multiline3.JPG
You do not have the required permissions to view the files attached to this post.
grenley
Posts: 96
Joined: Tue May 13, 2014 6:06 pm

Re: nrds plugins multi-line output to XI server

Post by grenley »

And BTW, it seems random which of the two lines is the lucky one that appears in XI
Locked