azure-web-app-serviceazure-web-roles

Options for doing App Services health check for WebJob application


I am hosting a few WebJobs app services and I like to use the Health check feature included in Apps Services.

My worker job applications do not expose any http endpoints. Therefore exposing the path /api/health explained in this article does not apply to my senario:

https://azure.github.io/AppService/2020/08/24/healthcheck-on-app-service.html

We we have health check options other than exposing a HTTP endpoint?

Is there any way to have App Services does health check by checking a file in file system - like creating/deleting a file to check a file's update date?


Solution

  • There isn't anything out of box so it's something you'll have to implement yourself. Something like the WebJob calling some sort of webhook in your while(true) and if that webhook isn't called after a certain period, fire off an email or something that affect.

    Another option is to utilize App Insights. Check the Logging documentation but you could tie into App Insights and feed that into Monitor and configure alerts.