Page 1 of 1

Notification Variables do not work

Posted: Tue Jun 19, 2012 3:48 pm
by arnab.roy
Hi Guys,

I have been trying to get the following variables working

Notification Type: ACKNOWLEDGEMENT

Service: Aruba AP Status
Host: Khipu-WIFI
Address: 172.20.0.14
State: WARNING
Info:
WARN-Down AP: Steven-Test WARN-Down AP: d8:c7:c8:c9:34:08 WARN-Down AP: d8:c7:c8:c9:b9:92 CAMPUS AP-UP: 4 CAMPUS AP-Down: 3 RAP UP: 9 RAP Down: 17
Date/Time: 19/06/2012 17:08:18

Author: %notificationauthor%
Comment: %notificationcomment%

Running XI 3.1

Any suggestions?

Re: Notification Variables do not work

Posted: Tue Jun 19, 2012 8:33 pm
by scottwilkerson
are you using xi_service_notification_handler for this contact?

If so can you post your command definition for xi_service_notification_handler

Re: Notification Variables do not work

Posted: Wed Jun 20, 2012 3:52 am
by arnab.roy
HI Scott,

Looking at this the macros doesnt seem to be define in the event handler /usr/bin/php /usr/local/nagiosxi/scripts/handle_nagioscore_event.php --handler-type=service --host="$HOSTNAME$" --service="$SERVICEDESC$" --hostaddress="$HOSTADDRESS$" --hoststate=$HOSTSTATE$ --hoststateid=$HOSTSTATEID$ --hosteventid=$HOSTEVENTID$ --hostproblemid=$HOSTPROBLEMID$ --servicestate=$SERVICESTATE$ --servicestateid=$SERVICESTATEID$ --lastservicestate=$LASTSERVICESTATE$ --lastservicestateid=$LASTSERVICESTATEID$ --servicestatetype=$SERVICESTATETYPE$ --currentattempt=$SERVICEATTEMPT$ --maxattempts=$MAXSERVICEATTEMPTS$ --serviceeventid=$SERVICEEVENTID$ --serviceproblemid=$SERVICEPROBLEMID$ --serviceoutput="$SERVICEOUTPUT$" --longserviceoutput="$LONGSERVICEOUTPUT$"

It is using this event handler .

Thanks

Arnab

Re: Notification Variables do not work

Posted: Wed Jun 20, 2012 9:20 am
by scottwilkerson
Arnab,

What you will want to do is add the following to that handler

Code: Select all

 --notificationauthor="$NOTIFICATIONAUTHOR$" --notificationcomments="$NOTIFICATIONCOMMENT$"