How can I monitor azure web jobs when their last run result is failed or if a continuous web job is not running?
I have found cloudmonix which does work. Are there any other products out there?
Zapier only has a zap for triggered web jobs not running continuously.
In case someone else has the same question, there is a way you can monitor Web Jobs with App Insights Web Tests.
What you need to do is to use the Kudu Web Jobs API to get the current status of the web job, e.g.
For triggered web jobs: https://{webapp-name}.scm.azurewebsites.net/api/triggeredwebjobs/{webjob-name}/
For continuous web jobs: https://{webapp-name}.scm.azurewebsites.net/api/continuousjobs/{webjob-name}/
And call the Kudu API from your App Insights Web Tests. You can configure your web tests to include the required Authorization header and to validate the JSON response. You can do this by adding multi-steps web tests.
Multi-steps web tests can be created using Visual Studio Enterprise or Ultimate, or by editing the web test xml definition directly.
You can find more details here:
https://blog.kloud.com.au/2016/08/11/monitoring-azure-web-jobs-health-with-application-insights/
HTH
I dont know of any other products other than CloudMonix that can monitor your Webjobs, but if all you need is alerts when a job fails, you can probably write a console program yourself that checks against your Webjobs with Azure Management certificate.
Look into IWebSiteExtensionsClient and its TriggeredWebJobs or ContinuousWebJobs properties within the Microsoft.WindowsAzure.Management.WebSites package.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With