<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Assistance with Tagging and Regex in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118444#M11860</link>
    <description>&lt;P&gt;Looks good!!!&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.dynatrace.com/legacyfs/online/27246-1604934549743.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.dynatrace.com/legacyfs/online/27252-1604934597088.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.dynatrace.com/legacyfs/online/27199-1604934513878.png" /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Nov 2020 15:09:59 GMT</pubDate>
    <dc:creator>Yosi_Neuman</dc:creator>
    <dc:date>2020-11-09T15:09:59Z</dc:date>
    <item>
      <title>Assistance with Tagging and Regex</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118430#M11846</link>
      <description>&lt;P&gt;Hey all,&lt;/P&gt;&lt;P&gt;I have some tagging needs and based on some deployment/provisioning processes I want to implement tagging based on a simple Host Group pattern. I have 3 tags I want to define:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Environment&lt;/LI&gt;&lt;LI&gt;Application&lt;/LI&gt;&lt;LI&gt;Role&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Environment can have 4 designations:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;prod&lt;/LI&gt;&lt;LI&gt;np&lt;/LI&gt;&lt;LI&gt;qa&lt;/LI&gt;&lt;LI&gt;dev&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Application can have any number of designations:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;App1&lt;/LI&gt;&lt;LI&gt;App2&lt;/LI&gt;&lt;LI&gt;App3&lt;/LI&gt;&lt;LI&gt;etc&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Role can have 3 designations:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;web&lt;/LI&gt;&lt;LI&gt;app&lt;/LI&gt;&lt;LI&gt;db&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;When installing the OneAgent, my provisioning team will be instructed to supply a Host Group name. For example:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;np_app1_web&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;In this example, I define 3 tags based on this pattern:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Environment: np&lt;/LI&gt;&lt;LI&gt;Application: app1&lt;/LI&gt;&lt;LI&gt;Role: web&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I am currently trying to build out the first part, but I found out you cannot use specific regex methods (probably for performance reasons) inside Dynatrace. Typically I would use:&lt;/P&gt;&lt;PRE&gt;^(.*?)_&lt;/PRE&gt;&lt;P&gt;To identify "np" as the environment however apparently you cannot use capturing and instead you have to use atomic groups. Can anyone make a suggestion on how to move forward? &lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 15:40:48 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118430#M11846</guid>
      <dc:creator>Jonathan_Finkbi</dc:creator>
      <dc:date>2020-10-29T15:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with Tagging and Regex</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118431#M11847</link>
      <description>&lt;P&gt;I've done it like this.&lt;/P&gt;&lt;P&gt;Pattern: Part1_Part2_Part3_Part4&lt;/P&gt;&lt;P&gt;Part1 ([^_]+?)_[^_]+_[^_]+_[^_]+&lt;/P&gt;&lt;P&gt;Part2:  [^_]+_([^_]+?)_[^_]+_[^_]+&lt;/P&gt;&lt;P&gt;Part3: [^_]+_[^_]+_([^_]+?)_[^_]+&lt;/P&gt;&lt;P&gt;Part4: [^_]+_[^_]+_[^_]+_([^_]+?)&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 16:03:10 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118431#M11847</guid>
      <dc:creator>dave_mauney</dc:creator>
      <dc:date>2020-10-29T16:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with Tagging and Regex</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118432#M11848</link>
      <description>&lt;P&gt;Interesting, I tried the following to identify what I classify as "environment" (Part1):&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;P&gt;([^_]+?)_[^_]+_[^_]+_[^_]+&amp;nbsp;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I got an error that says: "Greedy or lazy character classes are not allowed, please use a possessive quantifier instead."&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 16:56:44 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118432#M11848</guid>
      <dc:creator>Jonathan_Finkbi</dc:creator>
      <dc:date>2020-10-29T16:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with Tagging and Regex</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118433#M11849</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://answers.dynatrace.com/users/41976/view.html" nodeid="41976"&gt;@Jonathan F.&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I would give the &lt;A rel="noopener noreferrer" href="https://dynatrace.software/" target="_blank"&gt;dynatrace regex tester&lt;/A&gt; a try&lt;/P&gt;&lt;P&gt;Yos &lt;/P&gt;</description>
      <pubDate>Fri, 30 Oct 2020 07:48:17 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118433#M11849</guid>
      <dc:creator>Yosi_Neuman</dc:creator>
      <dc:date>2020-10-30T07:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with Tagging and Regex</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118434#M11850</link>
      <description>&lt;P&gt;Here's mine:&lt;/P&gt;&lt;PRE&gt;&lt;P&gt;{HostGroup:Name/([^_]+?)_[^_]+_[^_]+_[^_]+}&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;I get no error when I save it.&lt;/P&gt;&lt;P&gt;My host groups don't fit the pattern so I cannot easily test it, but I copied from a customer I used it on, basically...so I think it should work and it works fine on &lt;A rel="noopener noreferrer" href="https://regex101.com/" target="_blank"&gt;regex101.com&lt;/A&gt; when I test it as:&lt;/P&gt;&lt;PRE&gt;&lt;P&gt;([^_]+?)_[^_]+_[^_]+_[^_]+&amp;nbsp;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;You have three groups, so maybe try these:&lt;/P&gt;&lt;PRE&gt;&lt;P&gt;([^_]+?)_[^_]+_[^_]+&lt;/P&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;P&gt;([^_]+?)_[^_]+?_[^_]+?&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;The question marks make it non-greedy, so the last one should work and be more efficient, I think.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Nov 2020 23:10:34 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118434#M11850</guid>
      <dc:creator>dave_mauney</dc:creator>
      <dc:date>2020-11-01T23:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with Tagging and Regex</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118435#M11851</link>
      <description>&lt;P&gt;Looks like the domain is down? I check it with the Cache of Google and it seems like it has a lot of other things besides the Regex.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 00:00:11 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118435#M11851</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-02T00:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with Tagging and Regex</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118436#M11852</link>
      <description>&lt;P&gt;I think this must be a user issue (my side obviously). So in the "Optional Tag Value" section I am putting in the following:&lt;/P&gt;&lt;PRE&gt;{HostGroup:Name/([^_]+?)_[^_]+}&lt;/PRE&gt;&lt;P&gt;And then in the Conditions section I have:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Conditions:&lt;/P&gt;&lt;P&gt;Host Group Name contains regex ([^_]+?)_[^_]+&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I then get&lt;/P&gt;&lt;P&gt;"Greedy or lazy character classes are not allowed, please use a possessive quantifier instead."&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;For reference, my current host groups are defined by 2 pieces of meta-data separated by an underscore. Examples are currently:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;prod_app1&lt;/LI&gt;&lt;LI&gt;dev_app2&lt;/LI&gt;&lt;LI&gt;qa_app3&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 14:16:42 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118436#M11852</guid>
      <dc:creator>Jonathan_Finkbi</dc:creator>
      <dc:date>2020-11-02T14:16:42Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with Tagging and Regex</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118437#M11853</link>
      <description>&lt;P&gt;Try this for the tag:&lt;/P&gt;&lt;PRE&gt;{HostGroup:Name/([^_]+?)_[^_]+?}&lt;/PRE&gt;&lt;P&gt;Try this for the condition:&lt;/P&gt;&lt;PRE&gt;[^_]+?_[^_]+?$&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Nov 2020 14:47:32 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118437#M11853</guid>
      <dc:creator>dave_mauney</dc:creator>
      <dc:date>2020-11-02T14:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with Tagging and Regex</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118438#M11854</link>
      <description>&lt;P&gt;Yes its some times losing its DNS or something and yes its got lots of nice features here.&lt;/P&gt;&lt;P&gt;May be you can use the its IP 35.201.104.155 instead of URL?&lt;/P&gt;&lt;P&gt;Try to play around with the help of the cheat sheet .....&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.dynatrace.com/legacyfs/online/27120-1604329501930.png" /&gt;&lt;/P&gt;&lt;P&gt;May be &lt;STRONG&gt;([a-z]{1,4}\d|[a-z]{1,4})&lt;/STRONG&gt; can do the job?&lt;/P&gt;&lt;P&gt;HTH &lt;/P&gt;&lt;P&gt;Yos&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 15:14:23 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118438#M11854</guid>
      <dc:creator>Yosi_Neuman</dc:creator>
      <dc:date>2020-11-02T15:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with Tagging and Regex</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118439#M11855</link>
      <description>&lt;P&gt;This seemed to work for me after a few guess and check:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Tag:&lt;/P&gt;&lt;PRE&gt;{HostGroup:Name/^(.*?)_}&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Condition:&lt;/P&gt;&lt;PRE&gt;^.*?_&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Nov 2020 18:29:32 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118439#M11855</guid>
      <dc:creator>Jonathan_Finkbi</dc:creator>
      <dc:date>2020-11-02T18:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with Tagging and Regex</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118440#M11856</link>
      <description>&lt;P&gt;My biggest issue is that I am having a difficult time understanding the "optional tag value" and the function that the "conditions" section carries out.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I am using "Host Group Name" and "contains regex" and then trying to select the part in the "optional tag value" section that I want to target under conditions. I think I am misinterpreting something. There seems to be things you CAN do in the "Optional Tag Value" section that you CANNOT do in the "Conditions" section. &lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 19:06:28 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118440#M11856</guid>
      <dc:creator>Jonathan_Finkbi</dc:creator>
      <dc:date>2020-11-02T19:06:28Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with Tagging and Regex</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118441#M11857</link>
      <description>&lt;P&gt;The optional tag value puts the value in the key/value pair of the tag.  You can leave it out, but I always recommend key/value pairs over "flat" tags that consist of just a name.  In this case, the regex tells it via the parentheses on the "group" to grab the first part of the Host Group before the first delimiter ("_").&lt;/P&gt;&lt;P&gt;The conditions part optionally filters the input.  In this case saying to only include Host Groups that have a delimiter of "_".  you cannot use the parentheses here as you cannot extract data in the condition.&lt;/P&gt;&lt;P&gt;HTH!&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 19:51:14 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118441#M11857</guid>
      <dc:creator>dave_mauney</dc:creator>
      <dc:date>2020-11-02T19:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with Tagging and Regex</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118442#M11858</link>
      <description>&lt;P&gt;Hey Dave M, &lt;/P&gt;&lt;P&gt;I wanted to thank you for your help on this. Here is what I had to do to get this to work for me (your guidance was crucial). The format of my host tags is as follows:&lt;/P&gt;&lt;PRE&gt;env_app_role&lt;/PRE&gt;&lt;P&gt;So below highlights the regex strings for each one:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Environment:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;{HostGroup:Name/^(.*?)_}&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Application:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;HostGroup:Name/^.*?_(.*?)_}&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Role:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;{HostGroup:Name/.*?_.*?_(.*?$)}&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;For the condition, I just used "HostGroup" and "exists". I decided not to use a selection method in the condition section and just rely on the tag part. &lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2020 14:50:37 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118442#M11858</guid>
      <dc:creator>Jonathan_Finkbi</dc:creator>
      <dc:date>2020-11-09T14:50:37Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with Tagging and Regex</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118443#M11859</link>
      <description>&lt;P&gt;Hey Yos,&lt;/P&gt;&lt;P&gt;I appreciate your help with this man. I replied to Dave M. below with my solution. Check it out and let me know if you have any further feedback. &lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2020 14:51:46 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118443#M11859</guid>
      <dc:creator>Jonathan_Finkbi</dc:creator>
      <dc:date>2020-11-09T14:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with Tagging and Regex</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118444#M11860</link>
      <description>&lt;P&gt;Looks good!!!&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.dynatrace.com/legacyfs/online/27246-1604934549743.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.dynatrace.com/legacyfs/online/27252-1604934597088.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://community.dynatrace.com/legacyfs/online/27199-1604934513878.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2020 15:09:59 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/118444#M11860</guid>
      <dc:creator>Yosi_Neuman</dc:creator>
      <dc:date>2020-11-09T15:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Assistance with Tagging and Regex</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/188701#M21424</link>
      <description>&lt;P&gt;Thank you for posting what worked for you.&amp;nbsp; It helped me out today.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 23:09:34 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Assistance-with-Tagging-and-Regex/m-p/188701#M21424</guid>
      <dc:creator>jdsumsion</dc:creator>
      <dc:date>2022-06-17T23:09:34Z</dc:date>
    </item>
  </channel>
</rss>

