Alert is triggered twice

Nasimjon Tohirov 261 Reputation points
2022-10-31T16:50:28.14+00:00

Hi everyone,
I'm having difficulty responding to an alert that responds twice to the same context. Is it possible to solve this somehow? I'm already tired of looking and trying different tests.

Regards,
Nasimjon.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,664 questions
0 comments No comments
{count} votes

Accepted answer
  1. Maxim Sergeev 6,586 Reputation points Microsoft Employee
    2022-11-01T18:11:19.52+00:00

    Hi there,

    Now I see. You use 90 seconds time windows and you run your query 60 seconds. This is where a second trigger can get last additional 30 seconds where first alert has been captured.

    IMHO, it's better to use 65 seconds (for example) time range instead of 90

    0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Maxim Sergeev 6,586 Reputation points Microsoft Employee
    2022-10-31T23:30:44.517+00:00

    Hi there,

    We need more details. What type of alerts is you referring? Logs-based, metric based, activity-log based, resource-health based, service-health based?

    0 comments No comments

  2. Nasimjon Tohirov 261 Reputation points
    2022-11-01T07:22:17.983+00:00

    Hi maserg,
    Thanks for replying.
    Sorry about that. My type of alert is a Log search.
    Query is:

    let EndTime = now();  
    let StartTime = EndTime - 90s;  
    ContainerLog  
     | where TimeGenerated between(StartTime .. EndTime)  
     | sort by TimeGenerated desc  
     | where LogEntry has "Error"  
     | summarize count() Image, LogEntry  
    

    Container logs are coming every 30 seconds to Log Analytics workspace.
    Measurement:
    Measure: Table rows
    Aggregation type: Count
    Aggregation granularity: 1 minute
    Alert log:
    Operator: Greater than
    Threshold value: 0
    Frequency of evaluation: 1minute
    Then send to Logic App
    What am I doing wrong since it comes twice?

    Regards,
    Nasimjon.

    0 comments No comments

  3. Nasimjon Tohirov 261 Reputation points
    2022-11-02T13:19:21.233+00:00

    Hi folks,
    Defiantly, helped a little, but not a little. They are coming twice, but decreased a little. Sometimes are not coming too. Can I use Azure logic app for skipped, maybe?
    Thanks.

    Regards,
    Nasimjon.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.