Querying Audit Alarm Information
Function
This API is used to query audit alarm information.
Calling Method
For details, see Calling APIs.
URI
POST /v1/{project_id}/{instance_id}/audit/alarm-log
Parameter |
Mandatory |
Parameter Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. |
instance_id |
Yes |
String |
Instance ID. You can obtain the value from the ID field in the API for querying the instance list. |
Request Parameter
Parameter |
Mandatory |
Parameter Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. The token can be queried by calling the IAM API. (The token is the value of X-Subject-Token in the response header.) |
Parameter |
Mandatory |
Parameter Type |
Description |
---|---|---|---|
time |
Yes |
time object |
Time |
risk |
No |
String |
Risk severity
|
type |
No |
String |
Alarm type
|
status |
No |
String |
Alarm confirmation status
|
page |
No |
Integer |
The page number. |
size |
No |
Integer |
Specifies the number of records on each page. |
Parameter |
Mandatory |
Parameter Type |
Description |
---|---|---|---|
time_range |
No |
String |
Time range. This parameter cannot be used together with start_time and end_time. If they are used together, this parameter has a higher priority. The value can be: Enumerated values: HALF_HOUR, HOUR, THREE_HOUR, TWELVE_HOUR, DAY, WEEK, MONTH; |
start_time |
No |
String |
Start time. This parameter must be used together with end_time. The format must be yyyy-MM-dd HH:mm:ss. Time when an action occurred, in UTC time. |
end_time |
No |
String |
End time. This parameter must be used together with start_time. The format must be yyyy-MM-dd HH:mm:ss. Time when an action occurred, in UTC time. |
Response Parameters
Status code: 200
Parameter |
Parameter Type |
Description |
---|---|---|
total_num |
Integer |
Total number |
alarm_log |
Array of alarm_log objects |
Alarms |
Parameter |
Parameter Type |
Description |
---|---|---|
id |
String |
Alarm ID |
alarmLife |
String |
Alarm status.
|
sendEmail |
Boolean |
Email notification |
alarm_time |
String |
Alarm time |
alarm_type |
String |
Alarm type
|
alarm_fix_time |
String |
Indicates the alarm clearing time. |
alarm_status |
String |
Alarm confirmation status
|
alarm_risk |
String |
Alarm risk severity
|
alarm_description |
String |
Alarm description |
Status code: 400
Parameter |
Parameter Type |
Description |
---|---|---|
error |
Object |
Error message. |
Parameter |
Parameter Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
Status code: 403
Parameter |
Parameter Type |
Description |
---|---|---|
error |
Object |
Error message. |
Parameter |
Parameter Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
Status code: 500
Parameter |
Parameter Type |
Description |
---|---|---|
error |
Object |
Error message. |
Parameter |
Description |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error message |
Example request
/v1/{project_id}/{instance_id}/audit/alarm-log { "time" : { "time_range" : "DAY", "start_time" : null, "end_time" : null }, "risk" : null, "type" : null, "status" : null, "page" : 1, "size" : 100 }
Example Response
Status code: 200
Succeeded
{ "total_num" : 3, "alarm_log" : [ { "id" : "99AJFI8BZEbGVdGbOczC", "alarmLife" : "ON", "sendEmail" : true, "alarm_time" : "2024-04-25 06:55:00", "alarm_type" : "RISK_DISK", "alarm_fix_time" : null, "alarm_status" : "UNDO", "alarm_description" : "DISK USAGE 5%", "alarm_risk" : "HIGH" }, { "id" : "9tAJFI8BZEbGVdGbOcy4", "alarmLife" : "ON", "sendEmail" : true, "alarm_time" : "2024-04-25 06:55:00", "alarm_type" : "RISK_MEMORY", "alarm_fix_time" : null, "alarm_status" : "UNDO", "alarm_description" : "MEMORY USAGE 53.54%", "alarm_risk" : "HIGH" }, { "id" : "9dAJFI8BZEbGVdGbOcyq", "alarmLife" : "ON", "sendEmail" : true, "alarm_time" : "2024-04-25 06:55:00", "alarm_type" : "RISK_CPU", "alarm_fix_time" : null, "alarm_status" : "UNDO", "alarm_description" : "CPU USAGE 1.0%", "alarm_risk" : "HIGH" } ] }
Status code: 400
Incorrect request parameter.
{ "error" : { "error_code" : "DBSS.XXXX", "error_msg" : "XXX" } }
Status code: 500
Internal server error.
{ "error" : { "error_code" : "DBSS.XXXX", "error_msg" : "XXX" } }
Status Code
Status Code |
Description |
---|---|
200 |
Success |
400 |
Incorrect request parameter. |
403 |
Authentication failed. |
500 |
Internal server error. |
Error Codes
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.