-
Notifications
You must be signed in to change notification settings - Fork 803
http request consumer group status
Consumer Group Status
This endpoint returns the current status of the consumer group, based on evaluation of all partitions it consumes. The evaluation is performed on request, and the result is calculated based on the consumer lag evaluation rules.
There are two versions of this request. The endpoint "/status" will return an object that only includes the partitions that are in a bad state. The endpoint "/lag" will return an object that includes all partitions for the consumer, regardless of the evaluated state of the partition. The second version can be used for full reporting of consumer message lag on all partitions.
GET /v3/kafka/(cluster)/consumer/(group)/status or GET /v3/kafka/(cluster)/consumer/(group)/lag
Name | Format | Description |
---|---|---|
cluster | string | The name of a Kafka cluster, as returned by the List Clusters request. |
group | string | The name of a Kafka consumer group, as returned by the List Consumers request. |
The response contains an status
key whose value is a map containing the results and details on which partitions are not in a good state:
{
"error": false,
"message": "consumer group status returned",
"status": {
"cluster": "clustername",
"group": "groupname",
"status": "WARN",
"complete": 1.0,
"maxlag": {
"complete": 1,
"current_lag": 0,
"end": {
"lag": 25,
"offset": 2542,
"timestamp": 1511780580382
},
"owner": "",
"partition": 0,
"start": {
"lag": 20,
"offset": 2526,
"timestamp": 1511200836090
},
"status": "WARN",
"topic": "topicA"
},
"partitions": [
{
"complete": 1,
"current_lag": 0,
"end": {
"lag": 25,
"offset": 2542,
"timestamp": 1511780580382
},
"owner": "",
"partition": 0,
"start": {
"lag": 20,
"offset": 2526,
"timestamp": 1511200836090
},
"status": "WARN",
"topic": "topicA"
}
...
]
},
"request": {
"url": "/v3/kafka/clustername/consumer/groupname/status",
"host": "responding.host.example.com",
}
}
The status
fields are a short string describing the status of either the group or partition. Valid strings are:
- NOTFOUND - The group is not found for this cluster
- OK - The group or partition is in a good state
- WARN - The group or partition is in a warning state. For example, the offsets are moving but lag is increasing
- ERR - The group is in an error state. For example, the offsets have stopped for one or more partitions but lag is non-zero
- STOP - The partition has stopped. For example, the offsets have not been committed in a long period of time
- STALL - The partition has stalled. For example, the offsets are being committed, but they are not changing and the lag is non-zero
The maxlag
field contains a partition status object that describes the partition that currently has the highest ending lag.
Partition objects contain detailed information about a single partition and offset commits. This includes the following fields:
-
topic
- the topic name -
partition
- the numeric partition ID -
owner
- the client host that owns this partition -
complete
- a value between 0 and 1 showing the percentage of information Burrow has on this partition -
current_lag
- the current lag for this partition -
status
- the status string (as described above) for this partition -
start
- the first offset (oldest) in the interval that Burrow is storing for this partition -
end
- the last offset (youngest) in the interval
The start
and end
objects are exactly the same. They contain a timestamp
for the offset commit, the numeric offset
committed, and the lag
that was calculated for the partition at the time of the offset commit.
- Cluster Not Found If an unknown cluster name is provided, a 404 error will be returned with a JSON response body.
- Group Not Found If an unknown consumer group name is provided, a 404 error will be returned with a JSON response body.
- JSON Encoding Error If there is a failure encoding the JSON response, a 500 error will be returned with a JSON response body.