Asked by:
Not getting alert from Azure Availability web test

Question
-
Team,
We have lot of micro services. so, for monitoring those service we wrote azure web test. So, it was fine. But issue is we got only one alert when service is failed state. after 2 days we resolved issue. But question is we didn't get any alerts between these two days. We got only one time alert when service failed first time. After that service failed around 754 times but we didnt get any alert. Due to this my services all are in failed state in from last 2 days.
Can any one help me on this. I am missing anything or azure services have some issue.
Thank you,
Ashok
Ashok
Monday, May 11, 2020 10:07 AM
All replies
-
You would have to show us the code you wrote to create the web test.
As you have not put the code here, I would be able to help you just in general by pointing you at the right source.
Check the classic alerts configuration to confirm your email is directly listed, or a distribution list you are on is configured to receive notifications. If it is, then check the distribution list configuration to confirm it can receive external emails. Also check if your mail administrator may have any policies configured that may cause this issue.
Regards.
Monday, May 11, 2020 10:14 AM -
Check code below
<?xml version="1.0" encoding="utf-8"?>
<WebTest Name="WebAPITest" Id="2728f2b4-3d3d-4b3c-8700-e68331b9a6a4" Owner="" Priority="0" Enabled="True" CssProjectStructure="" CssIteration="" Timeout="0" WorkItemIds="" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010" Description="" CredentialUserName="" CredentialPassword="" PreAuthenticate="True" Proxy="default" StopOnError="False" RecordedResultFile="" ResultsLocale="">
<Items>
<Request Method="POST" Guid="8b31981f-4a69-477f-a609-be05d0128b26" Version="1.1" Url="https://login.microsoftonline.com/microsoft.onmicrosoft.com/oauth2/v2.0/token" ThinkTime="8" Timeout="60" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="0" ExpectedResponseUrl="" ReportingName="" IgnoreHttpStatusCode="False">
<Headers>
<Header Name="Content-Type" Value="application/x-www-form-urlencoded" />
</Headers>
<ExtractionRules>
<ExtractionRule Classname="Microsoft.VisualStudio.TestTools.WebTesting.Rules.ExtractRegularExpression, Microsoft.VisualStudio.QualityTools.WebTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" VariableName="token" DisplayName="Extract Regular Expression" Description="Extract text from the response matching a regular expression and place it into the test context.">
<RuleParameters>
<RuleParameter Name="RegularExpression" Value=".*"access_token":"([^"]*)".*" />
<RuleParameter Name="IgnoreCase" Value="True" />
<RuleParameter Name="Required" Value="True" />
<RuleParameter Name="Index" Value="0" />
<RuleParameter Name="HtmlDecode" Value="True" />
<RuleParameter Name="UseGroups" Value="True" />
</RuleParameters>
</ExtractionRule>
</ExtractionRules>
<FormPostHttpBody>
<FormPostParameter Name="client_id" Value="***" RecordedValue="" CorrelationBinding="" UrlEncode="True" />
<FormPostParameter Name="client_secret" Value="****" RecordedValue="" CorrelationBinding="" UrlEncode="True" />
<FormPostParameter Name="grant_type" Value="client_credentials" RecordedValue="" CorrelationBinding="" UrlEncode="True" />
<FormPostParameter Name="scope" Value="https://graph.microsoft.com/.default" RecordedValue="" CorrelationBinding="" UrlEncode="True" />
</FormPostHttpBody>
</Request>
<Request Method="GET" Guid="8b09704b-1e22-4545-b9db-5ddf4ffad206" Version="1.1" Url="https://test.com/xcsvimport/availability" ThinkTime="0" Timeout="60" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="0" ExpectedResponseUrl="" ReportingName="" IgnoreHttpStatusCode="False">
<Headers>
<Header Name="Access-Token" Value="{{token}}" />
<Header Name="Authentication-Provider" Value="aad" />
</Headers>
</Request>
<Request Method="GET" Guid="8b09704b-1e22-4545-b9db-5ddf4ffad206" Version="1.1" Url="https://test.com/icsevents/processevents/availability" ThinkTime="0" Timeout="60" ParseDependentRequests="True" FollowRedirects="True" RecordResult="True" Cache="False" ResponseTimeGoal="0" Encoding="utf-8" ExpectedHttpStatusCode="0" ExpectedResponseUrl="" ReportingName="" IgnoreHttpStatusCode="False">
<Headers>
<Header Name="Access-Token" Value="{{token}}" />
<Header Name="Authentication-Provider" Value="aad" />
</Headers>
</Request>
</Items>
</WebTest>- Edited by Ashok285 Monday, May 11, 2020 10:32 AM
Monday, May 11, 2020 10:29 AM -
Here issue is we got alert only one time. But service failed 755 times so it should send alert 755 times. But we got alert only one time is the question
Ashok
- Edited by Ashok285 Monday, May 11, 2020 11:01 AM
Monday, May 11, 2020 11:00 AM -
Ashok,
This is expected behavior. Getting 700 alerts for the same issue is usually unhelpful, and many email servers would start to block the alerts as spam at that volume. The alert should fire once when it enters a failed state and once when it comes back online.
Monday, May 11, 2020 3:43 PM -
SamaraSoucy,
I am agree with you. But i am not asking sending 700 alerts is not usually helpful, if atleast if send email first 10 its works for us. But we got only one alert out team missed that one. Is it any configuration settings is there.
Ashok
Tuesday, May 12, 2020 6:09 AM -
Currently this is not configurable. However, email is not your only option.
You could add an additional channel that has less noise than email or you could create 2 alerts:
- Lower threshold, when the metrics are concerning and should be looked at. Send an email to the admin, or something similar.
- Higher threshold when metrics are showing a high severity issue. Set the action group up with something harder to miss, say email and an SMS message to the admins, or email and Teams/Slack. Whatever system your team uses for this that would grab immediate attention.
- Edited by SamaraSoucy-MSFTMicrosoft employee Tuesday, May 12, 2020 6:02 PM fixing typo
- Proposed as answer by SamaraSoucy-MSFTMicrosoft employee Tuesday, June 2, 2020 1:01 AM
Tuesday, May 12, 2020 6:02 PM