Description
You can call this operation to view the details of an inspection report.
Call description
Prerequisites
You have passed the authentication for the OceanBase Cloud Platform (OCP) application service.
Request path
GET /api/v2/inspection/report/{id}
Request parameters
Path parameters
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| id | Integer | Yes | 2 | The ID of the inspection report. |
Response parameters
Basic data structure
| Parameter | Type | Description |
|---|---|---|
| data | Object | The information of InspectionReport. For more information, see Data structure of InspectionReport. |
| successful | Boolean | Indicates whether the request was successful. |
| timestamp | Datetime | The timestamp when the server completed the request. |
| duration | Integer | The amount of time taken by the server to process the request, in milliseconds. |
| status | Integer | The HTTP status code. |
| traceId | String | The trace ID of the request. This trace ID is used for troubleshooting. |
| server | String | The address of the application server that responded to the request. |
Data structure of InspectionReport
| Parameter | Type | Description |
|---|---|---|
| id | Integer | The ID of the inspection report. For information about how to obtain the inspection report ID, see Query all inspection tasks. |
| tag | InspectionTag | The information of InspectionTag. For more information, see Data structure of InspectionTag. |
| inspectionObject | InspectionObject | The information of InspectionObject. For more information, see Data structure of InspectionObject. |
| startTime | String | The inspection start time. |
| endTime | String | The inspection end time. This parameter is absent when the inspection task is running. |
| taskId | Integer | The ID of the inspection task. |
| itemTotalCount | Integer | The total number of inspection items. |
| itemFinishedCount | Integer | The number of completed inspection items. |
| highRiskCount | Integer | The number of high-risk inspection items. |
| mediumRiskCount | Integer | The number of medium-risk inspection items. |
| lowRiskCount | Integer | The number of low-risk inspection items. |
| taskState | String | The status of the inspection task. |
| inspectionItems | Array | The information about all inspection items in the inspection report. |
| reportItems | Array | All inspection items. |
Data structure of InspectionTag
| Parameter | Type | Description |
|---|---|---|
| id | Integer | The ID of the tag of the inspection scenario. |
| name | String | The name of the tag. |
| description | String | The description of the tag. |
| configType | String | The configuration type. |
Data structure of InspectionObject
| Parameter | Type | Description |
|---|---|---|
| objectId | Integer | The ID of the inspection object. |
| inspectionObjectType | String | The type of the inspection object. |
| name | String | The name of the inspection object. |
Examples
Sample request
GET /api/v2/inspection/report/{id}
Sample response
Note
The level parameter in reportItems indicates the risk level. If the level parameter is not returned, no risks exist.
{
"data": {
"endTime": "2024-05-22T21:27:06+08:00",
"highRiskCount": 0,
"id": 1000020,
"inspectionItems": [
{
"configType": "BUILTIN",
"description": "Collects statistics, for the past 24 hours, about the periods during which the average utilization per CPU core of the host at the 12th percentile is respectively the highest and the lowest, and about the level for 80% of the time (to be specific, the utilization is higher than the level during 80% of the time)",
"id": 45,
"identifier": 39,
"maxVersion": "127.127.127.127",
"minVersion": "0.0.0.0",
"name": "Host CPU Utilization Statistics",
"rules": [
{
"level": "LOW",
"validator": "[80,90)"
},
{
"level": "MEDIUM",
"validator": "[90,98)"
},
{
"level": "HIGH",
"validator": "[98,)"
}
],
"scriptId": 34,
"state": "ACTIVE",
"tags": [
{
"configType": "BUILTIN",
"description": "Checks the performance of resources managed by OCP, such as large transactions and slow queries. You can perform this check for performance analysis." ,
"id": 2,
"name": "Performance Inspection"
}
],
"targetType": "HOST",
"unit": "NUMBER"
}
],
"inspectionObject": {
"info": {
"obClusterId": "12",
"type": "PRIMARY"
},
"inspectionObjectType": "OB_CLUSTER",
"name": "AdminMETA",
"objectId": 1
},
"itemFinishedCount": 1,
"itemTotalCount": 1,
"lowRiskCount": 0,
"mediumRiskCount": 0,
"reportItems": [
{
"itemId": 45,
"key": "Lowest",
"rawValue": "55.25",
"target": "xxx.xxx.xxx.xxx",
"value": "55.25 (2024-05-22T07:27:05Z to 2024-05-22T09:27:05Z)"
},
{
"itemId": 45,
"key": "Highest",
"rawValue": "57.68",
"target": "xxx.xxx.xxx.xxx",
"value": "57.68 (2024-05-22T11:27:05Z to 2024-05-22T13:27:05Z)"
},
{
"itemId": 45,
"rawValue": "47.02",
"target": "xxx.xxx.xxx.xxx",
"value": "47.02 (Lowest during 80% of the time)"
}
],
"startTime": "2024-05-22T21:27:05+08:00",
"tag": {
"configType": "BUILTIN",
"description": "Checks the performance of resources managed by OCP, such as large transactions and slow queries. You can perform this check for performance analysis." ,
"id": 2,
"name": "Performance Inspection"
},
"taskId": 6005667,
"taskState": "SUCCESSFUL"
},
"duration": 176,
"server": "124075fe52",
"status": 200,
"successful": true,
"timestamp": "2024-07-30T14:13:04.106+08:00",
"traceId": "3bf92af9d1ce64a2"
}