Hello everybody
How can I getting value for service from host? I need very much that.
I am tried a lot of things ($_host_environment$, $vars_environment$, $host_vars_environment$ etc.)
but I couldn’t it.
Try it with just the variable name, $environment$.
Works for me with “handing down” the $snmp_community$ variable
I have no idea what you are trying to tell me, sorry.
The Icinga Director and the Icinga 2 conf files are two different pairs of shoes, as far as I know.
Have you checked what command line the Inspect link shows you, i.e what the core is trying to execute?
Why you don’t use the REST-API from Icinga? There you see every var from a host. If needed you can parse the result in a script.
look here https://icinga.com/docs/icinga2/latest/doc/12-icinga2-api/#querying-objects
Ok, I think I know now what you mean. You want to refefer from a variable in the Service to a variable in the host. This doesn’t work. My colleague found an old thread from Monitoring-Portal https://monitoring-portal.org/woltlab/index.php?thread/31327-icinga2-host-variablen-in-service-nutzen/ - sorry it’s in german. here @dnsmichi described why it’s not possible. I tried at yet and it doesnt’ work