tomsun28 commented on code in PR #3673:
URL: https://github.com/apache/hertzbeat/pull/3673#discussion_r2298448557
##########
hertzbeat-common/src/main/java/org/apache/hertzbeat/common/entity/alerter/AlertDefine.java:
##########
@@ -100,6 +100,11 @@ public class AlertDefine {
@Size(max = 100)
private String datasource;
+ @Schema(title = "Query Expression", example = "SELECT * FROM metrics WHERE
value > 90")
+ @Size(max = 2048)
+ @Column(length = 2048)
+ private String queryExpr;
+
Review Comment:
👍 hi, overall it is very good.
We need to discuss whether the queryExpr for log here is reasonable. In the
previous design, the query expression and the judgment expre were together,
such as the promql threshold rule like, expr: `(100 - (avg
by(instance)(irate(node_cpu_seconds_total{mode="idle"}[5m])) * 100)) > 80`, you
can see the `(100 - (avg
by(instance)(irate(node_cpu_seconds_total{mode="idle"}[5m])) * 100))` is query
expression and the `> 80` is the judgment expression.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]