Search code examples
.netazureazure-webjobsazure-webjobs-triggered

Getting Notification when triggered Azure web jobs Fails


I am new to Azure web jobs, I am creating a console application of .net framework for the webjob(triggered). I have noticed that the sometimes web job is failing because "SCM_COMMAND_IDLE_TIMEOUT". So Is there a way to get alert when these type of exceptions occurs, So I could go and restart the web job.

Any help would be appreciated.

Thanks.


Solution

  • First please note that we can set SCM_COMMAND_IDLE_TIMEOUT value in application settings. The detailed steps are here.

    Also, you can use Application Insights to catch the exception and get notification. You can enable it in your webapp.

    enter image description here

    reference:

    Set Alerts in Application Insights.

    Update:

    I didn't have a webjob running, so I use System.IO.FileNotFoundException as a sample.

    enter image description here

    You can find all the logs here, you can test your query to filter the exception you want to trigger the alert.

    enter image description here