xi_host/service_notification macro (%responseurl%)

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sanjya7
Posts: 3
Joined: Fri Aug 28, 2015 4:14 am

xi_host/service_notification macro (%responseurl%)

Post 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" .
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: xi_host/service_notification macro (%responseurl%)

Post 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.
sanjya7
Posts: 3
Joined: Fri Aug 28, 2015 4:14 am

Re: xi_host/service_notification macro (%responseurl%)

Post 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.
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: xi_host/service_notification macro (%responseurl%)

Post by avandemore »

Please pursue this issue either here or in the ticket you have open on this topic.
Previous Nagios employee
sarfarosh
Posts: 211
Joined: Fri Oct 05, 2012 3:56 am

Re: xi_host/service_notification macro (%responseurl%)

Post by sarfarosh »

Hi Team,

the ticket open over email hasn't been answered for a long time, so posted here. Better you answer here.
sarfarosh
Posts: 211
Joined: Fri Oct 05, 2012 3:56 am

Re: xi_host/service_notification macro (%responseurl%)

Post by sarfarosh »

Hi

we have created the issue into a local environment.

please check the screen shot
You do not have the required permissions to view the files attached to this post.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: xi_host/service_notification macro (%responseurl%)

Post 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.
Former Nagios employee
Locked