Page 1 of 1

LONGSERVICEOUTPUT missing from Notificaion Variables doc

Posted: Thu May 23, 2013 11:59 am
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?

Re: LONGSERVICEOUTPUT missing from Notificaion Variables doc

Posted: Thu May 23, 2013 12:06 pm
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.

Re: LONGSERVICEOUTPUT missing from Notificaion Variables doc

Posted: Fri May 24, 2013 3:25 pm
by jwelch
Is %longserviceoutput% a different class from %serviceoutput% ?
(%serviceoutput% is specifically listed in the Service Notification Variables section of the pdf file.)

Re: LONGSERVICEOUTPUT missing from Notificaion Variables doc

Posted: Fri May 24, 2013 7:18 pm
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%

Re: LONGSERVICEOUTPUT missing from Notificaion Variables doc

Posted: Sat May 25, 2013 8:12 am
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>

Re: LONGSERVICEOUTPUT missing from Notificaion Variables doc

Posted: Tue May 28, 2013 9:40 am
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.