Page 1 of 1

xi_host/service_notification macro (%responseurl%)

Posted: Sat Dec 24, 2016 6:36 pm
by sanjya7
Dear Geeks ,


i am trying to use a macro defined in xi_host_notification and xi_service_notification (responseurl) for using rapid response url to programmatically close issues. This macro is providing rapid response url correctly in every email. However when this is called from script in xi_host/service_eventhandler the macro is expanding incorrectly the values.
Debug Message:-

Code: Select all

State is UP and type is %hoststatetype% and Attempt is 3 and hostname is prod-aws-adns2-xx.yy and service Service Status - httpd and respond url is http://prod-aws-nagiosmaster-xx.yy/nagiosxi/rr.php?uid=-14-d41d8cd98f00b204e9800998ecf8427e and 
The above there is no aid in the rapid url . When opened this url wiuld give error "no bid" .

Re: xi_host/service_notification macro (%responseurl%)

Posted: Tue Dec 27, 2016 12:58 pm
by dwhitfield
Could you post the macro here? If you are concerned about posting it here, you can PM it to me.

If you choose to PM the macro, please make sure you update this thread.

Re: xi_host/service_notification macro (%responseurl%)

Posted: Thu Dec 29, 2016 7:17 pm
by sanjya7
The nagios XI system macro is %responseurl% which i call from nagiosxi component "global event handler" available below.
The same macro is present in default system notification template and generation healthy response URL like below
noticeably the uid section is coming correctly in via email notification from xi_host and xi_service events .

Code: Select all

http://stage..nagiosxi/rr.php?uid=[3]-[633]-[c802..7c3]
Wen run from script at host / service state change handle command. There if the script refers to macro %responseurl% the url generated misses the uid section and only rest of the section presents like below ,

Code: Select all

http://stage..nagiosxi/rr.php?uid=-[633]-[c802..7c3]


we are using event handler script to generate ticket in ticketing system and the above url is incorrect in the ticket and support staff aren't able to take action on the ticket. The rapid URL provides "acknowledge", "scheduled downtime" and "disable" list dropdown action with which further creation of ticket for same alert can be stopped. However the staff at service desk don't have access to nagios fronted per say and are devoid of that ease of stopping duplicate. I hope this gives enough
information to your query.
We are using "nagiosadmin" account in nagiosxi to create these.

Re: xi_host/service_notification macro (%responseurl%)

Posted: Fri Dec 30, 2016 1:00 pm
by avandemore
Please pursue this issue either here or in the ticket you have open on this topic.

Re: xi_host/service_notification macro (%responseurl%)

Posted: Sat Dec 31, 2016 12:07 am
by sarfarosh
Hi Team,

the ticket open over email hasn't been answered for a long time, so posted here. Better you answer here.

Re: xi_host/service_notification macro (%responseurl%)

Posted: Tue Jan 03, 2017 7:25 am
by sarfarosh
Hi

we have created the issue into a local environment.

please check the screen shot

Re: xi_host/service_notification macro (%responseurl%)

Posted: Tue Jan 03, 2017 10:39 am
by tmcdonald
Please note the recent U.S. holidays which have affected our work schedule:

https://support.nagios.com/forum/viewto ... 39&t=41605

Posts made outside of those times will incur a delay. As there is a ticket open for this issue currently, please continue with us in the ticket. I will be closing this thread now.