Getting value for service from host

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.) :slight_smile: but I couldn’t it.

Try it with just the variable name, $environment$.
Works for me with “handing down” the $snmp_community$ variable

I am tried it earlier but this didn’t work for me.

Variable “environment” is type string

icingaweb2 version 2.7.0
icinga2 version 2.10.5
director version 1.6.2

Service:

That the $eonvironment$ variable is displayed at the “Custom VAriables” section is normal. You won’t see the content of the variable there.
image

Check the “Inspect” link and take a look what the field contains when the check is executed:
image

1 Like

environment variable only future tag of host not for command.

My Icinga of prod environment working without director and It is seem. Service conf and screenshot below:

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?

1 Like