Domain name for API request: dbbrain.intl.tencentcloudapi.com.
This API is used to obtain the health score and deduction for exceptions in the specified time period (30 minutes) based on the instance ID.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Action | Yes | String | Common Params. The value used for this API: DescribeHealthScore. |
Version | Yes | String | Common Params. The value used for this API: 2019-10-16. |
Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
InstanceId | Yes | String | The instance ID that needs to obtain the health score |
Time | Yes | Timestamp ISO8601 | Time to obtain the health score |
Product | Yes | String | Service type. Valid values: mysql (TencentDB for MySQL), cynosdb (TDSQL-C for MySQL (compatible with MySQL)). Default value: mysql . |
Parameter Name | Type | Description |
---|---|---|
Data | HealthScoreInfo | Health score and deduction for exceptions |
RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
This example shows you how to obtain health score and deduction for exceptions based on instance ID.
https://dbbrain.intl.tencentcloudapi.com/?Action=DescribeHealthScore
&InstanceId=test
&Time=2019-01-01T00:00:00+08:00
&Product=mysql
&<common request parameters>
{
"Response": {
"RequestId": "8b307450-6118-11eb-88ad-93c053da68c6",
"Data": {
"IssueTypes": [
{
"TotalCount": 0,
"Events": [],
"IssueType": "AVAILABILITY"
},
{
"TotalCount": 0,
"Events": [],
"IssueType": "MAINTAINABILITY"
},
{
"TotalCount": 1,
"Events": [
{
"DiagType": “high-concurrency/pressure request”,
"ScoreLost": 6,
"EndTime": "2021-01-28 11:20:42",
"StartTime": "2021-01-28 11:00:00",
"EventId": 780019530,
"Outline": "Monitoring metric \"cpu_use_rate\" triggered an alarm. Current value: 100",
"Severity": 1,
"Metric": "cpu_use_rate",
"Count": 1
}
],
"IssueType": "PERFORMANCE"
},
{
"TotalCount": 3,
"Events": [
{
"DiagType": “Replicate”,
"ScoreLost": 10,
"EndTime": "2021-01-28 11:21:17",
"StartTime": "2021-01-28 11:20:25",
"EventId": 780018741,
"Outline": “I/O replication thread interrupted”,
"Severity": 1,
"Metric": "slave_io_running",
"Count": 1
},
{
"DiagType": “Replicate”,
"ScoreLost": 10,
"EndTime": "2021-01-28 11:09:37",
"StartTime": "2021-01-28 11:09:32",
"EventId": 779984938,
"Outline": “I/O replication thread interrupted”,
"Severity": 1,
"Metric": "slave_io_running",
"Count": 1
},
{
"DiagType": “Replicate”,
"ScoreLost": 8,
"EndTime": "2021-01-28 11:20:00",
"StartTime": "2021-01-28 11:20:00",
"EventId": 780021648,
"Outline": “Replication delayed”,
"Severity": 2,
"Metric": "slave_io_running",
"Count": 1
}
],
"IssueType": "RELIABILITY"
}
],
"EventsTotalCount": 4,
"HealthLevel": "RISK"
}
}
}
POST / HTTP/1.1
Host: dbbrain.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeHealthScore
<Common request parameters>
{
"InstanceId": "cdb-8jawylhf",
"Product": "mysql",
"Time": "2021-02-01 14:30:00"
}
{
"Response": {
"RequestId": "0736b315-a9be-4991-92e6-28eccf3d31e3",
"Data": {
"IssueTypes": [
{
"TotalCount": 0,
"Events": [],
"IssueType": "AVAILABILITY"
},
{
"TotalCount": 0,
"Events": [],
"IssueType": "MAINTAINABILITY"
},
{
"TotalCount": 0,
"Events": [],
"IssueType": "PERFORMANCE"
},
{
"TotalCount": 0,
"Events": [],
"IssueType": "RELIABILITY"
}
],
"HealthScore": 100,
"EventsTotalCount": 0,
"HealthLevel": "HEALTH"
}
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Error Code | Description |
---|---|
AuthFailure | Error with CAM signature/authentication. |
InternalError | Internal error. |
InvalidParameter | Incorrect parameter. |
InvalidParameterValue | Incorrect parameter value. |
MissingParameter | Missing parameter. |
OperationDenied.UserHasNoStrategy | Error with CAM authentication. |
RequestLimitExceeded | The number of requests exceeds the frequency limit. |
UnauthorizedOperation | The operation is unauthorized. |
UnknownParameter | Unknown parameter. |
UnsupportedOperation | Unsupported operation. |
Was this page helpful?