Custom variables in service-actions.ini/host-actions.ini urls


I am using Icinga2 with Icingaweb2/Director and would like to use custom vars for host and service actions. I can get both a service name and a host name to show up in the url, but no custom vars. Are these not available when the URLs are generated if they are generated automatically by an import?

I’ve tried the following $host.vars.mycustomvar$ $vars.mycustomvars$ $_host_vars_mycustomvar$ $_host.vars.mycustomvar$ but these don’t get resolved in a service action when the page is rendered.

Try it with $_host_mycustomvar$ :wink:

1 Like

Perfect, it works. Thanks!

I don’t suppose there would have been a way dump all the variables available using the debug log for Icingaweb2? I have logging set to DEBUG but could only see that the property does not exist.

You may comment on where this exact inconvenience is already tracked.

I can use _host and _service to get host.vars and service.vars but I can’t workout how to get except with $SERVICEDESC$