# Kibana: docker environment variable translation for xpack.task\_manager.index

**URL:** <https://discuss.elastic.co/t/kibana-docker-environment-variable-translation-for-xpack-task-manager-index/260624>\
**Category:** Kibana\
**Created:** [January 10, 2021, 4:26am UTC](https://discuss.elastic.co/t/kibana-docker-environment-variable-translation-for-xpack-task-manager-index/260624 "2021-01-10T04:26:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ade.syseng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ade.syseng/32/122286_2.png) [@ade.syseng](https://discuss.elastic.co/u/ade.syseng)\
**Post date:** [January 10, 2021, 4:26am UTC](https://discuss.elastic.co/t/kibana-docker-environment-variable-translation-for-xpack-task-manager-index/260624/1 "2021-01-10T04:26:11Z")

</div>

Hi,

I'm just learning to implement Elastic Stack on Docker _swarm_ configuration.

I have an issue to rename index default name ".kibana\_task\_manager" using "xpack.task\_manager.index". According to this [documentation](https://www.elastic.co/guide/en/kibana/current/docker.html#environment-variable-config) all I need to do is convert it to "XPACK\_TASK\_MANAGER\_INDEX" or _possibly to_ "XPACK\_TASKMANAGER\_INDEX"? But, neither of them is working (ignored by Docker and Kibana).

My further exploration found this [executable](https://github.com/elastic/kibana/blob/master/src/dev/build/tasks/os_packages/docker_generator/resources/bin/kibana-docker), inside the executable "xpack.task\_manager.index" is not found in _kibana\_vars_. Does it mean that "xpack.task\_manager.index" is not configurable with Docker environment variable translation?

Any suggesstion or solution for this issue?

PS why I'm doing this? I want to rename ".kibana\_task\_manager" to ".kibana\_task\_manager._containershostname_" just like I did successfully with ".kibana" to ".kibana._containershostname_" renamed with "KIBANA\_INDEX=.kibana._{{.Node.Hostname}}_"

PSS I'm using kibana 7.10

Regards,  
Ade

---

<div class="post-metadata">

**Author:** ![markov00](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markov00/32/33316_2.png) [@markov00](https://discuss.elastic.co/u/markov00)\
**Post date:** [January 11, 2021, 3:13pm UTC](https://discuss.elastic.co/t/kibana-docker-environment-variable-translation-for-xpack-task-manager-index/260624/2 "2021-01-11T15:13:33Z")

</div>

Hi,  
You are right, these variables are missing from the docker environment,  
The alerting team just created a new issue here [https://github.com/elastic/kibana/issues/87832](https://github.com/elastic/kibana/issues/87832)

If I'm not wrong, as a workaround, you can probably completely replace the kibana.yml used in the docker with your own yml file adding a docker volume with that configuration, something like the following should work

```auto
version: "3"
services:
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.8.7
    container_name: elasticsearch_6_8_7
    ports:
      - 9268:9200
  kibana:
    image: docker.elastic.co/kibana/kibana:6.8.7
    container_name: kibana_6_8_7
    ports:
      - 5668:5601
     volumes:
       - ./kibana.yml:/usr/share/kibana/config/kibana.yml

```

---

<div class="post-metadata">

**Author:** ![ade.syseng](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ade.syseng/32/122286_2.png) [@ade.syseng](https://discuss.elastic.co/u/ade.syseng)\
**Post date:** [January 14, 2021, 2:12pm UTC](https://discuss.elastic.co/t/kibana-docker-environment-variable-translation-for-xpack-task-manager-index/260624/3 "2021-01-14T14:12:56Z")

</div>

Hi Marco,

Thank you for acknowledgement.

I already found a solution for my issue. In order to make it work as I expect, I added an environment variable in docker-compose.yml:

> `...`  
> `environment:`  
> `- HOSTNAME={{.Node.Hostname}}`  
> `...`  
> `volumes:`  
> `- type: bind`  
> `source: /opt/docker-compose/kibana/kibana.yml`  
> `target: /usr/share/kibana/config/kibana.yml`  
> `read_only: true`  
> `...`

and then in kibana.yml:

> `...`  
> `xpack.task_manager.index: .kibana_task_manager.${HOSTNAME}`  
> `...`

as the result the index renamed successfully to:

> `.kibana_task_manager.containershostname`

Meanwhile we can wait for alerting team to solve the issue.

Regards,  
Ade

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 11, 2021, 2:13pm UTC](https://discuss.elastic.co/t/kibana-docker-environment-variable-translation-for-xpack-task-manager-index/260624/4 "2021-02-11T14:13:07Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
