Document Database Service

Modify the Server Alarm Rule of an Instance

2025-07-25 08:16:00
API Introduction

Call modifyHostAlarmConfig to modify the host alarm rules of the MongoDB instance.

API Restrictions

None

URI
POST /v1/alarmOpenApi/modifyHostAlarmConfig

Path Parameter

None

Query Parameter

None

Request Parameters

Request Header Parameter

None

Request Body Parameter

Parameter

Required or Not

Parameter Type

Description

Instance

Lower-level Object

prodInstId

Yes

String

Instance ID

e3d802458aa848b98f45689f143761a8


monitor

No

String

Whether it is monitored, 1 means monitored

1


alarmOsCpu

No

String

Whether to monitor the cpu, 1 indicates monitoring

1


alarmOsDisk

No

String

Whether to monitor the disk, 1 indicates monitoring

1


alarmOsMemory

No

String

Whether to monitor the memory, 1 indicates monitoring

1


thresholdWarningOsCpu

No

String

cpu warning threshold, default to 80 if left blank

60


thresholdCriticalOsCpu

No

String

cpu critical threshold, default to 90 if left blank

90


thresholdWarningOsDisk

No

String

Disk warning threshold, default to 75 if left blank

75


thresholdCriticalOsDisk

No

String

Disk critical threshold, default to 90 if left blank

90


thresholdWarningOsMemory

No

String

Memory warning threshold, default to 85 if left blank

85


thresholdCriticalOsMemory

No

String

Memory critical threshold, default to 95 if left blank

95


Response Parameter

Parameter

Required or Not

Parameter Type

Description


Lower-level Object

statusCode

Yes

Integer

Response Code

Value range: 800 indicates success, 900 indicates failure

800


message

Yes

String

Response information

The host alarm rules of the MongoDB instance are queried successfully


returnObj

Yes

Object

Return object.


returnObj

Table returnObj

Parameter

Required or Not

Parameter Type

Description

Example

Lower-level Object

ProdInstId

Yes

String

Instance ID

e3d802458aa848b98f45689f143761a8


ModifyHostAlarmConfig

Yes

String

Whether the modification is successful, return success if succeeded

success


Sample Request

Request Header

None

Request Body

{
    "prodInstId":"e3d802458aa848b98f45689f143761a8",
    "thresholdWarningOsCpu":60
}
Response Example
{
    "statusCode": 800,
    "message": "the host alarm rules of the MongoDB instance are modified successfully",
    "returnObj": {
        "ModifyHostAlarmConfig": "success",
        "ProdInstId": "e3d802458aa848b98f45689f143761a8"
    }
}
Status Code

Status Code

Description

800

Indicate that the request succeeded

900

Indicates that the request failed

Error Codes

None


_vVs2LRR9kde