Querying Abnormal Instance Information by a Specific Metric
Function
This API is used to abnormal instance information by a specific metric. Before calling this API:
- Learn how to authorize and authenticate it.
- Obtain the required region and endpoint.
URI
GET /v3/{project_id}/instances/diagnosis-instance-infos
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
metric_name |
Yes |
String |
Metric name. |
offset |
Yes |
Integer |
Index offset. If offset is set to N, the query starts from the N+1 piece of data. The value is 0 by default, indicating that the query starts from the first piece of data. The value must be a number but cannot be a negative number. |
limit |
Yes |
Integer |
Number of records to be queried. The default value is 100. The value must be a positive integer. The minimum value is 1 and the maximum value is 100. |
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 token value. |
X-Language |
No |
String |
Request language type. The default value is en-us. Values:
|
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
total_count |
Integer |
Number of abnormal instances queried by the current metric. |
instance_infos |
Array of InstanceInfoForDiagnosis objects |
Information about the abnormal instances. |
Parameter |
Type |
Description |
---|---|---|
instance_id |
String |
Instance ID. |
master_node_id |
String |
Primary node ID. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Status code: 500
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Request
Querying abnormal instance information based on project_id and a metric name (The information is displayed on multiple pages.)
GET https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/diagnosis-instance-infos?metric_name=high_pressure&offset=0&limit=10
Example Response
Status code: 200
Success.
{ "total_count" : 6, "instance_infos" : [ { "instance_id" : "6206d5be05914703938ff9dfe5c07d34in07", "master_node_id" : "7fe925aa8bab4cc9bac3990a94386c29no07" }, { "instance_id" : "cbdb32e08f0440158c4f2998dbf69b14in07", "master_node_id" : "3e90e7b99b964dca9704b3af903fcb41no07" }, { "instance_id" : "325af119c2ca4e77b1deb4810a9b921bin07", "master_node_id" : "f4dfb362039a45818e59416abc9a5ca6no07" }, { "instance_id" : "9e8b52a5b6e84f4a9e4db01235b1c770in07", "master_node_id" : "408666cd6f104133ad0685b722f88cffno07" }, { "instance_id" : "5814254f12f74d16bd0a93885b00867fin07", "master_node_id" : "637d96ffbf6745ff835445fe87d08fc5no07" }, { "instance_id" : "d0da4882ebdf44bd9d3f1edf9b0bd4a2in07", "master_node_id" : "7a670f4ecdf14db5a4b5df737b0911a5no07" } ] }
Status Code
Status Code |
Description |
---|---|
200 |
Success. |
400 |
Client error. |
500 |
Server error. |
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot