DX Application Performance Management

Expand all | Collapse all

Problem with regex expresion

Jump to Best Answer
  • 1.  Problem with regex expresion

    Posted 04-15-2016 09:46 AM

    Hi all

     

     

    I'm new using regex expresions, I'm trying to get a metric and I need to find a regex to exclude some metrics.

     

     

    I have a lot of metrics, and always 2 kinds of metrics.

    The first one is like this (I need to do a metric grouping with all metrics similar to this one):

    WebServices\|Server\|server1/ws\.verDato\.ws\.provider\.verDatoX:Responses Per Interval

     

     

    The second one is like this:

    WebServices\|Server\|server1/ws\.VerDato\.ws\.provider\.verDatoX\|consulta:Responses Per Interval

     

     

    You can see that the onliest difference is in the second one "\|consulta" that is the method in the webservice, I need to create a metric grouping with metrics similar to the first one, and no-one of the second type must be in the group. Which regex expresion should I use?

     

     

    Thanks a lot for your help, best regards

     

     

    Vicente



  • 2.  Re: Problem with regex expresion

    Posted 04-15-2016 10:22 AM

    Hi Vicente,

     

    So yo want to group these metrics

     

    WebServices\|Server\|server1/ws\.verDato\.ws\.provider\.verDatoX:Responses Per Interval

     

    But leave this one out?

     

    WebServices\|Server\|server1/ws\.VerDato\.ws\.provider\.verDatoX\|consulta:Responses Per Interval

     

    So basically you would want to use a negative lookahead as per below.

    ?!consulta

     

     

    Regards,
    Matt



  • 3.  Re: Problem with regex expresion

    Posted 04-15-2016 01:00 PM

    Hi Matt,

     

    Thanks for your answer, but in my case there are more methods diferent to consulta, I need a Regex expresion where I only look for responses per interval just without the pipe, I mean, all metrics with "\|method" have to be out the metric grouping. Perhaps could I try with your answer but adding ?!\|(string without blancks) ? I Will try next monday.

    Thanks for your help.

     

    Best regards

     

    Vicente



  • 4.  Re: Problem with regex expresion
    Best Answer

    Posted 04-16-2016 03:03 PM

    HI Vicente,

    You coulduse below Expression to get Responses Per Interval till before method level. [No '\|consulta' or any othe rmethod will be coming up via this]

     

    WebServices\|Server\|([^\|:]*):Responses Per Interval

     

    This will give you details one level up for all webservices details.

    Hope it helps.

     

    Regards,

    vaibhav



  • 5.  Re: Problem with regex expresion

    Posted 04-18-2016 09:04 AM

    Hi Vaibhav,

     

    that is what I need, it runs perfectly.

     

    Thanks a lot for your help, best regards

     

    Vicente



  • 6.  Re: Problem with regex expresion

    Posted 04-17-2016 09:43 AM

    Hi Vicente: Was Vaibhav's answer helpful or is further assistance needed?

     

    Thanks

    Hal German



  • 7.  Re: Problem with regex expresion

    Posted 04-18-2016 10:28 AM

    Hi Hal,

     

    Yes, Vaibhav's answer was very helpful for me.

     

    Thanks a lot for your help, best regards

     

    Vicente

     

    De: gerha02

    Enviado el: domingo, 17 de abril de 2016 15:43

    Para: CALZADA OLIVA, VICENTE

    Asunto:  Re:  - Problem with regex expresion

     

    CA Communities <https://communities.ca.com/?et=watches.email.thread>

     

     

    Problem with regex expresion

     

    reply from HALLETT GERMAN<https://communities.ca.com/people/gerha02?et=watches.email.thread> in CA APM - View the full discussion<https://communities.ca.com/message/241876570?et=watches.email.thread#comment-241876570>



  • 8.  Re: Problem with regex expresion

    Posted 04-20-2016 06:56 AM

    Good to know that it worked

     

    Regards,

    Vaibhav