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

Pro Tip - Using Regex for Dynamic Tagging

ChadTurner
Guru

Depending on the size of your environment, odds are you are using automatic tagging. Automatic tagging is great but also can have its downfalls. Over the last several updates, Dynatrace has increased the functionality of its tagging. 

 

- Tagging Entity Names 

With larger organizations adopting new technologies and methodologies, its important to provide tags on these entities. For example. Lets say we have our Application "EasyTravel" but your organization is shifting from being hosted on VMWare to AWS. As a result, you have two different EasyTravel Apps now "AWS EasyTravel" and "VM EasyTravel" you can use custom regex to pull the dynamic values of the Application Names. I like to use www.regex101.com to test all my regex: 

ChadTurner_0-1624989387393.png

Then we just supply that in: by adding the /<RegexCode>}

ChadTurner_1-1624989555652.png

Once you create and save this rule, it will apply to the entire scope. You can also use this for Environment as well by just updating your Regex:  

ChadTurner_2-1624989801886.png

 

Using dynamic regex tagging allows you to create one rule that will provide the targeted value of a set entities across the entire scope! So no more single rules stating if the name contains NP1, tag it with NP1 and so on. 

 

The possibilities are endless and can be used for Hosts, Processes, Services, Applications, Synthetics, Properties and so much more! 

 

-Chad
7 REPLIES 7

ChadTurner
Guru

Important Note: Naming standards do come in handy as it will ensure the data you are looking for is in the same location each and every time, thus allowing your Regex to work 100%

-Chad

Good stuff Chad

Hi Chad, I have to admit that you are an iconic person on our Team for keeping us abreast with Dynatrace, assisting and answering our questions as always! Thank you and it's very much appreciated!

larry_roberts
Champion

Great stuff Chad! 👍

Thanks @larry_roberts :dynaspin:

-Chad

You are awesome, Chad!

ct_27
Helper

great writeup.  This has me thinking about some of our existing configuration.  Might be time for improvement.