With Application Insights you can also test the web availability by adding Web Test with your hosted applications. Application Insights sends the request to the hosted services endpoint in a regular intervals and sends alerts based on the criteria specified for it.
While configuring the Web Test, we can setup the Success Criteria by specifying the HTTP Response Code. By default the Status Code is set to 200,and you can change it as per your need.
Must Read : Using Application Insights right from the Visual Studio 2015
Once the Success Criteria is satisfied Application Insight will send the alert based on pre configured destination.
So what is all about sending alerts based on Content ? Well, couple of days back I was having discussion with one of my buddy, where he was looking for the web test alert, but not only with the Status Code, but also with the response content message. Because, he was expecting some different response text even if the Status Code is same and for a specific response text he wants the alert to be triggered.
Related Post : Save and share your Application Insights results for quick access
Application Insight does support that to. In the Web Test Configuration section, along with the response code there is a Content match check box. This can be used along with the HTTP Response code or can be used alone. Once you select the Content match check box, you have to provide the “Content must contain” text in the give text box.
When both the “Http Response’’” and “Content Match” is selected it will validate both the condition before raising the alert. Incase of only “Content Match” is selected it will ignore the Http Response Status Code and trigger the alert when content is matched.
You can read more about web Availability over here Monitor availability and responsiveness of any web site
Hope this helps !
This is a great tip! Thanks for sharing.
Thanks mate !
Thanks for sharing it.
Thanks Subhendu !
Very helpful.. thanks for sharing…
Thanks Avtar 🙂
Pingback: Dew Drop – March 1, 2016 (#2199) | Morning Dew