question

BalaKrishna-2429 avatar image
0 Votes"
BalaKrishna-2429 asked Monalla-MSFT commented

Azure aks monitor alerts triggered only once not every 5 minutes

I have a aks cluster in Azure . I wrote query to fetch "Crashloop Backoff" pods every five minutes but this will trigger alert only once not every 5 minutes

KubeEvents
| where ClusterName =~ 'my-aks-test-01'
| where ObjectKind =~ 'Pod'
| where Reason =~ 'BackOff'
| project TimeGenerated, Count,Name,Reason
| summarize AggregatedValue=sum(Count) by bin(TimeGenerated, 1m)
| where todouble(AggregatedValue) > 1

142014-image.png


azure-monitorazure-kubernetes-service
image.png (22.3 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @BalaKrishna-2429 - Did the below answer help resolve your issue, if not please revert back with any questions.
and if it did, please feel free to "accept as answer" so it can be beneficial to the community.

0 Votes 0 ·

1 Answer

stan avatar image
0 Votes"
stan answered

Hi,
It seems you are using Log Alert v2. These alerts have auto mitigate option (stateful alerts) which will trigger once in Fired state once the threshold is met and will trigger another time with Resolved state once threshold is no longer met. Auto mitigate option is useful if you have logs like metrics / performance data that have certain frequency of the data being logged. In your case it is better to edit the alert and uncheck auto mitigate option.

Please "Accept the answer" if the information helped you. This will help us and others in the community as well.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.