{"id":13575952,"url":"https://github.com/danielqsj/kafka_exporter","last_synced_at":"2026-01-16T19:28:24.789Z","repository":{"id":26164115,"uuid":"103609203","full_name":"danielqsj/kafka_exporter","owner":"danielqsj","description":"Kafka exporter for Prometheus","archived":false,"fork":false,"pushed_at":"2025-07-21T02:55:30.000Z","size":19852,"stargazers_count":2387,"open_issues_count":248,"forks_count":660,"subscribers_count":36,"default_branch":"master","last_synced_at":"2025-07-21T04:23:55.217Z","etag":null,"topics":["kafka","kafka-metrics","metrics","prometheus","prometheus-exporter"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danielqsj.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-09-15T03:23:21.000Z","updated_at":"2025-07-21T02:55:34.000Z","dependencies_parsed_at":"2023-02-18T02:30:58.724Z","dependency_job_id":"fe01cfda-70ae-4521-a618-2e82652ed35e","html_url":"https://github.com/danielqsj/kafka_exporter","commit_stats":{"total_commits":231,"total_committers":54,"mean_commits":4.277777777777778,"dds":0.4632034632034632,"last_synced_commit":"7b5bef35d955744a2901bdd3ab218b305251e30e"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/danielqsj/kafka_exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielqsj%2Fkafka_exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielqsj%2Fkafka_exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielqsj%2Fkafka_exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielqsj%2Fkafka_exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielqsj","download_url":"https://codeload.github.com/danielqsj/kafka_exporter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielqsj%2Fkafka_exporter/sbom","scorecard":{"id":320319,"data":{"date":"2025-08-11","repo":{"name":"github.com/danielqsj/kafka_exporter","commit":"18b18d5e798095722c9189bc27db3842fab31a98"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.5,"checks":[{"name":"Code-Review","score":6,"reason":"Found 11/16 approved changesets -- score normalized to 6","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":10,"reason":"12 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/danielqsj/kafka_exporter/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/danielqsj/kafka_exporter/build.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/danielqsj/kafka_exporter/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/danielqsj/kafka_exporter/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/danielqsj/kafka_exporter/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/danielqsj/kafka_exporter/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/danielqsj/kafka_exporter/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/danielqsj/kafka_exporter/release.yml/master?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating quay.io/prometheus/busybox:latest to quay.io/prometheus/busybox:latest@sha256:dfa54ef35e438b9e71ac5549159074576b6382f95ce1a434088e05fd6b730bc4","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.9.0 not signed: https://api.github.com/repos/danielqsj/kafka_exporter/releases/200612222","Warn: release artifact v1.8.0 not signed: https://api.github.com/repos/danielqsj/kafka_exporter/releases/171003955","Warn: release artifact v1.7.0 not signed: https://api.github.com/repos/danielqsj/kafka_exporter/releases/104044844","Warn: release artifact v1.6.0 not signed: https://api.github.com/repos/danielqsj/kafka_exporter/releases/75183010","Warn: release artifact v1.5.0 not signed: https://api.github.com/repos/danielqsj/kafka_exporter/releases/75051997","Warn: release artifact v1.9.0 does not have provenance: https://api.github.com/repos/danielqsj/kafka_exporter/releases/200612222","Warn: release artifact v1.8.0 does not have provenance: https://api.github.com/repos/danielqsj/kafka_exporter/releases/171003955","Warn: release artifact v1.7.0 does not have provenance: https://api.github.com/repos/danielqsj/kafka_exporter/releases/104044844","Warn: release artifact v1.6.0 does not have provenance: https://api.github.com/repos/danielqsj/kafka_exporter/releases/75183010","Warn: release artifact v1.5.0 does not have provenance: https://api.github.com/repos/danielqsj/kafka_exporter/releases/75051997"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 25 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T01:11:50.252Z","repository_id":26164115,"created_at":"2025-08-18T01:11:50.252Z","updated_at":"2025-08-18T01:11:50.252Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28481726,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["kafka","kafka-metrics","metrics","prometheus","prometheus-exporter"],"created_at":"2024-08-01T15:01:05.749Z","updated_at":"2026-01-16T19:28:24.780Z","avatar_url":"https://github.com/danielqsj.png","language":"Go","funding_links":[],"categories":["Go","Prometheus-Exporter","Management \u0026 Monitoring"],"sub_categories":["Metrics \u0026 Exporters"],"readme":"![kafka_exporter](https://socialify.git.ci/danielqsj/kafka_exporter/image?description=1\u0026font=Inter\u0026forks=1\u0026pattern=Signal\u0026stargazers=1\u0026theme=Light)\n\nkafka_exporter\n==============\n\n[![CI](https://github.com/danielqsj/kafka_exporter/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/danielqsj/kafka_exporter/actions/workflows/ci.yml)[![Docker Pulls](https://img.shields.io/docker/pulls/danielqsj/kafka-exporter.svg)](https://hub.docker.com/r/danielqsj/kafka-exporter)[![Go Report Card](https://goreportcard.com/badge/github.com/danielqsj/kafka_exporter)](https://goreportcard.com/report/github.com/danielqsj/kafka_exporter)[![Language](https://img.shields.io/badge/language-Go-red.svg)](https://github.com/danielqsj/kafka-exporter)[![GitHub release](https://img.shields.io/badge/release-1.9.0-green.svg)](https://github.com/danielqsj/kafka-exporter/releases)[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)\n\nKafka exporter for Prometheus. For other metrics from Kafka, have a look at the [JMX exporter](https://github.com/prometheus/jmx_exporter).\n\nTable of Contents\n-----------------\n\n- [Compatibility](#compatibility)\n- [Dependency](#dependency)\n- [Download](#download)\n- [Compile](#compile)\n  - [Build Binary](#build-binary)\n  - [Build Docker Image](#build-docker-image)\n- [Run](#run)\n  - [Run Binary](#run-binary)\n  - [Run Docker Image](#run-docker-image)\n  - [Run Docker Compose](#run-docker-compose)\n- [Flags](#flags)\n  - [Notes](#notes)\n- [Metrics](#metrics)\n  - [Brokers](#brokers)\n  - [Topics](#topics)\n  - [Consumer Groups](#consumer-groups)\n- [Grafana Dashboard](#grafana-dashboard)\n- [Contribute](#contribute)\n- [Donation](#donation)\n- [License](#license)\n\nCompatibility\n-------------\n\nSupport [Apache Kafka](https://kafka.apache.org) version 0.10.1.0 (and later).\n\nDependency\n----------\n\n- [Prometheus](https://prometheus.io)\n- [Sarama](https://shopify.github.io/sarama)\n- [Golang](https://golang.org)\n\nDownload\n--------\n\nBinary can be downloaded from [Releases](https://github.com/danielqsj/kafka_exporter/releases) page.\n\nCompile\n-------\n\n### Build Binary\n\n```shell\nmake\n```\n\n### Build Docker Image\n\n```shell\nmake docker\n```\n\nDocker Hub Image\n----------------\n\n```shell\ndocker pull danielqsj/kafka-exporter:latest\n```\n\nIt can be used directly instead of having to build the image yourself. ([Docker Hub danielqsj/kafka-exporter](https://hub.docker.com/r/danielqsj/kafka-exporter)\\)\n\nRun\n---\n\n### Run Binary\n\n```shell\nkafka_exporter --kafka.server=kafka:9092 [--kafka.server=another-server ...]\n```\n\n### Run Docker Image\n\n```\ndocker run -ti --rm -p 9308:9308 danielqsj/kafka-exporter --kafka.server=kafka:9092 [--kafka.server=another-server ...]\n```\n\n### Run Docker Compose\nmake a `docker-compose.yml` flie\n```\nservices:\n  kafka-exporter:\n    image: danielqsj/kafka-exporter \n    command: [\"--kafka.server=kafka:9092\", \"[--kafka.server=another-server ...]\"]\n    ports:\n      - 9308:9308     \n```\nthen run it\n```\ndocker-compose up -d\n```\n\nFlags\n-----\n\nThis image is configurable using different flags\n\n| Flag name                      | Default        | Description                                                                                                                                    |\n|--------------------------------|----------------|------------------------------------------------------------------------------------------------------------------------------------------------|\n| kafka.server                   | kafka:9092     | Addresses (host:port) of Kafka server                                                                                                          |\n| kafka.version                  | 2.0.0          | Kafka broker version                                                                                                                           |\n| sasl.enabled                   | false          | Connect using SASL/PLAIN                                                                                                                       |\n| sasl.handshake                 | true           | Only set this to false if using a non-Kafka SASL proxy                                                                                         |\n| sasl.username                  |                | SASL user name                                                                                                                                 |\n| sasl.password                  |                | SASL user password                                                                                                                             |\n| sasl.mechanism                 | plain          | SASL SCRAM SHA algorithm: sha256 or sha512 or SASL mechanism: gssapi, awsiam or oauthbearer                                                    |\n| sasl.aws-region                | AWS_REGION env | The AWS region for IAM SASL authentication                                                                                                     |\n| sasl.oauthbearer-token-url     |                | The url to retrieve OAuthBearer tokens from, for OAuthBearer SASL authentication                                                               |\n| sasl.service-name              |                | Service name when using Kerberos Auth                                                                                                          |\n| sasl.kerberos-config-path      |                | Kerberos config path                                                                                                                           |\n| sasl.realm                     |                | Kerberos realm                                                                                                                                 |\n| sasl.keytab-path               |                | Kerberos keytab file path                                                                                                                      |\n| sasl.kerberos-auth-type        |                | Kerberos auth type. Either 'keytabAuth' or 'userAuth'                                                                                          |\n| tls.enabled                    | false          | Connect to Kafka using TLS                                                                                                                     |\n| tls.server-name                |                | Used to verify the hostname on the returned certificates unless tls.insecure-skip-tls-verify is given. The kafka server's name should be given |\n| tls.ca-file                    |                | The optional certificate authority file for Kafka TLS client authentication                                                                    |\n| tls.cert-file                  |                | The optional certificate file for Kafka client authentication                                                                                  |\n| tls.key-file                   |                | The optional key file for Kafka client authentication                                                                                          |\n| tls.insecure-skip-tls-verify   | false          | If true, the server's certificate will not be checked for validity                                                                             |\n| server.tls.enabled             | false          | Enable TLS for web server                                                                                                                      |\n| server.tls.mutual-auth-enabled | false          | Enable TLS client mutual authentication                                                                                                        |\n| server.tls.ca-file             |                | The certificate authority file for the web server                                                                                              |\n| server.tls.cert-file           |                | The certificate file for the web server                                                                                                        |\n| server.tls.key-file            |                | The key file for the web server                                                                                                                |\n| topic.filter                   | .*             | Regex that determines which topics to collect                                                                                                  |\n| topic.exclude                  | ^$             | Regex that determines which topics to exclude                                                                                                  |\n| group.filter                   | .*             | Regex that determines which consumer groups to collect                                                                                         |\n| group.exclude                  | ^$             | Regex that determines which consumer groups to exclude                                                                                         |\n| web.listen-address             | :9308          | Address to listen on for web interface and telemetry                                                                                           |\n| web.telemetry-path             | /metrics       | Path under which to expose metrics                                                                                                             |\n| log.enable-sarama              | false          | Turn on Sarama logging                                                                                                                         |\n| use.consumelag.zookeeper       | false          | if you need to use a group from zookeeper                                                                                                      |\n| zookeeper.server               | localhost:2181 | Address (hosts) of zookeeper server                                                                                                            |\n| kafka.labels                   |                | Kafka cluster name                                                                                                                             |\n| refresh.metadata               | 30s            | Metadata refresh interval                                                                                                                      |\n| offset.show-all                | true           | Whether show the offset/lag for all consumer group, otherwise, only show connected consumer groups                                             |\n| concurrent.enable              | false          | If true, all scrapes will trigger kafka operations otherwise, they will share results. WARN: This should be disabled on large clusters         |\n| topic.workers                  | 100            | Number of topic workers                                                                                                                        |\n| verbosity                      | 0              | Verbosity log level                                                                                                                            |\n\n### Notes\n\nBoolean values are uniquely managed by [Kingpin](https://github.com/alecthomas/kingpin/blob/master/README.md#boolean-values). Each boolean flag will have a negative complement:\n`--\u003cname\u003e` and `--no-\u003cname\u003e`.\n\nFor example:\n\nIf you need to disable `sasl.handshake`, you could add flag `--no-sasl.handshake`\n\nMetrics\n-------\n\nDocuments about exposed Prometheus metrics.\n\nFor details on the underlying metrics please see [Apache Kafka](https://kafka.apache.org/documentation).\n\n### Brokers\n\n**Metrics details**\n\n| Name                | Exposed informations                   |\n|---------------------|----------------------------------------|\n| `kafka_brokers`     | Number of Brokers in the Kafka Cluster |\n| `kafka_broker_info` | Information about the Kafka Broker     |\n\n**Metrics output example**\n\n```txt\n# HELP kafka_brokers Number of Brokers in the Kafka Cluster.\n# TYPE kafka_brokers gauge\nkafka_brokers 3\n# HELP kafka_broker_info Information about the Kafka Broker.\n# TYPE kafka_broker_info gauge\nkafka_broker_info{address=\"b-1.kafka-example.org:9092\",id=\"1\"} 1\nkafka_broker_info{address=\"b-2.kafka-example.org:9092\",id=\"2\"} 2\nkafka_broker_info{address=\"b-3.kafka-example.org:9092\",id=\"3\"} 3\n```\n\n### Topics\n\n**Required permissions**\n\nDescribe all topics.\n\n**Metrics details**\n\n| Name                                               | Exposed informations                                |\n|----------------------------------------------------|-----------------------------------------------------|\n| `kafka_topic_partitions`                           | Number of partitions for this Topic                 |\n| `kafka_topic_partition_current_offset`             | Current Offset of a Broker at Topic/Partition       |\n| `kafka_topic_partition_oldest_offset`              | Oldest Offset of a Broker at Topic/Partition        |\n| `kafka_topic_partition_in_sync_replica`            | Number of In-Sync Replicas for this Topic/Partition |\n| `kafka_topic_partition_leader`                     | Leader Broker ID of this Topic/Partition            |\n| `kafka_topic_partition_leader_is_preferred`        | 1 if Topic/Partition is using the Preferred Broker  |\n| `kafka_topic_partition_replicas`                   | Number of Replicas for this Topic/Partition         |\n| `kafka_topic_partition_under_replicated_partition` | 1 if Topic/Partition is under Replicated            |\n\n**Metrics output example**\n\n```txt\n# HELP kafka_topic_partitions Number of partitions for this Topic\n# TYPE kafka_topic_partitions gauge\nkafka_topic_partitions{topic=\"__consumer_offsets\"} 50\n\n# HELP kafka_topic_partition_current_offset Current Offset of a Broker at Topic/Partition\n# TYPE kafka_topic_partition_current_offset gauge\nkafka_topic_partition_current_offset{partition=\"0\",topic=\"__consumer_offsets\"} 0\n\n# HELP kafka_topic_partition_oldest_offset Oldest Offset of a Broker at Topic/Partition\n# TYPE kafka_topic_partition_oldest_offset gauge\nkafka_topic_partition_oldest_offset{partition=\"0\",topic=\"__consumer_offsets\"} 0\n\n# HELP kafka_topic_partition_in_sync_replica Number of In-Sync Replicas for this Topic/Partition\n# TYPE kafka_topic_partition_in_sync_replica gauge\nkafka_topic_partition_in_sync_replica{partition=\"0\",topic=\"__consumer_offsets\"} 3\n\n# HELP kafka_topic_partition_leader Leader Broker ID of this Topic/Partition\n# TYPE kafka_topic_partition_leader gauge\nkafka_topic_partition_leader{partition=\"0\",topic=\"__consumer_offsets\"} 0\n\n# HELP kafka_topic_partition_leader_is_preferred 1 if Topic/Partition is using the Preferred Broker\n# TYPE kafka_topic_partition_leader_is_preferred gauge\nkafka_topic_partition_leader_is_preferred{partition=\"0\",topic=\"__consumer_offsets\"} 1\n\n# HELP kafka_topic_partition_replicas Number of Replicas for this Topic/Partition\n# TYPE kafka_topic_partition_replicas gauge\nkafka_topic_partition_replicas{partition=\"0\",topic=\"__consumer_offsets\"} 3\n\n# HELP kafka_topic_partition_under_replicated_partition 1 if Topic/Partition is under Replicated\n# TYPE kafka_topic_partition_under_replicated_partition gauge\nkafka_topic_partition_under_replicated_partition{partition=\"0\",topic=\"__consumer_offsets\"} 0\n```\n\n### Consumer Groups\n\n**Required permissions**\n\nDescribe all groups.\n\n**Metrics details**\n\n| Name                                         | Exposed informations                                                     |\n|----------------------------------------------|--------------------------------------------------------------------------|\n| `kafka_consumergroup_current_offset`         | Current Offset of a ConsumerGroup at Topic/Partition                     |\n| `kafka_consumergroup_current_offset_sum`     | Current Offset of a ConsumerGroup at Topic for all partitions            |\n| `kafka_consumergroup_lag`                    | Current Approximate Lag of a ConsumerGroup at Topic/Partition            |\n| `kafka_consumergroup_lag_sum`                | Current Approximate Lag of a ConsumerGroup at Topic for all partitions   |\n| `kafka_consumergroupzookeeper_lag_zookeeper` | Current Approximate Lag(zookeeper) of a ConsumerGroup at Topic/Partition |\n| `kafka_consumergroup_members`                | Amount of members in a consumer group                                    |\n\n#### Important Note\n\nTo be able to collect the metrics `kafka_consumergroupzookeeper_lag_zookeeper`, you must set the following flags:\n\n* `use.consumelag.zookeeper`: enable collect consume lag from zookeeper\n* `zookeeper.server`: address for connection to zookeeper\n\n**Metrics output example**\n\n```txt\n# HELP kafka_consumergroup_current_offset Current Offset of a ConsumerGroup at Topic/Partition\n# TYPE kafka_consumergroup_current_offset gauge\nkafka_consumergroup_current_offset{consumergroup=\"KMOffsetCache-kafka-manager-3806276532-ml44w\",partition=\"0\",topic=\"__consumer_offsets\"} -1\n\n# HELP kafka_consumergroup_current_offset_sum Current Offset of a ConsumerGroup at Topic for all partitions\n# TYPE kafka_consumergroup_current_offset_sum gauge\nkafka_consumergroup_current_offset_sum{consumergroup=\"KMOffsetCache-kafka-manager-3806276532-ml44w\",topic=\"__consumer_offsets\"} -1\n\n# HELP kafka_consumergroup_lag Current Approximate Lag of a ConsumerGroup at Topic/Partition\n# TYPE kafka_consumergroup_lag gauge\nkafka_consumergroup_lag{consumergroup=\"KMOffsetCache-kafka-manager-3806276532-ml44w\",partition=\"0\",topic=\"__consumer_offsets\"} 1\n\n# HELP kafka_consumergroup_lag_sum Current Approximate Lag of a ConsumerGroup at Topic for all partitions\n# TYPE kafka_consumergroup_lag_sum gauge\nkafka_consumergroup_lag_sum{consumergroup=\"KMOffsetCache-kafka-manager-3806276532-ml44w\",topic=\"__consumer_offsets\"} 1\n\n# HELP kafka_consumergroup_members Amount of members in a consumer group\n# TYPE kafka_consumergroup_members gauge\nkafka_consumergroup_members{consumergroup=\"KMOffsetCache-kafka-manager-3806276532-ml44w\"} 1\n\n```\n\n#### Do not see any Consumer group or Lag information\n\nThe consumer group metrics would not be available, if there is no consumer with a consumer group.\n\nRun consumer with a consumer group using command line tool\n```bash\nkafka-console-consumer.sh \\\n    --consumer.config /path/to/client.properties \\\n    --bootstrap-server localhost:9092 \\\n    --topic test \\\n    --group test-conusmer-group \\\n    --from-beginning\n```\n\nGrafana Dashboard\n-------\n\nGrafana Dashboard ID: 7589, name: Kafka Exporter Overview.\n\nFor details of the dashboard please see [Kafka Exporter Overview](https://grafana.com/grafana/dashboards/7589-kafka-exporter-overview/).\n\nContribute\n----------\n\nIf you like Kafka Exporter, please give me a star. This will help more people know Kafka Exporter.\n\nPlease feel free to send me [pull requests](https://github.com/danielqsj/kafka_exporter/pulls).\n\nContributors ✨\n----------\n\nThanks goes to these wonderful people:\n\n\u003ca href=\"https://github.com/danielqsj/kafka_exporter/graphs/contributors\"\u003e\n\u003cimg src=\"https://contrib.rocks/image?repo=danielqsj/kafka_exporter\" /\u003e\n\u003c/a\u003e\n\nStar ⭐\n----------\n\n[![Stargazers over time](https://starchart.cc/danielqsj/kafka_exporter.svg)](https://starchart.cc/danielqsj/kafka_exporter)\n\nDonation\n--------\n\nYour donation will encourage me to continue to improve Kafka Exporter. Support Alipay donation.\n\n![](https://github.com/danielqsj/kafka_exporter/raw/master/alipay.jpg)\n\nLicense\n-------\n\nCode is licensed under the [Apache License 2.0](https://github.com/danielqsj/kafka_exporter/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielqsj%2Fkafka_exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielqsj%2Fkafka_exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielqsj%2Fkafka_exporter/lists"}