1

We have a very simple Application Insights Availability Test (That hits an HTTPS URL across 4 US regions) (basically it hits our App Service). What we have observed it this Availability test automatically stops (not a fixed scheduled) but it abruptly stops and then what we have to do is go back to Availability test Edit the Test and Save it again so that it restarts. This is really weird as we have checked the Activity log also and nothing is reported in it about someone stopping the Test, etc.

Any help on how this can be tackled? As abrupt stoppage of Availability Test (Tests getting grayed out) is really serious as we wont know if there is any outage untill someone reports back on the service.

ZakiMa
  • 5,637
  • 1
  • 24
  • 48
user42012
  • 722
  • 12
  • 33
  • Another (and recommended way) is to open a support ticket (you can send ticket # to me ) – ZakiMa Dec 11 '20 at 09:33
  • Hi Zak, I have dropped a note to you on your MSFT id @ZakiMa Thank you! – user42012 Dec 11 '20 at 13:15
  • hi @ZakiMa, if you have a solution, please add it as answer. – Ivan Glasenberg Dec 14 '20 at 05:49
  • @user42012, hello, I want to know if you have solved the issue? If it's solved, please add an answer:). It may help others who have the same issue. – Ivan Glasenberg Dec 21 '20 at 01:42
  • 1
    heelo @IvanYang we are still having the issue but ZakiMa is trying to help behind the scene thru Microsoft on this. We were able to repro the issue and I have just provided him the steps today .. I will wait tohear back and if some soln will definitely share here on this thread. – user42012 Dec 21 '20 at 18:29
  • 1
    @IvanYang I have posted the solution to this issue along with my Question Please read the initial post Zaki and Aaron from Microsoft helped me to resolve the issue and there is a small bug which may be resolved by Jan 2021. – user42012 Dec 22 '20 at 14:08
  • @ZakiMa Thank you to you and Aaron for helping me resolve this issue. I have posted the response from you as my solution in the Initial post. Thank you again. – user42012 Dec 22 '20 at 14:08
  • Thank you @user42012 for reporting this issue and providing a repro! I massaged both question and answer to align them better with SO style =) – ZakiMa Dec 22 '20 at 19:26

1 Answers1

2

The behavior was caused by two issues and should not be wide spread:

  1. Issue with ARM Template
  2. A possible bug on App Insights Availability configs

This is interesting corner case, caused by a bug in ARM template and discrepancy between how our Front and Back ends handled it. In provided ARM template there were two tags defined:

"tag": "[concat('hidden-link:/subscriptions/',subscription().id,'/resourceGroups/',resourceGroup().name,'/providers/microsoft.insights/components/',parameters('appInsightsName'))]",
"linkToAiResource": "[concat('hidden-link:', resourceId('microsoft.insights/components', parameters('appInsightsName')))]",

  "tags": {
    "[variables('tag')]": "Resource",
    "[variables('linkToAiResource')]": "Resource"
  },

These two tags instantiated into this:

"hidden-link:/subscriptions//subscriptions/xxx/resourceGroups/yyy/providers/microsoft.insights/components/zzz": "Resource",
"hidden-link:/subscriptions/xxx/resourceGroups/yyy/providers/microsoft.insights/components/zzz": "Resource"

Note, we have duplicated “/subscriptions/” in the first tag. So, two issues:

  1. There were two such links in the first place
  2. The first of them is invalid (I guess subscription().id already includes “/subscriptions/” part).

The fix should be straightforward – just leave the second tag (we validated that it starts working).

Now, the bug on our side is that the logic of how this case is handled differs between Front and Back ends:

  1. Front end successfully finds a valid “Resource” hidden-link (ignoring invalid one)
  2. Back end (I guess) uses the first one, finds that it points to (apparently) deleted resource and marks this test as deleted as well. This results in stopping this test

We will adjust the logic. Either will start failing at Front End and will change Back End to use the same logic (fix will be rolled some time in Jan).

ZakiMa
  • 5,637
  • 1
  • 24
  • 48