29 Jun 2021 07:08 PM - edited 29 Jun 2021 08:09 PM
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:
Then we just supply that in: by adding the /<RegexCode>}
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:
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!
Solved! Go to Solution.
29 Jun 2021 07:16 PM
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%
07 Jul 2021 03:56 PM
Good stuff Chad
07 Jul 2021 07:05 PM
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!
29 Jun 2021 08:59 PM
Great stuff Chad! 👍
29 Jun 2021 09:01 PM
Thanks @larry_roberts
07 Jul 2021 07:07 PM
You are awesome, Chad!
12 Jul 2021 07:34 PM
great writeup. This has me thinking about some of our existing configuration. Might be time for improvement.
08 Jul 2022 07:38 AM
This is a fantastic tip, I have been using/suggesting this for a while now and I came here to post about it on the community as a tip but found you had already beaten me to it by a whole year! 😁
I have also found it to be really helpful for tagging based on the host groups if you can decide on a naming scheme for host groups. You can then propagate environments, locations and other tags throughout your environment making it easier to navigate!
05 Aug 2023 10:11 PM
Hey Chad,
Where can I find this screen to apply the regex and can I use the same regex to different process group?
To be more directly, with an Automatically Tag I can't set to apply the same "rule tag" to services but from different processes, even if I create different condition. Because today isn't an option to use the "or" operator... so since it always use "and", i can only set one process group by rule. So my idea is to add the same regex for those process groups and use a single condition with this regex as value to apply to all services with the same rule.
07 Aug 2023 12:34 PM
You can see all the Dynamic tag values from the following segment of the Auto Tag page:
Granted the 'code' for process groups will not apply to services, unless you leverage one of the tag options to apply to underlying services/hosts:
07 Aug 2023 02:01 PM
After some learning about regex I understood how to use it...
Basically I could apply a tag value in services running on different process group using "contains regex", it allows me to add multiple regex separating by pipes "|", it worked as an "or" operator in the same rule.
It saved me a lot of time.
Thank you Chad, your tip helped me a lot. It brought me to the solution!