Skip to content

[v8.4.0] alert number is not as expected when using variables #2971

@EnyaWong

Description

@EnyaWong

Question and Steps to reproduce

Question and Steps to reproduce
当使用变量的时候,告警数量不符合预期。
在配置告警规则,如果使用变量(比如application, 枚举值3个:aiwing-facade-app-middle,aiwing-facade-app,aiwing-facade-app-ai)

告警promql:
sum by(instance, application) (rate(http_server_requests_seconds_count{application="$application", uri="/check"}[1m])) > 0

Image

问题:
aiwing-facade-app-middle对应有2个instance,aiwing-facade-app对应有2个instance,aiwing-facade-app-ai对应有2个instance
/chek接口每30s请求一次
那么预期会收到6个告警,但是实际上只收到3个告警。

Relevant logs and configurations

Version

v8.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions