3

What would be the best way to monitor when our Azure web app is being unloaded when no requests have been made to the web app for a certain amount of time?

Enabling Logstream for the web server doesn't seem to reveal anything of use..

Any hints much appreciated!

ATV
  • 4,116
  • 3
  • 23
  • 42

1 Answers1

3

You can use Azure Application Insights to create a web test that will alert you when the site is not available anymore. It will ping your site from the data centers you select and perform some action you select (mail, webhook, etc).

Azure Application Insight - Web tests - Create test

However, if you want your web app to stay online, you could upgrade its plan to be at least basic, and under settings enable always on.

Azure Web App - Always On

kim
  • 3,385
  • 2
  • 15
  • 21
  • 1
    Here's a question that just occurred to me: if you are using uptime monitoring, will the act of requesting a page to monitor uptime count as a request and keep the web app from ever being considered idle? – Rob Reagan Mar 07 '18 at 17:53
  • I haven't personally tested it, but technically having a web test running that keeps doing requests, should keep your site from going asleep. However, the "always on" feature does more than just disable idle timeout. See https://stackoverflow.com/questions/21840983/will-always-on-setting-prevent-both-idletimeout-and-periodicrestart for a more detailed explanation. – kim Mar 07 '18 at 19:20
  • Thanks for this approach - works like a breeze! I agree that upgrading and enabling *Always On* is the best solution, alas in dev/test in our small software shop we're not able to use the more expensive plans for each Azure web app we set up.. – ATV Mar 21 '18 at 07:55