Querying Partition Monitoring Information
Function
This API is used to query partition monitoring information.
When querying the partition monitoring information, you need to specify the stream name, partition ID, monitoring index, and start time and end time of the monitoring.
URI
Request
- Example request
GET https://{endpoint}/v2/{project_id}/streams/stream_test/partitions/shardId-0000000000/metrics?label=total_put_bytes_per_partition&start_time=1534917441&end_time=1534921041 - Parameter description
Table 1 Parameter description Parameter
Mandatory
Type
Description
stream_name
Yes
String
Name of the DIS stream to be queried.
partition_id
Yes
String
Unique identifier of the partition.
label
Yes
String
Partition monitoring metrics.
- total_put_bytes_per_partition: total input traffic in a partition (byte)
- total_get_bytes_per_partition: total output traffic in a partition (byte)
- total_put_records_per_partition: total number of input records in a partition
- total_get_records_per_partition: total number of output records in a partition
start_time
Yes
Long
Monitoring start time, which is a 10-digit timestamp.
end_time
Yes
Long
Monitoring end time, which is a 10-digit timestamp.
Response
- Example response
{ "metrics": { "dataPoints": [ { "timestamp": 1533200460, "value": 14130 }, { "timestamp": 1533200340, "value": 18030 } ], "label": "total_put_bytes_per_partition" } } - Parameter description
Table 2 Response parameter description Parameter
Type
Description
metrics
Object
Monitoring data object.
Table 3 metrics parameter description Parameter
Type
Description
dataPoints
List<DataPoint>
Partition monitoring data.
label
String
Partition monitoring metrics.
- total_put_bytes_per_partition: total input traffic in a partition (byte)
- total_get_bytes_per_partition: total output traffic in a partition (byte)
- total_put_records_per_partition: total number of input records in a partition
- total_get_records_per_partition: total number of output records in a partition
Table 4 DataPoint parameter description Parameter
Type
Description
timestamp
Long
Specifies the timestamp.
value
Long
Specifies the monitoring value corresponding to the timestamp.
Status Code
- Normal
- Failed
For more information, see Error Codes.
Last Article: Querying Stream Monitoring Information
Next Article: Adding a Dump Task
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.