skip to Main Content

I am trying to create an alert rule in Application Insights based on a Kusto query.

If the resultset is empty, I want to fire the alert.

If I set the alert logic to:

operater = Equal To and the Threshold Value = 0,

it does not work.
Which seems to me to be correct, that it does not work, but I cannot check on "Empty".

Maybe someone has a solution?

Thanks in advance.

2

Answers


  1. I have reproduced in my environment and got expected results as below and I followed Microsoft-Document:

    While creating alert rule:

    enter image description here

    After selecting Custom log search then type the query:

     AzureActivity | where false
    

    enter image description here

    And then in next section equal to and then threshold to 0:

    enter image description here

    The problem might be in your actions section of creating alert.

    enter image description here

    Output:

    enter image description here

    enter image description here

    enter image description here

    I followed the Microsoft document and got alert, please try to follow the process you will definitely get alert

    Alternatively, you can use Query | Count

    Login or Signup to reply.
  2. You can create an alert rule in Application Insights based on a Kusto query and fire the alert when the result set is empty. To do this, you can use the "count" aggregation function in your Kusto query to count the number of rows returned by the query. If the count is zero, then you can fire the alert.

    your_kusto_query_here
    | count

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search