locked
Azure Application Insights availability test alert via Azure Monitor RRS feed

  • Question

  • I'd like to set up an Application Insights availability test (a simple URL ping test) that invokes a webhook when it fails. The webhook can be configured when creating the test, however the alert there is "classic". Thus, in my understanding, this option is on the path of deprecation. So I'd use Monitor instead to invoke the webhook, but how?

    I see no way to create an alert rule in Azure Monitor that'll invoke an action group when an availability test fails. You can set the availability test as an alert target, but there only Activity Log signals are available (i.e. you can e.g. send out an alert when the webtest is deleted or changed, but not when it fires). You can target the AI resources, but apart from the Activity Log that only offers log search.

    Is my hunch correct, that with Monitor we need to write a log search query to in this case determine what a "failing" web test means for us, and sens alerts based on that?

    Thanks in advance!

    Sunday, August 26, 2018 2:55 PM

All replies

  • I tried to implement this with a log search criteria, but can't get the alert to fire. The idea is to query successful availability entries, and if there are none in the examined time period, the app is down.

    I tried this with == 0:

    And <1, thinking maybe 0 can't be used for some reason:

    And also tried the opposite (i.e. send alert when the site is available):

    In my understanding all three of these should work (as also made apparent by the charts), but none of them fired (and I've waited about an hour for each, just to be super-sure that it's not just badly lagging).

    What am I missing?

    Sunday, August 26, 2018 9:00 PM
  • Well the last alert did fire, but only after about 10 hours, and then it did so three times... This doesn't seem to be working as it should for me. I also tried to make the alert go away by stopping the app, which should have been recognized by the monitor, but it still doesn't notice it after 45 minutes.
    Monday, August 27, 2018 11:31 AM
  • Didn't notice it after 24 hours either...
    Tuesday, August 28, 2018 1:34 PM
  • Now it seems the alert is correctly firing (I've created a new one with the "less than 1" rule above) but it never gets resolved, despite the criteria not being met any more.
    Tuesday, August 28, 2018 3:31 PM