Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com> Co-authored-by: chenxiaoxiong <chenxiaoxiong@huawei.com> Co-committed-by: chenxiaoxiong <chenxiaoxiong@huawei.com>
13 KiB
Querying Partition Monitoring Data
Function
This API is used to query the monitoring data of a specified partition of a stream.
Calling Method
For details, see Calling APIs.
URI
GET /v2/{project_id}/streams/{stream_name}/partitions/{partition_id}/metrics
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Project ID |
stream_name |
Yes |
String |
Stream name Maximum: 60 |
partition_id |
Yes |
String |
Partition ID.Two partition ID formats are available:- shardId-0000000000- 0For example, if a stream has three partitions, the partition IDs are 0, 1, and 2, or shardId-0000000000, shardId-0000000001, and shardId-0000000002. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
label |
No |
String |
Partition monitoring metric. (Either label or label_list must be specified. If both label_list and label exist, label_list is used.)
Enumeration values:
|
label_list |
No |
String |
List of labels separated by commas (,) to query multiple labels in batches. (Either label or label_list must be specified. If both label_list and label exist, label_list is used.) |
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 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
|---|---|---|
metrics |
Metrics object |
Data object |
Parameter |
Type |
Description |
|---|---|---|
dataPoints |
Array of DataPoint objects |
Monitoring data |
label |
String |
Monitoring metric |
Example Requests
Querying Partition Monitoring Data
GET https://{Endpoint}/v2/{project_id}/streams/{stream_name}/partitions/{partition_id}/metrics
Example Responses
None
Status Codes
Status Code |
Description |
|---|---|
200 |
Normal response |
Error Codes
See Error Codes.