Obtaining Server Alarm List
Function
This API is used to query the server alarm list.
Calling Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/physicalservers/alarms
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition Project ID. Constraints N/A Range Project ID of the account. Default Value N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition Requests for calling an API can be authenticated using a token. If token-based authentication is used, this parameter is mandatory and must be set to a user token. Constraints N/A Range N/A Default Value N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
alarms |
Array of AlarmHistory objects |
Definition Objects of the alarm list. Constraints N/A |
|
count |
Integer |
Definition Total number of alarms. Constraints N/A Range N/A Default Value N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
alarm_record_id |
String |
Definition Alarm record ID. Constraints N/A Range N/A Default Value N/A |
|
alarm_id |
String |
Definition Alarm ID. Constraints N/A Range N/A Default Value N/A |
|
alarm_name |
String |
Definition Alarm name. Constraints N/A Range N/A Default Value N/A |
|
alarm_status |
String |
Definition Alarm status. Constraints N/A Range
Default Value N/A |
|
alarm_level |
Integer |
Definition Alarm severity, which can be 1 (critical), ** 2** (major), 3 (minor), or 4 (warning). Constraints N/A Range Default Value N/A |
|
begin_time |
Integer |
Definition Alarm start time. Constraints N/A Range Unix timestamp. Default Value N/A |
|
end_time |
Integer |
Definition Alarm end time. Constraints N/A Range Unix timestamp. Default Value N/A |
|
last_alarm_time |
Integer |
Definition Time when the alarm was last reported. Constraints N/A Range Unix timestamp. Default Value N/A |
|
metric |
Metric object |
|
Parameter |
Type |
Description |
|---|---|---|
|
metric_name |
String |
Definition Metric name of a resource. For example, the ECS metric cpu_util indicates the CPU usage of the ECS. The DDS metric mongo001_command_ps indicates the command execution frequency. For details about the metric name of each service, see Service Metric Name. Constraints N/A Range Length :1 to 64 characters. The name must start with a letter and contain only letters (case-sensitive), digits, and underscores (_). Default Value N/A |
|
dimensions |
Array of Dimension objects |
Definition Resource dimension. Constraints N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
name |
String |
Definition Resource metric dimension. For example, the dimension of an ECS can be instance_id. A maximum of four dimensions are supported. For the metric dimension of each resource, see Service Metric Dimension. Constraints N/A Range N/A Default Value N/A |
|
value |
String |
Definition Resource dimension value, which is an instance ID, for example, 4270ff17-aba3-4138-89fa-820594c39755. Constraints N/A Range N/A Default Value N/A |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Definition Error code. |
|
error_msg |
String |
Definition Error description. |
Status code: 401
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Definition Error code. |
|
error_msg |
String |
Definition Error description. |
Status code: 429
|
Parameter |
Type |
Description |
|---|---|---|
|
- |
String |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Definition Error code. |
|
error_msg |
String |
Definition Error description. |
Example Requests
Obtaining the server alarm list
GET https://{endpoint}/v1/{project_id}/physicalservers/alarms
Example Responses
Status code: 200
{
"alarms" : [ {
"alarm_record_id" : "ah175258182510684b1cb108",
"alarm_id" : "al17525818209074GL0BZQMw",
"alarm_name" : "alarm-0715",
"alarm_status" : "alarm",
"alarm_level" : 2,
"begin_time" : 1752581825000,
"end_time" : 1752725863000,
"last_alarm_time" : 1752725863000,
"metric" : {
"metric_name" : "disk_health",
"dimensions" : [ {
"name" : "device",
"value" : "Disk0"
}, {
"name" : "host",
"value" : "019661e2-5390-7aa5-91e8-5fc6841f6ed9"
} ]
}
} ],
"count" : 347
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
|
|
400 |
Invalid request parameter. |
|
401 |
The request is not authenticated. |
|
429 |
The request is overloaded. |
|
500 |
Internal server error. |
Error Codes
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