# Is it possible to set the non auto-detected host name programatically?

**URL:** <https://community.dynatrace.com/t/is-it-possible-to-set-the-non-auto-detected-host-name-programatically/6792>\
**Category:** Cloud platforms\
**Tags:** dynatrace-managed, azure, hosts-classic\
**Created:** [July 10, 2017, 11:01am UTC](https://community.dynatrace.com/t/is-it-possible-to-set-the-non-auto-detected-host-name-programatically/6792 "2017-07-10T11:01:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![krokkas](https://avatars.discourse-cdn.com/v4/letter/k/ea5d25/32.png) [@krokkas](https://community.dynatrace.com/u/krokkas)\
**Post date:** [July 10, 2017, 11:01am UTC](https://community.dynatrace.com/t/is-it-possible-to-set-the-non-auto-detected-host-name-programatically/6792/1 "2017-07-10T11:01:36Z")

</div>

Dynatrace has 2 names that can be associated with a host, the first is the auto-detected name, and the second is the edited host name. Can this edited host-name be set in advance by a DT\_ variable? And how can this be done in Azure?

Using Dynatrace agent version 1.119

---

<div class="post-metadata">

**Author:** ![dominik\_stadler](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dominik_stadler/32/8537_2.png) [@dominik\_stadler](https://community.dynatrace.com/u/dominik_stadler)\
**Post date:** [July 10, 2017, 1:31pm UTC](https://community.dynatrace.com/t/is-it-possible-to-set-the-non-auto-detected-host-name-programatically/6792/2 "2017-07-10T13:31:33Z")

</div>

For Amazon EC2 instances, the “name”-tag is used if defined.

For Microsoft Azure, it seems this is not currently possible.

These attributes need to be defined before the agent is installed.

---

<div class="post-metadata">

**Author:** ![krokkas](https://avatars.discourse-cdn.com/v4/letter/k/ea5d25/32.png) [@krokkas](https://community.dynatrace.com/u/krokkas)\
**Post date:** [July 10, 2017, 2:28pm UTC](https://community.dynatrace.com/t/is-it-possible-to-set-the-non-auto-detected-host-name-programatically/6792/3 "2017-07-10T14:28:34Z")

</div>

Hi [@Dominik S.](https://answers.dynatrace.com/users/2962/view.html)in the email I received you mentioned that the host-group option could be used, but this didn’t appear to be an option displayed in the -h option shown. Is this available? And is it available for both Linux and Windows agents?

---

<div class="post-metadata">

**Author:** ![dominik\_stadler](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dominik_stadler/32/8537_2.png) [@dominik\_stadler](https://community.dynatrace.com/u/dominik_stadler)\
**Post date:** [July 10, 2017, 3:23pm UTC](https://community.dynatrace.com/t/is-it-possible-to-set-the-non-auto-detected-host-name-programatically/6792/4 "2017-07-10T15:23:38Z")

</div>

Yes, it seems to be missing from the installer-help, you can pass a parameter HOST\_GROUP which will define the name of the host-group that the host will be part of.

---

<div class="post-metadata">

**Author:** ![krokkas](https://avatars.discourse-cdn.com/v4/letter/k/ea5d25/32.png) [@krokkas](https://community.dynatrace.com/u/krokkas)\
**Post date:** [July 19, 2017, 1:55pm UTC](https://community.dynatrace.com/t/is-it-possible-to-set-the-non-auto-detected-host-name-programatically/6792/5 "2017-07-19T13:55:55Z")

</div>

[@Dominik S.](https://answers.dynatrace.com/users/2962/view.html) We’ve tested the HOST\_GROUP option and it meets our requirements, thank you.
