# host.vars.{customField} to map to service.vars.{customField}

**URL:** <https://community.icinga.com/t/host-vars-customfield-to-map-to-service-vars-customfield/9201>\
**Category:** Icinga Web\
**Created:** [February 11, 2022, 8:17am UTC](https://community.icinga.com/t/host-vars-customfield-to-map-to-service-vars-customfield/9201 "2022-02-11T08:17:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![radioactive9](https://community.icinga.com/letter_avatar_proxy/v4/letter/r/47e85d/32.png) [@radioactive9](https://community.icinga.com/u/radioactive9)\
**Post date:** [February 11, 2022, 8:17am UTC](https://community.icinga.com/t/host-vars-customfield-to-map-to-service-vars-customfield/9201/1 "2022-02-11T08:17:39Z")

</div>

Hello

We are trying to have host.var.u\_CompanyName be mapped with a custom variable for all the services on top of that host.

The data field name

 ![image](https://community.icinga.com/uploads/default/original/2X/0/03420e22607182698a9e3f3b23653ce703e01a31.png)

Host Variable is visible as we have manually added it in director

From **Director**  
 ![image](https://community.icinga.com/uploads/default/original/2X/e/e50eb7297f8e2452bcbc05ea9583ff435aad54f7.png)

From **Host Dashboard**

![image](https://community.icinga.com/uploads/default/original/2X/4/4f9874e6b5caf60dc6f1ed60b00d8e9393f71653.png)

And in the custom field of service template we have defined the following

From **over-ride screen**

 ![image](https://community.icinga.com/uploads/default/original/2X/f/f7c1d71884d80bf7c6d2729e47d12208e3e08e60.png)

_ **But the value AG is not getting populated in the service and is just showing the entire variable literally** _

From **Service Dashboard**

![image](https://community.icinga.com/uploads/default/original/2X/9/9fa21989e9b8c0839992b92e2fd6e0d01c394fdc.png)

---

<div class="post-metadata">

**Author:** ![log1c](https://community.icinga.com/user_avatar/community.icinga.com/log1c/32/2071_2.png) [@log1c](https://community.icinga.com/u/log1c)\
**Post date:** [February 11, 2022, 4:05pm UTC](https://community.icinga.com/t/host-vars-customfield-to-map-to-service-vars-customfield/9201/2 "2022-02-11T16:05:04Z")

</div>

Someone has created a github issue just 2 days ago for exactly this topic:

> <https://github.com/Icinga/icingaweb2/issues/4666>
>
> \## Describe the bug
> Hey i expect to see resolved variables references if i use …them in my configuration. I configured all objects via Director 1.8.0.
> 
> 
> \## Expected behavior
> A clear and concise description of what you expected to happen.
> I expect to see resolved variables in the UI
> 
> \## Screenshots
> !\[image\](https://user-images.githubusercontent.com/2448081/153208464-0f011e03-ac68-47d8-88d9-582f49cf6847.png)
> \## Your Environment
> 
> \* Icinga Web 2 version and modules (System - About): 2.9.5
> \* Version used (\`icinga2 --version\`): 2.11.3
> \* Operating System and version:
> \* Enabled features (\`icinga2 feature list\`):
> \* Config validation (\`icinga2 daemon -C\`):
> 
> \## Additional context
> Add any other context about the problem here.

no answers yet, though.

Not sure if resolving this connection is even possible with the IDO database model (which is the base for the webinterface)?!

---

<div class="post-metadata">

**Author:** ![radioactive9](https://community.icinga.com/letter_avatar_proxy/v4/letter/r/47e85d/32.png) [@radioactive9](https://community.icinga.com/u/radioactive9)\
**Post date:** [February 15, 2022, 11:17am UTC](https://community.icinga.com/t/host-vars-customfield-to-map-to-service-vars-customfield/9201/3 "2022-02-15T11:17:34Z")

</div>

Hello @log1c

No that was not me definitely to open that Git Issue

**When we take the xml dump the value is not resolving as well**

Basically our purpose was to pass this value to ServiceNow which polls /v1/objects/services periodically to see alerts
