LONGSERVICEOUTPUT missing from Notificaion Variables doc

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jwelch
Posts: 225
Joined: Wed Sep 05, 2012 12:49 pm

LONGSERVICEOUTPUT missing from Notificaion Variables doc

Post by jwelch »

Is there a newer version of http://assets.nagios.com/downloads/nagi ... iables.pdf
that includes new variables. In my case I wanted to show users how to add %LONGSERVICEOUTPUT% to
their service notification text, but that variable isn't documented in the doc in the link.

(I seem to remember this particular variable is fairly new and the doc says Revision 1.0 – March, 2012.)

If not, can somone update the current documentation with any missing variables?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: LONGSERVICEOUTPUT missing from Notificaion Variables doc

Post by abrist »

As long as:

Code: Select all

--longserviceoutput="$LONGSERVICEOUTPUT$"
Is declared in the xi_service_notification_handler command (and it is by default), you should be able to use the %longserviceoutput% macro in the xi notification management component.
The same goes for any of the core macros. Declare them in the command, and they should be accessible by the notification handler. (as long as the macro is available to the object in core)

I will look into making the document a bit more clear that the xi_*_notificaiton_handlers can use the core macros.
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.
jwelch
Posts: 225
Joined: Wed Sep 05, 2012 12:49 pm

Re: LONGSERVICEOUTPUT missing from Notificaion Variables doc

Post by jwelch »

Is %longserviceoutput% a different class from %serviceoutput% ?
(%serviceoutput% is specifically listed in the Service Notification Variables section of the pdf file.)
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: LONGSERVICEOUTPUT missing from Notificaion Variables doc

Post by scottwilkerson »

Yes, %longserviceoutput% is used for any output after the first line-break.

So if your output spans multiple lines and youwant it all you would use %serviceoutput%%longserviceoutput%
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
jwelch
Posts: 225
Joined: Wed Sep 05, 2012 12:49 pm

Re: LONGSERVICEOUTPUT missing from Notificaion Variables doc

Post by jwelch »

Scott,
I am aware of the difference in the output. My initial question was why is %statusoutpu% documented, but %longstatusoutput% is not in the pdf file. I was hoping to get the document updated so that I can refer users to it when they want to modify their notification email settings. In this case, they wanted to add the multiline output, but since %longstatusoutput% is not included in the document, it was not obvious to the users how to do so. The initial reply seemed to indicate that there was a reason %longstatusoutput% was not included. Perhaps it's not feasible to include all possible variables, but if so it would be better to say so and include a link to a current definitive list rather that just leave some out.
I realize that it is normal for documentation to lag reality and was just hoping to get this one updated to a closer approximation. :)
<Jim>
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: LONGSERVICEOUTPUT missing from Notificaion Variables doc

Post by slansing »

We can definitely add it into the document as I know quite a few admins who use it. I'll try to make some time to add it today.
Locked