cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

is it possible to mention host group name in auto-tag ENTITY_ID value?

nakb
Guide

I am deploying auto-tag configuration like below

 

 

 

 

{
    "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.

4 REPLIES 4

ChadTurner
DynaMight Legend
DynaMight Legend

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

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. 

-Chad

nakb
Guide

Hi @ChadTurner 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

ChadTurner
DynaMight Legend
DynaMight Legend

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

 

-Chad

nakb
Guide

Thanks for the clarification.

Featured Posts