Compare your kafka configuration to the default values for a given kafka version
Project description
kafkacfg
: Kafka configuration inspector
Kafka has a lot of parameters, tunables and knobs, and the configuration page isn't the easiest to parse. kafkacfg
allows you to parse your kafka configuration file help you understand what it does.
$ cat test.properties
num.io.threads = 10
broker.id = 1001
auto.create.topics.enable = false
background.threads = 10
$ kafkacfg explain -k 3.4 test.properties | jq .
[
{
"name": "num.io.threads",
"override": "10",
"description": "The number of threads that the server uses for processing requests, which may include disk I/O",
"type": "int",
"default": "8",
"valid_values": "[1,...]",
"importance": "high",
"update_mode": "cluster-wide"
},
{
"name": "broker.id",
"override": "1001",
"description": "The broker id for this server. If unset, a unique broker id will be generated.To avoid conflicts between zookeeper generated broker id's and user configured broker id's, generated broker ids start from reserved.broker.max.id + 1.",
"type": "int",
"default": "-1",
"valid_values": null,
"importance": "high",
"update_mode": "read-only"
},
{
"name": "auto.create.topics.enable",
"override": "false",
"description": "Enable auto creation of topic on the server",
"type": "boolean",
"default": "true",
"valid_values": null,
"importance": "high",
"update_mode": "read-only"
},
{
"name": "background.threads",
"override": "10",
"description": "The number of threads to use for various background processing tasks",
"type": "int",
"default": "10",
"valid_values": "[1,...]",
"importance": "high",
"update_mode": "cluster-wide"
}
]
This format makes it easy to pipe it through table formatting tools such as jtbl
:
$ kafkacfg explain -k 3.4 test.properties | jtbl
╒═══════════════════════════╤════════════╤═══════════════════════════════════╤═════════╤═══════════╤════════════════╤══════════════╤═══════════════╕
│ name │ override │ description │ type │ default │ valid_values │ importance │ update_mode │
╞═══════════════════════════╪════════════╪═══════════════════════════════════╪═════════╪═══════════╪════════════════╪══════════════╪═══════════════╡
│ num.io.threads │ 10 │ The number of threads that the se │ int │ 8 │ [1,...] │ high │ cluster-wide │
│ │ │ rver uses for processing requests │ │ │ │ │ │
│ │ │ , which may include disk I/O │ │ │ │ │ │
├───────────────────────────┼────────────┼───────────────────────────────────┼─────────┼───────────┼────────────────┼──────────────┼───────────────┤
│ broker.id │ 1001 │ The broker id for this server. If │ int │ -1 │ │ high │ read-only │
│ │ │ unset, a unique broker id will b │ │ │ │ │ │
│ │ │ e generated.To avoid conflicts be │ │ │ │ │ │
│ │ │ tween zookeeper generated broker │ │ │ │ │ │
│ │ │ id's and user configured broker i │ │ │ │ │ │
│ │ │ d's, generated broker ids start f │ │ │ │ │ │
│ │ │ rom reserved.broker.max.id + 1. │ │ │ │ │ │
├───────────────────────────┼────────────┼───────────────────────────────────┼─────────┼───────────┼────────────────┼──────────────┼───────────────┤
│ auto.create.topics.enable │ false │ Enable auto creation of topic on │ boolean │ true │ │ high │ read-only │
│ │ │ the server │ │ │ │ │ │
├───────────────────────────┼────────────┼───────────────────────────────────┼─────────┼───────────┼────────────────┼──────────────┼───────────────┤
│ background.threads │ 10 │ The number of threads to use for │ int │ 10 │ [1,...] │ high │ cluster-wide │
│ │ │ various background processing tas │ │ │ │ │ │
│ │ │ ks │ │ │ │ │ │
╘═══════════════════════════╧════════════╧═══════════════════════════════════╧═════════╧═══════════╧════════════════╧══════════════╧═══════════════╛
The overrides
command will only display and enrich the configuration tunables with non-default values, to help you understand in what way your kafka configuration was tuned:
$ kafkacfg overrides -k 3.4 test.properties | jtbl
name override description type default valid_values importance update_mode
------------------------- ---------- ---------------------------------------------------------------------------------------------- ------- --------- -------------- ------------ -------------
num.io.threads 10 The number of threads that the server uses for processing requests, which may include disk I/O int 8 [1,...] high cluster-wide
auto.create.topics.enable false Enable auto creation of topic on the server boolean true high read-only
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file kafkacfg-0.2.0.tar.gz
.
File metadata
- Download URL: kafkacfg-0.2.0.tar.gz
- Upload date:
- Size: 282.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.5 Darwin/23.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8604a776419477e307e2362c82fe903ca48ca63f2bf57dccb43d3bb9d8d424b |
|
MD5 | 30671c25e4a9a74286cb6401e27f848b |
|
BLAKE2b-256 | 3e5740b3dd02b733e4b11579161a19096df0d665e4e2fda778fce68004dc069e |
File details
Details for the file kafkacfg-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: kafkacfg-0.2.0-py3-none-any.whl
- Upload date:
- Size: 309.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.5 Darwin/23.0.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba5e8086ebd5c86a30c3782f6b8fe84df35eecc28d6529b54f4422ada4f3893c |
|
MD5 | 8dbc535536f7f68250977860b67ec720 |
|
BLAKE2b-256 | 7b989c428559df0b556e5ca055a316a5ed0700afe5da169815cca0676458b03a |