Reputation: 101
Can anyone help me with how to set an alert for azure web job in application insights? Whenever the web job is "Failed" status, I should get an Email, So that I can go and restart it.
Or Is there any better way to get alerts than Application insights?
Any help would be appreciated.
Thanks.
Upvotes: 2
Views: 1115
Reputation: 15619
I didn't find any special column to distinguish the errors from webjobs if we don't custom the error in webjob. But we can call the api to know the status of the webjobs. You can follow this article step by step, I have tested it on my side.
The main steps are
get the authorization header from the WebJobs REST API
create a webtest using visual studio
add availability tests
Note: It is not clear how to set the notification email in the article. Here is the steps for your reference. Go to the Alerts tab under Monitoring ->click Manage actions.
Choose your action group->choose Email/SMS/Push/Voice as the Action Type->set your email here.
Upvotes: 1