@@ -45,11 +45,11 @@ information provided by kafka-health-check.
45
45
## Usage
46
46
47
47
```
48
- kafka-health-check usage :
48
+ Usage of kafka-health-check:
49
49
-broker-host string
50
- ip address or hostname of broker host
50
+ ip address or hostname of broker host (default "localhost")
51
51
-broker-id uint
52
- id of the Kafka broker to health check (default 0)
52
+ id of the Kafka broker to health check
53
53
-broker-port uint
54
54
Kafka broker port (default 9092)
55
55
-check-interval duration
@@ -74,7 +74,10 @@ Broker health can be queried at `/`:
74
74
75
75
```
76
76
$ curl -s <broker-host>:8000/
77
- {"status":"sync"}
77
+ {
78
+ "broker": 1,
79
+ "status": "sync"
80
+ }
78
81
```
79
82
80
83
Return codes and status values are:
@@ -90,7 +93,17 @@ The returned json contains details about replicas the broker is lagging behind:
90
93
91
94
```
92
95
$ curl -s <broker-host>:8000/
93
- {"status":"imok","out-of-sync":[{"topic":"mytopic","partition":0}],"replication-failures":1}
96
+ {
97
+ "broker": 3,
98
+ "status": "imok",
99
+ "out-of-sync": [
100
+ {
101
+ "topic": "mytopic",
102
+ "partition": 0
103
+ }
104
+ ],
105
+ "replication-failures": 1
106
+ }
94
107
```
95
108
96
109
## Cluster Health
@@ -99,7 +112,9 @@ Cluster health can be queried at `/cluster`:
99
112
100
113
```
101
114
$ curl -s <broker-host>:8000/cluster
102
- {"status":"green"}
115
+ {
116
+ "status": "green"
117
+ }
103
118
```
104
119
105
120
Return codes and status values are:
@@ -111,16 +126,33 @@ The returned json contains details about metadata status and partition replicati
111
126
112
127
```
113
128
$ curl -s <broker-host>:8000/cluster
114
- {"status":"yellow","topics":[
115
- {"topic":"mytopic","Status":"yellow","partitions":{
116
- "2":{"status":"yellow","OSR":[3]},
117
- "1":{"status":"yellow","OSR":[3]}
118
- }}
119
- ]}
129
+ {
130
+ "status": "yellow",
131
+ "topics": [
132
+ {
133
+ "topic": "mytopic",
134
+ "status": "yellow",
135
+ "partitions": {
136
+ "1": {
137
+ "status": "yellow",
138
+ "OSR": [
139
+ 3
140
+ ]
141
+ },
142
+ "2": {
143
+ "status": "yellow",
144
+ "OSR": [
145
+ 3
146
+ ]
147
+ }
148
+ }
149
+ }
150
+ ]
151
+ }
120
152
```
121
153
122
154
The fields for additional info and structures are:
123
- * ` topics ` for topic replication status: ` [{"topic":"mytopic","Status ":"yellow","partitions":{"2":{"status":"yellow","OSR":[3]}}}] `
155
+ * ` topics ` for topic replication status: ` [{"topic":"mytopic","status ":"yellow","partitions":{"2":{"status":"yellow","OSR":[3]}}}] `
124
156
In this data, ` OSR ` means out-of-sync replica and contains the list of all brokers that are not in the ISR.
125
157
* ` metadata ` for inconsistencies between ZooKeeper and Kafka metadata: ` [{"broker":3,"status":"red","problem":"Missing in ZooKeeper"}] `
126
158
* ` zookeeper ` for problems with ZooKeeper connection or data, contains a single string: ` "Fetching brokers failed: ..." `
0 commit comments