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

Use EC2 instance ID for tag

andre_vdveen
DynaMight Champion
DynaMight Champion

Hi, is it possible to use the AWS EC2 instance ID in a tag rule? Mine doesn't seem to work, but I'm not sure it is possible for EC2 instances detected via CW integration only. If there's an agent deployed, I can get it to work.

andre_vdveen_0-1719846480780.png

 

Any ideas or suggestions are welcome! 🙂 

5 REPLIES 5

Maheedhar_T
Participant

Hey @andre_vdveen ,
Not completely confident on this but can you try removing the spaces here? Give something like {Ec2Instance:Name}-{Ec2Instance:InstanceId}.  Cause in most of the cases white space causes an issue while using placeholders. If you leave the tag.
This example not exactly qualifies but this might be a hint.


Maheedhar_T_0-1719859294131.png

Can you give it a try and confirm?

Regards,
@Maheedhar_T 

Maheedhar

Hi @Maheedhar_T thanks for the suggestion but it makes no difference 😞

It is strange that Dynatrace picks up the instance ID for EC2 instances where there's no agent deployed, yet it is not able to use it for tagging rules.

Ah.! 
So you say that there is no one agent deployed on this host ?

Maheedhar

Correct.

The optional tag value populates in cases where the OneAgent is deployed on the EC2 instance, but for those that doesn't have the agent, you still see the instance ID under properties and tags as metadata (under the AWS CloudWatch monitoring views), but it cannot be used for tags. The latter is where we'd like to use it, but it appears that it just isn't possible.

Ah..!! I didn't know this.
Thanks @andre_vdveen 

 

Maheedhar

Featured Posts