Monitoring Azure WebJobs

一曲冷凌霜 提交于 2019-12-05 08:09:42

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.

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!