Skip to content

Commit f6c25d8

Browse files
authored
Update alerts-create-log-alert-rule.md
custom functions comment
1 parent f0f232c commit f6c25d8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

articles/azure-monitor/alerts/alerts-create-log-alert-rule.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ Alerts triggered by these alert rules contain a payload that uses the [common al
4747
- Log search alert rule queries support [ago()](/azure/data-explorer/kusto/query/ago-function) with [timespan literals](/azure/data-explorer/kusto/query/scalar-data-types/timespan#timespan-literals) only.
4848
- `AggregatedValue` is a reserved word. You can't use it in the query on log search alert rules.
4949
- The combined size of all data in the properties of the log search alert rules can't exceed 64 KB.
50+
- When defining custom functions in the KQL query for log search alerts, it is important to be cautious with function code that includes relative time clauses (e.g., now()). Custom functions with relative time clauses that are not defined within the log search alert KQL query itself can introduce inconsistencies in query results, potentially impacting the accuracy and reliability of alert evaluations. Therefore:
51+
- To ensure accurate and timely alerting, always define relative time clauses directly within the log search alert KQL query.
52+
- If time ranges are needed inside the function, they should be passed as parameters and used in the function.
5053

5154
:::image type="content" source="media/alerts-create-new-alert-rule/alerts-log-rule-query-pane.png" alt-text="Screenshot that shows the query pane during the creation of a new log search alert rule.":::
5255

0 commit comments

Comments
 (0)