Home

/kafka/topics/partions/ts?cluster_id={cluster_name}?topic_id={topic_name}&start_time={timestamp}&end_time={timestamp}&interval={minutes}&metric_pattern={metric}

Gets details about a given partition.

Request
GET http://unravel-host:3000/api/v1/kafka/topics/partions/ts?cluster_id={cluster_name}?topic_id={topic_name}&start_time={timestamp}&end_time={timestamp}&interval={minutes}&metric_pattern={metric}
Path parameters

None.

Query parameters

Name

Type

Description

cluster_id

string

Cluster name. Required.

topic_id

string

Topic name. Required.

start_time

string

Start time. Format: YYYY-MM-DDTHH:MM:SS.NNNZ or Unix epoch time. Required.

end_time

string

End time. Format: YYYY-MM-DDTHH:MM:SS.NNNZ or Unix epoch time. Required.

interval

string

Size of interval in minutes . Required.

metric_pattern

string

List of metrics to graph. Separate each metric with +. Required.

Valid values are:

Offset: LogEndOffset___consumer_offsets_partition-number-Value
Consumer Lag: CgLag_*_topic___consumer_offsets_partition-number

where partition-number corresponds to the partition number (0-any number).

Response body

The response body contains details about the given partition.

Name

Type

Description

key_as_string

string

Date in UTC time.

Key

string

Date in Unix epoch time.

Doc_count

string

Document count.

Avg_vl

string

Array of key average value pairs.

Examples

Request:

curl -X GET "http://myserver.com:3000/api/v1/kafka/topics/partions/ts?cluster_id=QAHDP26B&end_time=2019-06-04T12:24:49%2B05:30&interval=1m&metric_pattern=CgLag_*_topic___consumer_offsets_5&start_time=2019-06-04T11:24:49%2B05:30&topic_id=__consumer_offsets" -H  "accept: application/json" -H  "Authorization: JWT token"

Response:

{
"key_as_string":"2019-06-04T05:55:00.000Z",
"Key":1559627700000,
"Doc_count":3,
"Avg_vl":{"value":2016}
}