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!
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.
I see this
Features - CA App Synthetic Monitor - CA Technologies Documentation
What regex did you use? What did it match against?
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.
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
(.*) API v3(.*)Operational (.*)
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
Thanks Matt, This is working fine!