2024-07-26 11:50:02 +05:30
|
|
|
## Consumer Lag feature break down
|
|
|
|
|
|
2024-08-26 20:28:11 +05:30
|
|
|
### 1) Consumer Group Details
|
2024-07-26 11:50:02 +05:30
|
|
|
|
|
|
|
|
API endpoint:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
POST /api/v1/messaging-queues/kafka/consumer-lag/consumer-details
|
|
|
|
|
```
|
|
|
|
|
|
2024-08-26 20:28:11 +05:30
|
|
|
Request-Body
|
2024-07-26 11:50:02 +05:30
|
|
|
```json
|
|
|
|
|
{
|
2024-08-26 20:28:11 +05:30
|
|
|
"start": 1724429217000000000,
|
|
|
|
|
"end": 1724431017000000000,
|
2024-07-31 17:55:13 +05:30
|
|
|
"variables": {
|
2024-08-26 20:28:11 +05:30
|
|
|
"partition": "0",
|
|
|
|
|
"topic": "topic1",
|
|
|
|
|
"consumer_group": "cg1"
|
2024-07-31 17:55:13 +05:30
|
|
|
}
|
2024-07-26 11:50:02 +05:30
|
|
|
}
|
|
|
|
|
```
|
2024-08-26 20:28:11 +05:30
|
|
|
Response in query range `table` format
|
2024-07-26 11:50:02 +05:30
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"status": "success",
|
|
|
|
|
"data": {
|
|
|
|
|
"resultType": "",
|
|
|
|
|
"result": [
|
|
|
|
|
{
|
|
|
|
|
"table": {
|
|
|
|
|
"columns": [
|
|
|
|
|
{
|
|
|
|
|
"name": "service_name",
|
|
|
|
|
"queryName": "",
|
|
|
|
|
"isValueColumn": false
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-08-26 20:28:11 +05:30
|
|
|
"name": "p99",
|
2024-07-26 11:50:02 +05:30
|
|
|
"queryName": "",
|
|
|
|
|
"isValueColumn": false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "error_rate",
|
|
|
|
|
"queryName": "",
|
|
|
|
|
"isValueColumn": false
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-08-26 20:28:11 +05:30
|
|
|
"name": "throughput",
|
|
|
|
|
"queryName": "",
|
|
|
|
|
"isValueColumn": false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "avg_msg_size",
|
2024-07-26 11:50:02 +05:30
|
|
|
"queryName": "",
|
|
|
|
|
"isValueColumn": false
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"rows": [
|
|
|
|
|
{
|
|
|
|
|
"data": {
|
2024-08-26 20:28:11 +05:30
|
|
|
"avg_msg_size": "15",
|
2024-07-26 11:50:02 +05:30
|
|
|
"error_rate": "0",
|
2024-08-26 20:28:11 +05:30
|
|
|
"p99": "0.47993265000000035",
|
|
|
|
|
"service_name": "consumer-svc",
|
|
|
|
|
"throughput": "39.86888888888889"
|
2024-07-26 11:50:02 +05:30
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
2024-08-26 20:28:11 +05:30
|
|
|
|
|
|
|
|
----
|
|
|
|
|
|
|
|
|
|
### 2) Producer Details
|
|
|
|
|
|
|
|
|
|
API endpoint:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
POST /api/v1/messaging-queues/kafka/consumer-lag/producer-details
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Request-Body
|
|
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"start": 1724429217000000000,
|
|
|
|
|
"end": 1724431017000000000,
|
|
|
|
|
"variables": {
|
|
|
|
|
"partition": "0",
|
|
|
|
|
"topic": "topic1"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Response in query range `table` format
|
2024-07-26 11:50:02 +05:30
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"status": "success",
|
|
|
|
|
"data": {
|
|
|
|
|
"resultType": "",
|
|
|
|
|
"result": [
|
|
|
|
|
{
|
|
|
|
|
"table": {
|
|
|
|
|
"columns": [
|
|
|
|
|
{
|
|
|
|
|
"name": "service_name",
|
|
|
|
|
"queryName": "",
|
|
|
|
|
"isValueColumn": false
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-08-26 20:28:11 +05:30
|
|
|
"name": "p99",
|
2024-07-26 11:50:02 +05:30
|
|
|
"queryName": "",
|
|
|
|
|
"isValueColumn": false
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-08-26 20:28:11 +05:30
|
|
|
"name": "error_percentage",
|
2024-07-26 11:50:02 +05:30
|
|
|
"queryName": "",
|
|
|
|
|
"isValueColumn": false
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-08-26 20:35:08 +05:30
|
|
|
"name": "throughput",
|
2024-07-26 11:50:02 +05:30
|
|
|
"queryName": "",
|
|
|
|
|
"isValueColumn": false
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"rows": [
|
|
|
|
|
{
|
|
|
|
|
"data": {
|
2024-08-26 20:28:11 +05:30
|
|
|
"error_percentage": "0",
|
|
|
|
|
"p99": "5.51359028",
|
2024-08-26 20:35:08 +05:30
|
|
|
"throughput": "39.86888888888889",
|
2024-07-26 11:50:02 +05:30
|
|
|
"service_name": "producer-svc"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
2024-08-26 20:28:11 +05:30
|
|
|
### 3) Network Fetch Latency:
|
2024-08-07 13:51:00 +05:30
|
|
|
|
|
|
|
|
API endpoint:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
POST /api/v1/messaging-queues/kafka/consumer-lag/network-latency
|
|
|
|
|
```
|
|
|
|
|
|
2024-08-26 20:28:11 +05:30
|
|
|
Request-Body
|
2024-08-07 13:51:00 +05:30
|
|
|
```json
|
|
|
|
|
{
|
2024-08-26 20:28:11 +05:30
|
|
|
"start": 1724673937000000000,
|
|
|
|
|
"end": 1724675737000000000,
|
2024-08-07 13:51:00 +05:30
|
|
|
"variables": {
|
2024-08-27 18:27:44 +05:30
|
|
|
"consumer_group": "cg1",
|
|
|
|
|
"partition": "0"
|
2024-08-07 13:51:00 +05:30
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
2024-08-26 20:28:11 +05:30
|
|
|
Response in query range `table` format
|
2024-08-07 13:51:00 +05:30
|
|
|
```json
|
|
|
|
|
{
|
|
|
|
|
"status": "success",
|
|
|
|
|
"data": {
|
|
|
|
|
"resultType": "",
|
|
|
|
|
"result": [
|
|
|
|
|
{
|
|
|
|
|
"table": {
|
|
|
|
|
"columns": [
|
|
|
|
|
{
|
2024-08-26 20:28:11 +05:30
|
|
|
"name": "service_name",
|
2024-08-07 13:51:00 +05:30
|
|
|
"queryName": "",
|
|
|
|
|
"isValueColumn": false
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-08-26 20:28:11 +05:30
|
|
|
"name": "client_id",
|
2024-08-07 13:51:00 +05:30
|
|
|
"queryName": "",
|
|
|
|
|
"isValueColumn": false
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"name": "service_instance_id",
|
|
|
|
|
"queryName": "",
|
|
|
|
|
"isValueColumn": false
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-08-26 20:28:11 +05:30
|
|
|
"name": "latency",
|
|
|
|
|
"queryName": "latency",
|
2024-08-07 13:51:00 +05:30
|
|
|
"isValueColumn": true
|
|
|
|
|
},
|
|
|
|
|
{
|
2024-08-26 20:28:11 +05:30
|
|
|
"name": "throughput",
|
|
|
|
|
"queryName": "throughput",
|
2024-08-07 13:51:00 +05:30
|
|
|
"isValueColumn": true
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"rows": [
|
|
|
|
|
{
|
|
|
|
|
"data": {
|
2024-08-26 20:28:11 +05:30
|
|
|
"client_id": "consumer-cg1-1",
|
2024-08-27 18:27:44 +05:30
|
|
|
"latency": 48.99,
|
|
|
|
|
"service_instance_id": "b0a851d7-1735-4e3f-8f5f-7c63a8a55a24",
|
2024-08-26 20:28:11 +05:30
|
|
|
"service_name": "consumer-svc",
|
2024-08-27 18:27:44 +05:30
|
|
|
"throughput": 14.97
|
2024-08-07 13:51:00 +05:30
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"data": {
|
2024-08-26 20:28:11 +05:30
|
|
|
"client_id": "consumer-cg1-1",
|
2024-08-27 18:27:44 +05:30
|
|
|
"latency": 25.21,
|
|
|
|
|
"service_instance_id": "ccf49550-2e8f-4c7b-be29-b9e0891ef93d",
|
2024-08-26 20:28:11 +05:30
|
|
|
"service_name": "consumer-svc",
|
2024-08-27 18:27:44 +05:30
|
|
|
"throughput": 24.91
|
2024-08-07 13:51:00 +05:30
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
2024-09-30 18:13:39 +05:30
|
|
|
|
|
|
|
|
### Onboarding APIs
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
/api/v1/messaging-queues/kafka/consumer-lag/onboarding-producers
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
{
|
|
|
|
|
"status": "success",
|
|
|
|
|
"data": {
|
|
|
|
|
"resultType": "",
|
|
|
|
|
"result": [
|
|
|
|
|
{
|
|
|
|
|
"queryName": "onboard_producers",
|
|
|
|
|
"series": [
|
|
|
|
|
{
|
|
|
|
|
"labels": {},
|
|
|
|
|
"labelsArray": [
|
|
|
|
|
{
|
|
|
|
|
"result": "All attributes are present and meet the conditions"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"values": []
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
/api/v1/messaging-queues/kafka/consumer-lag/onboarding-consumers
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
{
|
|
|
|
|
"status": "success",
|
|
|
|
|
"data": {
|
|
|
|
|
"resultType": "",
|
|
|
|
|
"result": [
|
|
|
|
|
{
|
|
|
|
|
"queryName": "onboard_consumers",
|
|
|
|
|
"series": [
|
|
|
|
|
{
|
|
|
|
|
"labels": {},
|
|
|
|
|
"labelsArray": [
|
|
|
|
|
{
|
|
|
|
|
"result": "All attributes are present and meet the conditions"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"values": []
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
127.0.0.1:8080/api/v1/messaging-queues/kafka/consumer-lag/onboarding-kafka
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
{
|
|
|
|
|
"status": "success",
|
|
|
|
|
"data": {
|
|
|
|
|
"resultType": "",
|
|
|
|
|
"result": [
|
|
|
|
|
{
|
|
|
|
|
"queryName": "onboard_consumers",
|
|
|
|
|
"series": [
|
|
|
|
|
{
|
|
|
|
|
"labels": {},
|
|
|
|
|
"labelsArray": [
|
|
|
|
|
{
|
|
|
|
|
"result": "Neither metric (kafka_consumer_fetch_latency_avg nor kafka_consumer_group_lag) is present in the given time range."
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"values": []
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|