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

Regex Assistance with Custom device naming

susmita_k
Guide

Hi All,

 

I'm trying to auto tag my custom device based on naming pattern.  The pattern is as below, 

"/Development/pool.xxx-CIT.xxx.xxx.com.8101"
"/Integration/pool.xxx-UAT.xxx.xxx.com.8101"
"/Production/pool.xxx.xxx.xxx.com.8101"
 
I want to extract the CIT or UAT out of that string and set as my environment. How do I extract that.. any help is appreciated.. Thanks!
 

 

2 REPLIES 2

jaume_reverte
Dynatrace Advisor
Dynatrace Advisor

Hello Susmita, 

The regex to perform this action should look like: 

-(CIT|UAT)-

This will cover the three different scenarios that you presented. 

Hope you a good monitoring! 

Hope you a good monitoring!
Jaume Reverte

Thanks for your response. However, I need to pick up that CIT or UAT and i want to use them to tag as environment. I can always use contains, but then i have to create many rules for each environment. So I was looking for a solution where I can just use the regex pattern and pick that part of the string as environment and use it dynamically for all lower environments. For production, I have separate rule, as there is no way to identify the environment for the custom device name.

 

Featured Posts