groups: - name: DanielqsjKafkaExporter rules: - alert: KafkaTopicsReplicas expr: 'min(kafka_topic_partition_in_sync_replica) by (topic) < 3' for: 0m labels: severity: critical annotations: summary: Kafka topics replicas (instance {{ $labels.instance }}) description: "Kafka topic {{ $labels.topic }} has fewer than 3 in-sync replicas ({{ $value }}), data durability is at risk.\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" - alert: KafkaConsumerGroupLag expr: 'sum(kafka_consumergroup_lag) by (consumergroup) > 10000' for: 1m labels: severity: warning annotations: summary: Kafka consumer group lag (instance {{ $labels.instance }}) description: "Kafka consumer group {{ $labels.consumergroup }} is lagging behind ({{ $value }} messages)\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"