Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Monitoring Azure WebJobs

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.

like image 247
Jamie Avatar asked Aug 04 '15 00:08

Jamie


2 Answers

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

like image 101
Paco de la Cruz Avatar answered Oct 08 '22 11:10

Paco de la Cruz


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.

like image 38
Igorek Avatar answered Oct 08 '22 13:10

Igorek