Overview
Creates a Prometheus monitoring integration for the specified OceanBase Cloud database instance. This operation generates and returns a configuration file for configuring the Prometheus scrape target, enabling you to integrate the instance's monitoring metrics into your Prometheus monitoring system. After successful creation, you can use the returned configuration file to update your Prometheus configuration.
API details
Constraints
The caller must have an AccessKey for accessing the multi-cloud API. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.
Request path
POST /api/v2/services/CreatePrometheusIntegration
Request parameters
Query
Name |
Type |
Required |
Description |
Example value |
|---|---|---|---|---|
| requestId | String | Yes | Request ID, used for tracking | dc302d76-66b5-48d8-ab53-a035******** |
Header
Name |
Type |
Required |
Description |
Example value |
|---|---|---|---|---|
| X-Ob-Project-Id | String | Yes | Project ID | hxq3ztx3377nby3v87ry**** |
Response parameters
Name |
Type |
Description |
Example value |
|---|---|---|---|
| success | Boolean | Success | true |
| errorCode | String | Error Code | null |
| errorMessage | String | Error message | null |
| data | Object | Prometheus Integration Dto | None |
| data.integrationId | String | Delete Prometheus Integration | xxxxxx |
| data.prometheusConfig | String | Prometheus Config | None |
| data.createdAt | String | Prometheus Integration Create Time | None |
| cost | Number | Time consumed | 1 |
| server | String | Server Address | xxx.xxx.x.xxx:xxxx |
| requestId | String | Request ID | dc302d76-66b5-48d8-ab53-a035******** |
| totalCount | Number | Total | 1 |
| extra | Object | Additional Information (object) | null |
Examples
Request example
curl -X POST \
'https://api.example.com/api/v2/services/CreatePrometheusIntegration?requestId=dc302d76-66b5-48d8-ab53-a035********' \
-H 'X-Ob-Project-Id: hxq3ztx3377nby3v87ry****' \
-H 'Content-Type: application/json' \
-d '{
"instanceId": "obcloud-xxxxxxxx",
"region": "cn-hangzhou"
}'
Response example
JSON format
{
"success": true,
"errorCode": null,
"errorMessage": null,
"data": {
"integrationId": "xxxxxx",
"prometheusConfig": "xxxxxx",
"createdAt": "xxxxxx"
},
"cost": 1,
"server": "xxx.xxx.x.xxx:xxxx",
"requestId": "dc302d76-66b5-48d8-ab53-a035********",
"totalCount": 1,
"extra": null
}
