DX Application Performance Management

  • 1.  How Regex works in App Synthetic Monitor?

    Posted Feb 17, 2019 11:56 PM

    Hello There,

     

    I am using App Synthetic Monitor to monitor a status page of a service provider. As status page is showing the status of each and every service, I want to use the regular expression to match the service and status, I am interested in. I wrote a Regex and tested it against https://www.regextester.com which is showing correct match. However, when I am trying that Regex into App Synthetic Monitor, it doesn't match.

     

    Have anyone done similar stuff using Regex? Any help on this will be highly appreciated!



  • 2.  Re: How Regex works in App Synthetic Monitor?

    Broadcom Employee
    Posted Feb 19, 2019 03:51 AM

    Hi Jyoti, 

     

    Thank you for posting your query. As this is related to App Synthetic Monitor, I'm moving this thread to CA APM community for the visibility with our engineers. 

     

    Regards, 

    Heena



  • 3.  Re: How Regex works in App Synthetic Monitor?

    Broadcom Employee
    Posted Feb 19, 2019 12:58 PM

    I see this 

    Features - CA App Synthetic Monitor - CA Technologies Documentation 

    Alert Trggers

    • Content matching on strings or regular expressions

    What regex did you use? What did it match against?

    Hal German



  • 4.  Re: How Regex works in App Synthetic Monitor?

    Posted Feb 19, 2019 04:40 PM

    Hi Hal,

     

    I am using (.*)API v3(.*)\n(.*)\n(.*)\n(.*)\n(.*)\n(.*)\n(.*)Operational regex to check the API v3 status on http://status.sendgrid.com/

    I tested this regex on regextester.com and working fine against the HTML of http://status.sendgrid.com/ page. Please refer the attached screen shot.

     

    Output on regextester.com



  • 5.  Re: How Regex works in App Synthetic Monitor?

    Broadcom Employee
    Posted Feb 20, 2019 08:58 AM

    I am not finding examples of setting monitors or alerts with regexes. I asked some colleagues to respond. If there are mo responses soon, please consider opening a case. If a solution is found, please share with the Community

     

    I am using (.*)API v3(.*)\n(.*)\n(.*)\n(.*)\n(.*)\n(.*)\n(.*)Operational regex to check the API v3 status on

    Try to break it down in parts and see if it matches on that part

    Simplfy?

     

    (.*) API v3(.*)Operational (.*)



  • 6.  Re: How Regex works in App Synthetic Monitor?
    Best Answer

    Broadcom Employee
    Posted Feb 20, 2019 09:00 AM

    Hi Jyoti,

     

    I had responded to you in the case you opened up and sent you this.

     

    I took a look at your monitor and it seems that too many \n may be messing with the regex. I created a test monitor and found that this regex works. Since the text you are searching on is not visible I looked at the page source and found that api v3 and operational are in two separate sections. However, since the page is searched from top -> down, it made more sense to see if "API v3" existed and then ignore any text after it until you see Operational, which is noted below by the .* Give this a try in your monitor. API v3.*Operational 

     

    Regards,
    Matt



  • 7.  Re: How Regex works in App Synthetic Monitor?

    Posted Feb 20, 2019 05:15 PM

    Thanks Matt, This is working fine!