Why can't I create an azure alert rule with a specific KQL query

Alexander Andro Jae Diaz 0 Reputation points
2025-04-24T06:54:03.4666667+00:00

1

I was tasked to create an alert rule for a specific VM using custom log search and with query from the client's parameter sheet:

Event
| where EventLog == "System"
| where EventLevelName == "Critical"
| where Computer == "testVM1"
| where TimeGenerated > ago(1m)

with 1 minute aggregation granularity and 1 minute frequency evaluation based from the client's parameter sheet. As expected, upon creation it threw an error:

Error: Failed to create alert rule test. One-minute frequency is not supported for this query. Either switch to five-minute frequency or adapt the query.

I also found out that there are certain limitations in creating alert rules with 1 minute frequency. I just can't understand how and why is the query not acceptable? can someone explain it to me step by step?

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,574 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Clive Watson 7,556 Reputation points MVP
    2025-04-24T12:06:16.07+00:00

    Hi, You have answers on this on Stackoverflow and the details (as you mention) are listed here: https://learn.microsoft.com/en-us/azure/azure-monitor/alerts/alerts-troubleshoot-log#one-minute-frequency-isnt-supported-for-this-query
    if 1min is mandatory for you you'll have to modify the query until it succeeds but there is nothing obvious in what you are doing. You would normally to best practise move the time filter to the first line, worth a try https://learn.microsoft.com/en-us/kusto/query/best-practices?view=microsoft-fabric e.g.

    Event | where TimeGenerated > ago(1m) | where EventLog == "System" | where EventLevelName == "Critical" | where Computer == "testVM1"

    I'd also consider summarizing the data to reduce the return results, even if it just a test (example final line):

    | summarize count() by Computer


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.