Conversation
|
@weeco Hello Martin! Can you please review this PR? My org. plans to move away from Honestly, unless these metrics are added, we would have to fork it for a while( Thank you!
|
|
Hey @jsurloppe and @vst-name , apologies for the very delayed review. Thanks for the PR! A few points: 1. Granularity config not respected The new partition-level metrics (partitionUnderReplicated and partitionLeader) don't check the topics.granularity config. Please add this check in the partition loop, for _, partition := range topic.Partitions {
// Skip partition metrics if granularity is set to topic level
if e.minionSvc.Cfg.Topics.Granularity == minion.TopicGranularityTopic {
continue
}
// ... rest of the code
}2. Consider adding a partition_info metric To make it easier to query "under-replicated partitions by leader" without complex PromQL joins, I'd suggest adding a fourth metric following the existing topicInfo / e.partitionInfo = prometheus.NewDesc(
prometheus.BuildFQName(e.cfg.Namespace, "kafka", "topic_partition_info"),
"Partition metadata with leader as label for joining",
[]string{"topic_name", "partition_id", "leader_id"},
nil,
)With value always = 1. This allows queries like: |

Hi,
This PR add 3 metrics:
That's 3 metrics that we miss from kminion, it would be nice to have them in all in one place. ;)