# Add environment to hostname in environment variable

**URL:** <https://forums.suse.com/t/add-environment-to-hostname-in-environment-variable/8399>\
**Category:** Rancher 1.x\
**Created:** [January 29, 2018, 12:39pm UTC](https://forums.suse.com/t/add-environment-to-hostname-in-environment-variable/8399 "2018-01-29T12:39:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![galioy](https://avatars.discourse-cdn.com/v4/letter/g/e47c2d/32.png) [@galioy](https://forums.suse.com/u/galioy)\
**Post date:** [January 29, 2018, 12:39pm UTC](https://forums.suse.com/t/add-environment-to-hostname-in-environment-variable/8399/1 "2018-01-29T12:39:21Z")

</div>

In the `docker-compose` config for one of my stacks I’ve got this:

```auto
SYSLOG_HOSTNAME: {{ index .Container.Config.Labels "io.rancher.container.name" }}

```

and then in the logs this is shown with a hostname as `ipsec-ipsec-router-4`, for example.  
Is it possible to add the environment name to the syslog\_hostname value? So that it goes like `development-ipsec-ipsec-router-4` for example?
