# is it possible to mention host group name in auto-tag ENTITY\_ID value?

**URL:** <https://community.dynatrace.com/t/is-it-possible-to-mention-host-group-name-in-auto-tag-entity-id-value/31160>\
**Category:** Open Q&A\
**Tags:** tagging, monaco\
**Created:** [April 16, 2021, 7:26am UTC](https://community.dynatrace.com/t/is-it-possible-to-mention-host-group-name-in-auto-tag-entity-id-value/31160 "2021-04-16T07:26:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nakb](https://avatars.discourse-cdn.com/v4/letter/n/8edcca/32.png) [@nakb](https://community.dynatrace.com/u/nakb)\
**Post date:** [April 16, 2021, 7:26am UTC](https://community.dynatrace.com/t/is-it-possible-to-mention-host-group-name-in-auto-tag-entity-id-value/31160/1 "2021-04-16T07:26:52Z")

</div>

I am deploying auto-tag configuration like below

```markup
{
    "description": null,
    "name": "{{.name}}",
    "rules": [
        {
            "conditions": [
                {
                    "comparisonInfo": {
                        "negate": false,
                        "operator": "EQUALS",
                        "type": "ENTITY_ID",
                        "value": "HOST_GROUP-EFEB49"
                    },
                    "key": {
                        "attribute": "HOST_GROUP_ID"
                    }
                }
            ],
            "enabled": true,
            "propagationTypes": [
                "PROCESS_GROUP_TO_SERVICE"
            ],
            "type": "PROCESS_GROUP",
            "valueFormat": "{HostGroup:Name}"
        }
}

```

is there a way to specify the name itself instead of meId.

---

<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:** [April 16, 2021, 12:16pm UTC](https://community.dynatrace.com/t/is-it-possible-to-mention-host-group-name-in-auto-tag-entity-id-value/31160/2 "2021-04-16T12:16:07Z")

</div>

Yes you can! I recommend doing it from the UI then pulling the Json of that rule. If I understand your question correctly, you would like to capture the Host Group, Dynamically, and set it as a tag, but only for entities assigned to a specific host group.

You will need to do the following:

 ![ChadTurner_0-1618575144452.png](https://global.discourse-cdn.com/dynatrace/original/1X/92998f401d939fa08503c58b623d35ef6b66d77d.png)

Create a new Auto Tag rule and name it Host Group. Then add a rule for the host, process, or service, or all of them. and in the tag value you will put {HostGroup:Name}. This will grab the Host Group Value for the entity and put it into a tag. Then select what the rule applies to, and then isolate (if needed) the Host Group and such, and then set conditions. This will allow you to Narrow down the scope even more for the rule. If the Host Group Name Starts with or contains Easy Travel.

Click Preview and ensure that your desired entity shows up and then create and save the rule. then you’re done. Then you can pull the rule via the API and use it as a template.

---

<div class="post-metadata">

**Author:** ![nakb](https://avatars.discourse-cdn.com/v4/letter/n/8edcca/32.png) [@nakb](https://community.dynatrace.com/u/nakb)\
**Post date:** [April 19, 2021, 11:57am UTC](https://community.dynatrace.com/t/is-it-possible-to-mention-host-group-name-in-auto-tag-entity-id-value/31160/3 "2021-04-19T11:57:15Z")

</div>

Hi [@ChadTurner](https://community.dynatrace.com/user/14877) I am using json configuration to create tags using monaco so is there a way to specify name in ENTITY\_ID because finding out host group id is difficult everytime

“type”: ENTITY\_ID

“value”: host group name

---

<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:** [April 19, 2021, 12:09pm UTC](https://community.dynatrace.com/t/is-it-possible-to-mention-host-group-name-in-auto-tag-entity-id-value/31160/4 "2021-04-19T12:09:51Z")

</div>

Entity ID should be left blank when creating a new auto tag rule as dynatrace will assign its own ID for the rule. If you are looking to get the entity ID of a Host Group, then you’ll need to click on one of the hosts and the Host Group its associated with. From there the Host Group ID is in your URL:

![ChadTurner_0-1618834179716.png](https://global.discourse-cdn.com/dynatrace/original/3X/b/2/b212f05cf865cb7d39504be4237d88ae74b00490.png)

---

<div class="post-metadata">

**Author:** ![nakb](https://avatars.discourse-cdn.com/v4/letter/n/8edcca/32.png) [@nakb](https://community.dynatrace.com/u/nakb)\
**Post date:** [April 28, 2021, 8:50am UTC](https://community.dynatrace.com/t/is-it-possible-to-mention-host-group-name-in-auto-tag-entity-id-value/31160/5 "2021-04-28T08:50:19Z")

</div>

Thanks for the clarification.
