Icingaweb2 navigation item URL from custom variable

icingaweb2

(Swizzly) #1

Hi
I am trying to create a navigation item URL from a custom variable. I store the URL that I want to use in a service custom variable e.g. service.vars.myurl = https://myweb.server.com/somepage
If I use it in the navigation item URL field: $_service_myurl$ or even with $myurl$ it resolves the URL in Icingaweb2 as: https://myicinga2server.com/icingaweb2/https://myweb.server.com/somepage
If I use some constant text instead of the variable, it works as expected i.e. without the leading URL of the icinga2 server.
How should I use the URL from my custom variable correctly without having the URL of the icingaweb2 server?

I run Icingaweb2 v2.6.1.


(Swizzly) #2

I found a Workaround, if I insert /icingaweb2/iframe?url= in front of the variable $myurl$, that it looks like this:
/icingaweb2/iframe?url=$myurl$
then it works as expected, it gets translated to https://myicinga2server.com/icingaweb2/iframe?url=https://myweb.server.com/somepage opening the URL in a frame.
But there are cases when opening a URL in a frame is not allowed, so it is still an issue.