DX Application Performance Management

  • 1.  Regex for Agent Expression

    Posted Sep 25, 2017 04:21 PM

    (.*) \-test\|(.*)

    I want to have this agent expression case insensitive.

    I have tried it as below.

    (.*) \-[t-Te-Es-St-T]\|(.*)

     

    But it doesn't work.



  • 2.  Re: Regex for Agent Expression

    Posted Sep 25, 2017 04:26 PM

    Try this:

     

    (.)\-[tT][eE][sS][tT]\|(.)

     

    -Chris



  • 3.  Re: Regex for Agent Expression

    Posted Sep 25, 2017 06:51 PM

    It doesn't work.

    something like below works but not all the values are being case insensitive.

    (.*) \-[tT]est\|(.*)



  • 4.  Re: Regex for Agent Expression

    Posted Sep 25, 2017 07:28 PM

    Something wrong with the wildcard at the end of regex.

    (.*) -\ [tT][eE][sS][tT] \- [tT]est\|(.*)

    This way it works but I want other regex to be case insensitive as well.



  • 5.  Re: Regex for Agent Expression

    Broadcom Employee
    Posted Sep 25, 2017 09:36 PM

    Hi Vijay,

    Hiko_Davis may have more advice

    Also here is a useful guide from Guenter_GrossbergerRegular Expressions and Metric Groupings Guide 

     

    Regards,

     

    Lynn



  • 6.  Re: Regex for Agent Expression

    Broadcom Employee
    Posted Sep 26, 2017 09:25 AM

    I'll take a look at this later today and reply back.



  • 7.  Re: Regex for Agent Expression
    Best Answer

    Broadcom Employee
    Posted Sep 26, 2017 03:54 AM

    Hi Vijay,

    I found this thread in internet: Regex: ignore case sensitivity - Stack Overflow 

    I did a quick validation in my lab and it seems to be working as expected

    You should use: (.*)\|.*\-(?i)TEST(?-i).*\|(.*)

     

    Test#1) Set "TEST" as case sensitive  using (.*)\|.*\-(?i)TEST(?-i).*\|(.*)

    Result: 6 agents included as part of the mg

    2) Set only "TES" as case sensitive using (.*)\|.*\-(?i)TES(?-i)t.*\|(.*)

    Result: 4 agents included as part of the mg

    3) Set only "ES" as case sensitive using (.*)\|.*\-T(?i)ES(?-i)T.*\|(.*)

    Result: 4 agents included as part of the mg

    I hope this helps,

    Regards,

    Sergio



  • 8.  Re: Regex for Agent Expression

    Broadcom Employee
    Posted Sep 26, 2017 08:39 PM

    Does this still need a reply, or was this resolved with Sergio's post?



  • 9.  Re: Regex for Agent Expression

    Posted Sep 26, 2017 10:03 PM

    It resolved the issue.