Page 1 of 2

rapid response url help

Posted: Thu Jan 16, 2020 9:24 am
by jenstar13
I'm getting lost in trying to set up the rapid response url
i saw that XI has it avail by default
but i'm not sure on what to do?
Do I just add %responseurl% to this line, and click the check box?
2020-01-16 09_23_28-Administration ยท Nagios XI - Brave.png
then do the same for Service state?

Re: rapid response url help

Posted: Thu Jan 16, 2020 9:44 am
by scottwilkerson
Rapid response URL is only available in Notifications sent to XI users and is not available for event handlers as the rapid response URL contains a sequence that is different for each user that receive it so the system know what user to log the activity as.

To see the available options for these event handlers see here:
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

Re: rapid response url help

Posted: Thu Jan 16, 2020 9:56 am
by jenstar13
y, all they want is a link directly to the check when the notification email goes out
is there a simpler way to do it?
I do not see it in the list of standard macros

Re: rapid response url help

Posted: Thu Jan 16, 2020 10:04 am
by scottwilkerson
You would want to craft a URL like the following replacing XISERVER, HOSTNAME and SERVICENAME

service

Code: Select all

http://XISERVER/nagiosxi/?xiwindow=includes%2Fcomponents%2Fxicore%2Fstatus.php%3Fshow%3Dservicedetail%26host%3DHOSTNAME%26service%3DSERVICENAME%26dest%3Dauto
host

Code: Select all

http://XISERVER/nagiosxi/?xiwindow=includes%2Fcomponents%2Fxicore%2Fstatus.php%3Fshow%3Dhostdetail%26host%3DHOSTNAME

Re: rapid response url help

Posted: Thu Jan 16, 2020 10:40 am
by jenstar13
sometimes you guys make it really hard to do stuff

I did a hack
I stole the service notes macro and crafted a url like this to link me directly to the check in the email

http://prdnagxi01.example.net/nagiosxi/ ... &dest=auto

Can I ask that you create a standard macro for $XISERVER$ so I don't have to customize the check for every one of my XI installations

Re: rapid response url help

Posted: Thu Jan 16, 2020 10:45 am
by scottwilkerson
jenstar13 wrote:sometimes you guys make it really hard to do stuff

I did a hack
I stole the service notes macro and crafted a url like this to link me directly to the check in the email

http://prdnagxi01.example.net/nagiosxi/ ... &dest=auto

Can I ask that you create a standard macro for $XISERVER$ so I don't have to customize the check for every one of my XI installations
There is this from the doc I sent, you can use that as part of the URL

Code: Select all

%xiserverurl%
Page 6 of the document shows you how to create your own macros in this section
"Adding Nagios Core Macros To The Global Event Handler Component"

Re: rapid response url help

Posted: Thu Jan 16, 2020 10:55 am
by jenstar13
when I used your url, it said event not found, so I made the assumption that I was supposed to change the Variables to standard Nagios macros.

https://assets.nagios.com/downloads/nag ... olist.html

Re: rapid response url help

Posted: Thu Jan 16, 2020 10:57 am
by scottwilkerson
jenstar13 wrote:when I used your url, it said event not found, so I made the assumption that I was supposed to change the Variables to standard Nagios macros.

https://assets.nagios.com/downloads/nag ... olist.html
Did you enclose it in quotes when adding it to the handler?

Code: Select all

"%xiserverurl%"

Re: rapid response url help

Posted: Thu Jan 16, 2020 11:00 am
by jenstar13
no, I copy and pasted what was sent
it's all good not and I will try the other macro

thank you

Re: rapid response url help

Posted: Thu Jan 16, 2020 11:07 am
by jenstar13
I really wish it was a standard macro like $SERVICENOTESURL$ so I could just add the macro here

Code: Select all

/usr/bin/printf "%b" "***** Lvsprdnagxi01 Alert *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n\nService Notes: $SERVICENOTES$\n\nService Notes URL:$SERVICENOTESURL$\n\n Comments: $SERVICEACKCOMMENT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ LVSPRD Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$