question

HanShih-1830 avatar image
0 Votes"
HanShih-1830 asked AnuragSingh-MSFT commented

Application insights alert rule specify checking time

Some questions when I trying to create alert rules:
1. Can I specify the time when to trigger this checking mechanism?
2. After making some modification of the rule, can I manually trigger the rules and check query result immediately?



azure-monitor
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.

1 Answer

AnuragSingh-MSFT avatar image
0 Votes"
AnuragSingh-MSFT answered AnuragSingh-MSFT commented

Hi @HanShih-1830,

Welcome to Microsoft Q&A! Thanks for posting the question.

I understand that you are trying to test alert rule in Azure monitor. Please note that the alert rules are based on signals which can be of any of the following types: metric, activity log, Application Insights, and log. (ref: Overview of alert rule). For most of these signal types, you can not define a specific time when this checking would happen. It continues to run in the background looking for the signals.

However, some of the alert rule types (for example the Metric based and log based) you can specify the frequency of evaluation - which would not give you the exact time when it will run, but you will get an idea of time period when it is going to run. For example, if you specify the frequency as 5 minutes you may expect the rule to run within the next 5 minutes.

Please let me know if you have any questions.


Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

· 2
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.

Thanks for your explanation.
If I understand it correctly, after making some updates on my alert rule, the only thing I can do is waiting for the next triggered event and see if it works as expected?

0 Votes 0 ·

@HanShih-1830, yes, you are correct. I can suggest changing the frequency to a lower time span (5 minutes or so) to get immediate feedback.
> If you are working with Metric based alert, you might use tools like CpuStres v2.0 to simulate high CPU usage for the duration and check if it gets fired.
> For Log based alert, you could tweak the query a bit to check for alert generation (for example, if you want alert to be fired for count > 5, for test you may change it to count < 5 and see if you get the alert. After confirmation, change the query back.
> For other types of alert (activity/auditing etc.), that are straight forward and should be easy to setup (without testing).

I hope the above pointers would help you with your alert rule creation. Please let me know if you have any questions.


To benefit the community find the right answers, please do mark the post which was helpful by clicking on ‘Accept Answer’ & ‘Up-Vote’.

0 Votes 0 ·