Skip to content
This repository was archived by the owner on Mar 26, 2025. It is now read-only.

Commit 7b6eb3b

Browse files
authored
Merge pull request #49 from banzaicloud/example-alert-fix
use min and max value of partitioncount
2 parents da5b19c + 96512ce commit 7b6eb3b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config/samples/example-prometheus-alerts.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ prometheus:
3131
image: 'wurstmeister/kafka:2.12-2.1.0'
3232
command: 'upScale'
3333
- alert: PartitionCountHigh
34-
expr: kafka_server_replicamanager_partitioncount > 100
34+
expr: max(kafka_server_replicamanager_partitioncount) by (kubernetes_namespace, kafka_cr) > 100
3535
for: 3m
3636
labels:
3737
severity: alert
@@ -44,7 +44,7 @@ prometheus:
4444
image: 'wurstmeister/kafka:2.12-2.1.0'
4545
command: 'upScale'
4646
- alert: PartitionCountLow
47-
expr: kafka_server_replicamanager_partitioncount < 40
47+
expr: min(kafka_server_replicamanager_partitioncount) by (kubernetes_namespace, kafka_cr) < 40
4848
for: 3m
4949
labels:
5050
severity: alert

0 commit comments

Comments
 (0)