redpanda-data / redpanda-data/kminion
Export numerical kafka_topic_info parameters/labels as individual metrics
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 705
- Forks
- 139
- Avg merge
- 5d 19h
- Merged PRs (30d)
- 1
Description
Currently kminion_kafka_topic_info metric exposes all topic parameters as labels. [1]
I've got an use-case where I'd need the replication_factor and min_insync_replicas values to be used in promql queries to verify if a given topic has under-min replicas, e.g:
kafka_topic_partition_replicas < "min_insync_replicas"
or a given topic has under-replicated partitions:
kafka_topic_partition_replicas < "replication_factor"
To do so, the only solution I found is to have these numerical topic parameters exposed as separate metrics, e.g:
kminion_kafka_topic_info_min_insync_replicas
kminion_kafka_topic_info_replication_factor
Would this be a good improvement for the kminion @weeco ?
[1] Sample:
kminion_kafka_topic_info{cleanup_policy="delete", container="kafka-minion", endpoint="metrics",
max_message_bytes="1048588", message_format_version="2.5-IV0", message_timestamp_type="CreateTime",
min_insync_replicas="2", partition_count="1", replication_factor="1", retention_bytes="-1", retention_ms="10000",
segment_bytes="536870912",
topic_name="00faec4f386fc8dda9688d402cc92d0c1082ee0d426909841e6b4d11750deb65"}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is identified in the issue. Start by locating the code that emits kminion_kafka_topic_info and review how its topic parameters are represented. Done means the requested numerical parameters are available as individual metrics suitable for PromQL comparisons.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kafka, prometheus
- Domain
- observability-sre
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100