Configuring a Monitoring by Seconds Policy
Function
This API is used to configure a Monitoring by Seconds policy for a DB instance. The policy takes effect about 5 minutes after you configure it.
Monitoring by Seconds is billed on a pay-per-use basis. You are charged by the hour.
Monitoring by Seconds policies of the primary instance and read replicas are independent from each other. Monitoring by Seconds is automatically disabled for instances with fewer than 4 vCPUs.
- Before calling an API, you need to understand the API in Authentication.
Constraints
- This API is in OBT. To use this API, contact customer service.
- This API is available to only RDS for MySQL instances with 4 vCPUs or more.
URI
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
Project ID of a tenant in a region.
For details about how to obtain the project ID, see Obtaining a Project ID.
instance_id
Yes
Instance ID.
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
switch_option |
Yes |
Boolean |
Whether to enable Monitoring by Seconds.
|
interval |
No |
Integer |
Monitoring interval, which can be 1s or 5s. Enumerated values:
|
Example Request
- Enable Monitoring by Seconds for a DB instance, with monitoring interval set to 1s.
PUT https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/instances/3d39c18788b54a919bab633874c159dfin01/second-level-monitor { "switch_option" : true, "interval" : 1 }
- Disable Monitoring by Seconds.
{ "switch_option" : false }
Response
- Example normal response
- Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
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