fix(kafka-operator): Kafka alert rules match only the old broker pod and PVC names
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- Nửa ngày
- Mức phù hợp với người mới
- 42/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- helm, kafka, kubernetes, prometheus
- Lĩnh vực
- devops, observability
Hướng nghiên cứu
Start with packages/system/kafka-operator/alerts/prometheus-rules.yaml and check the pod and PVC regexes in KafkaRunningOutOfSpace, ScrapeProblem, KafkaBrokerContainersDown and KafkaContainerRestartedInTheLast5Minutes. Then look at packages/system/kafka-operator/templates/alerts.yaml, whose loop is commented out, and at kafka.brokerPoolName in packages/apps/kafka/templates/_versions.tpl for the b-<hash> naming. Done means the patterns match both pool styles and the package renders a PrometheusRule, which needs maintainer agreement on re-enabling.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The Kafka alert rules in the kafka-operator package only know the broker pool named kafka, so they miss every broker of a cluster with a release-hashed pool. Today the rules are not deployed at all, so this breaks the moment someone turns them back on.
The template that loads them is commented out. packages/system/kafka-operator/templates/alerts.yaml wraps its whole .Files.Glob "alerts/*.yaml" loop in a template comment since #790, and rendering the package gives no PrometheusRule. The rules still sit in packages/system/kafka-operator/alerts/prometheus-rules.yaml.
The rules select broker pods with .+-kafka-[0-9]+ and data PVCs with data(-[0-9]+)?-(.+)-kafka-[0-9]+. Only a cluster migrated from ZooKeeper keeps a broker pool named kafka. Every other cluster gets a broker pool named b-<hash> (see kafka.brokerPoolName in packages/apps/kafka/templates/_versions.tpl). Its pods are <cluster>-b-<hash>-N and its data PVCs are data-0-<cluster>-b-<hash>-N, and neither pattern matches them. The controller pool c-<hash> is not matched either.
With the rules enabled again, this is what happens:
KafkaRunningOutOfSpaceandScrapeProblemnever fire for such a cluster.KafkaBrokerContainersDownisabsent(container_last_seen{container="kafka",pod=~".+-kafka-[0-9]+"}), so it fires all the time on a platform where no cluster has akafkapool.KafkaContainerRestartedInTheLast5Minutescompares allkafkacontainers with twice the matched ones, and the ratio is wrong once both pool styles exist.
This was already broken before the Strimzi 1.2 upgrade. The hashed pools came with support for several KRaft clusters per namespace, and the rules file did not change then.
Widening the broker patterns to (kafka|b-[0-9a-f]{8}) would fix the names. Matching on Strimzi labels may work better where the metric carries them. Turning the rules back on is a separate question from #790.
- Ngôn ngữ chính
- Go
- Star
- 2.2k
- Fork
- 209
- Merge trung bình
- 4 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 140
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của cozystack/cozystack
-
triage/needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
cozystack/cozystack#5464 · 1 reaction ·
Maintainer thường phản hồi trong vòng 3 ngày
-
test(kubernetes-nodes): stop hand-typing the default Talos version in tests that are not about itĐang mởarea/testing kind/cleanup triage/needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
cozystack/cozystack#5456 · 1 reaction ·
Maintainer thường phản hồi trong vòng 3 ngày
-
area/testing kind/cleanup triage/needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
cozystack/cozystack#5447 · 1 reaction ·
Maintainer thường phản hồi trong vòng 3 ngày
-
area/kubernetes kind/bug triage/needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
cozystack/cozystack#5445 · 1 reaction ·
Maintainer thường phản hồi trong vòng 3 ngày
-
kind/bug triage/needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
cozystack/cozystack#5438 · 1 reaction ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của cozystack/cozystack
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Correct local module testing instructions for Go sample contributorsCó thể đã có người làm @slievrly đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
internal/core: cleanAttachmentName splits a rune at the 255-byte cap and stores invalid UTF-8Có thể đã có người làm @pacwestnobody đã nhận hôm nay. Đang mởgo good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Podiom/Podiom#427 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
TestLaunchGolden spends about 98 seconds on fake-agent exit delays under -raceCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
factory:subtask
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
Maintainer thường phản hồi trong vòng 1 ngày