Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Best way to set up alerts on azure web job

Frankly speaking azure still does not have direct way to set up alerts on continuous web job's so that one can get notification if web job stops for unknown reasons. After some investigation i found that logic apps are best way to do that. Here are the steps how one can achieve this

Go to azure web job, select properties and copy web hook url, username and password. enter image description here

By default web hook url will have /run option at end to so remove that as you dont want to run webjob

Create a logic app setting following parameters in exact order

  1. Recurrence - Your choice how frequently you want to run your logic app
  2. Initialize a variable for example status (type - string)

  3. Call Http end point giving following details which you copied earlier [enter image description here]2]

  4. Add a step of parse JSON response, pasting response so that logic app can create its own schema enter image description here
  5. Pick the item name for value you want to read for example i am using status
    enter image description here
  6. Add a condition for failure
    enter imagedescription here
  7. Send the mail or whatever you want to do

Over all your Login app will look something like this

enter image description here

like image 844
ravi ranjan Avatar asked Oct 21 '25 05:10

ravi ranjan


1 Answers

This is helpful, indeed. But I was facing issue with the web hook url authentication. The logic app connector was returning 401 – Unauthorized for the http request, as the password was encoded. Took a while to understand why it is throwing unauthorized even after providing correct credentials. Hence, copying the original password helped in that case ( if not anything else).

like image 111
JayaChatterjee-MSFT Avatar answered Oct 25 '25 20:10

JayaChatterjee-MSFT



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!