promtool unit test got: []

19 views
Skip to first unread message

theodore

unread,
Jul 21, 2023, 10:22:37 AM7/21/23
to Prometheus Users
Hello,
I need help for a alert test.
here is my configuration:

- alert: HighTotalActiveConnectionCountPerCluster
expr: count by (cluster) (confluent_kafka_server_active_connection_count{application="confluent", job="confluent cloud"}) > 500
for: 5m
labels:
category: KafkaIssue
severity: high
annotations:
summary: "The number of active connections to the '{{ $labels.cluster }}' cluster has exceeded 500."


- interval: 1m
input_series:

- series: 'confluent_kafka_server_active_connection_count{application="confluent", job="confluent cloud", team="DpIntegrations", cluster="Eu-Stg"}'
values: '400+1x60 600+0x60 450+0x60 550+0x60 500+0x60 700+0x60 650+1x60 750+0x60 800+1x60 950+0x60 1000+0x60'
alert_rule_test:
- eval_time: 10m
alertname: HighTotalActiveConnectionCountPerCluster
exp_alerts:
- exp_labels:
alertname: HighTotalActiveConnectionCountPerCluster
category: KafkaIssue
severity: high
job: confluent cloud
application: confluent
cluster: Eu-Stg
exp_annotations:
summary: "The number of active connections to the 'Eu-Stg' cluster has exceeded 500."



but I am getting this error;

alertname: HighTotalActiveConnectionCountPerCluster, time: 10m,
        exp:[
            0:
              Labels:{alertname="HighTotalActiveConnectionCountPerCluster", application="confluent", category="KafkaIssue", cluster="Eu-Stg", job="confluent cloud", severity="high"}
              Annotations:{summary="The number of active connections to the 'Eu-Stg' cluster has exceeded 500."}
            ],
        got:[]
Reply all
Reply to author
Forward
0 new messages