Set trigger conditions
Use evaluate expressions to define trigger conditions for alert monitoring rules. For example, set Trigger Condition to Data matches the expression and enter an evaluate expression. An alert triggers when query and analysis results match the expression.
Overview
The results of query statements serve as input, with fields from set operation results used as variables. If the evaluate expression returns true, an alert is triggered.
Configure a trigger condition
The evaluate expression evaluates the results of set operations. If it returns true, an alert is triggered. The following trigger condition types are supported:
-
Data is returned: Checks the number of rows in the set operation result. The condition is met if at least one row is returned.

-
The query result contains: Checks the number of rows in the set operation result. Supported operators include greater than, less than, and equal to. The condition is met if the number of rows satisfies the specified condition. For example, if the result set contains 4 rows and the trigger condition is The query result contains > 10, the condition is not met and no alert is generated.

-
Data matches the expression: Checks the content of the rows in the set operation result. The condition is met if the content of at least one row matches the evaluate expression. For example, if the result set contains one row (pv=900) and the trigger condition is Data matches the expression, pv > 1000, the condition is not met and no alert is generated.

-
The query result contains and matches: Checks both the number and content of rows in the set operation result. An alert is triggered only when a specific number of rows match the evaluate expression. For example, if the result set has four rows (pv=900, pv=1100, pv=1200, pv=1001) and the trigger condition is The query result contains and matches > 3, pv > 1000, the condition is met and an alert is generated.
