Monitor App Service Up state

Mark Wright 21 Reputation points
2022-02-01T09:16:20.943+00:00

In our non-production environments we leave our apps in Always On = False state as a cost saving exercise. As I understand it this means that the apps will stop after 20 minutes of inactivity but is there any report we can run that will tells us exactly when the apps stopped and started so we can calculate up time and monitor any unusual up activity?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,408 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 24,971 Reputation points Microsoft Employee
    2022-02-03T15:02:49.597+00:00

    @Mark Wright , Thanks for posting this good question. First of all, please accept my Apologies for the delayed response.

    --Primarily, to clarify, “Always On” feature itself is not charged. For Basic and higher App Service Plan (tiers), you're paying for the entire VM (and the feature offers) anyways.

    In Azure App Service, you get billed for the App Service Plan and not the Web App.
    The pricing tier of an App Service Plan (ASP) determines what App Service features you get and how much you pay for the plan.

    --Just to highlight further on the “Always On’ feature – The Web Apps are unloaded but not stopped. With this feature/ that is when Always On is turned on, the front-end load balancer sends a GET request to the application root every five minutes. The continuous ping prevents the app from being unloaded.

    --With “Always On” disabled - This way, the system can conserve resources. The downside is that the response to the first request after the web app is unloaded is longer, to allow the web app to load and start serving responses. // Only in Basic and above App Service Plans (ASP), you can turn on the Always On setting.

    As Zain Rizvi mentioned (here) - " The only possible way - Always On could increase your bill is if you have Auto Scale enabled based on Memory Consumption or something.
    Having a whole bunch of sites set to always be on might trigger the Auto Scale mechanism to add another instance (VM) to your Web Hosting Plan, resulting in a higher bill. "

    Monitoring and Alerts:

    1.From Azure App Service -Activity Log, you can also view “Start Web App” and “Stop Web App” operations.
    https://learn.microsoft.com/azure/app-service/monitor-app-service-reference#activity-log

    171017-image.png