# Multiple host properties with the same key

**URL:** <https://community.dynatrace.com/t/multiple-host-properties-with-the-same-key/19504>\
**Category:** Open Q&A\
**Tags:** tagging, oneagent, hosts-classic\
**Created:** [June 5, 2020, 12:06pm UTC](https://community.dynatrace.com/t/multiple-host-properties-with-the-same-key/19504 "2020-06-05T12:06:30Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![grechnev](https://avatars.discourse-cdn.com/v4/letter/g/c5a1d2/32.png) [@grechnev](https://community.dynatrace.com/u/grechnev)\
**Post date:** [June 5, 2020, 12:06pm UTC](https://community.dynatrace.com/t/multiple-host-properties-with-the-same-key/19504/1 "2020-06-05T12:06:30Z")

</div>

As stated in the oneagentctl guide there is a possibility to have multiple host properties with the same key:

“It is allowed to define properties with the same key but different values”

> **[OneAgent configuration via command-line interface](https://docs.dynatrace.com/docs/ingest-from/dynatrace-oneagent/oneagent-configuration-via-command-line-interface)**
>
> Learn how to perform some OneAgent configuration tasks without the need to reinstall OneAgent.

But when I do it, I see only ONE environment custom host metadata property (the last one). See the following screens:

 ![25272-2020-06-05-08-52-05.png](https://global.discourse-cdn.com/dynatrace/original/3X/a/0/a01445b5b64f2b2b6aeabc016860dffdaac083b0.png)

 ![25281-2020-06-05-14-52-31.png](https://global.discourse-cdn.com/dynatrace/original/3X/4/b/4b3df531f54d200e473c9eb2724e077d24a5b6e2.png)

Is it a bug?

If not, then why does such possibility exist in the OneAgent cli?

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [June 5, 2020, 12:21pm UTC](https://community.dynatrace.com/t/multiple-host-properties-with-the-same-key/19504/2 "2020-06-05T12:21:49Z")

</div>

Have you recycled the oneagent? also host properties might take a little while to update, Id restart the oneagent service and check back in a few hours

---

<div class="post-metadata">

**Author:** ![grechnev](https://avatars.discourse-cdn.com/v4/letter/g/c5a1d2/32.png) [@grechnev](https://community.dynatrace.com/u/grechnev)\
**Post date:** [June 5, 2020, 12:31pm UTC](https://community.dynatrace.com/t/multiple-host-properties-with-the-same-key/19504/3 "2020-06-05T12:31:16Z")

</div>

Yes, I have restarted OneAgent. And I had been waiting for one day before I made this screenshot.

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [June 5, 2020, 12:36pm UTC](https://community.dynatrace.com/t/multiple-host-properties-with-the-same-key/19504/4 "2020-06-05T12:36:48Z")

</div>

can you get the properties file and move the lines together so there is just a space between them? thats how we have it:

Software=GitLab Software=GetLabCE

I am curious if you change the name to Software and Software\_2 to see if it shows up. Our Set up name Name\_1=X Name\_2=X

---

<div class="post-metadata">

**Author:** ![grechnev](https://avatars.discourse-cdn.com/v4/letter/g/c5a1d2/32.png) [@grechnev](https://community.dynatrace.com/u/grechnev)\
**Post date:** [June 5, 2020, 1:36pm UTC](https://community.dynatrace.com/t/multiple-host-properties-with-the-same-key/19504/5 "2020-06-05T13:36:34Z")

</div>

I don’t use and don’t have any `hostcustomproperties.conf` files at all, because I set custom properties via command line. As you may know it is the recommended way for doing this since OneAgent version 1.189.

If I set different property keys everything works properly - I see all the properties in the UI. But it is not the case I described at first and tring to debug.

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [June 5, 2020, 2:03pm UTC](https://community.dynatrace.com/t/multiple-host-properties-with-the-same-key/19504/6 "2020-06-05T14:03:31Z")

</div>

okay, you might want to reach out to chat support to ensure that the support article that you read is correct where you can have the same key - if that is correct, then it might be a bug that they need to review

---

<div class="post-metadata">

**Author:** ![Tomasz\_Gajger](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/tomasz_gajger/32/11712_2.png) [@Tomasz\_Gajger](https://community.dynatrace.com/u/Tomasz_Gajger)\
**Post date:** [June 15, 2020, 6:02am UTC](https://community.dynatrace.com/t/multiple-host-properties-with-the-same-key/19504/7 "2020-06-15T06:02:29Z")

</div>

Hi Max,

This is a bug in oneagentctl input validation and help pages alike. Setting multiple properties with the same key is not allowed and would result in just a single one being displayed, as you have observed.

We’ll be fixing this in one of upcoming releases.

Thanks for making us aware of it.

Regards,

Tomasz
