Updated on 2025-09-10 GMT+08:00

Querying Audit Alarm Information

Function

Querying Audit Alarm Information

URI

POST /v2/{project_id}/audit/{instance_id}/alarm-log

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

** Parameter description**:

Specifies the project ID. You can obtain the value by calling the IAM API for querying the project list of a specified IAM user.

** Restrictions**:

N/A

** Value range**:

The value is subject to the return value of the IAM service interface. The value contains 32 to 64 characters.

** Default value**:

N/A

instance_id

Yes

String

** Parameter description**:

Instance ID. The value can be obtained from the ID field of the API for querying the instance list.

** Restrictions**:

N/A

** Value range**:

The value is subject to the value of the API for querying the instance list. The value contains 32 to 64 characters.

** Default value**:

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

** Parameter description**:

User token. You can obtain the token by calling the IAM API used to query the user token. The token is the value of X-Subject-Token in the response header.

** Restrictions**:

N/A

** Value range**:

Used by the IAM service to query the user token.

** Default value**:

N/A

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

time

Yes

time object

Time

risk

No

Array of strings

Risk level.

  • LOW

  • MEDIUM

  • HIGH

type

No

String

Alarm type. The options are as follows:

  • RISK_RULE: risk rule

  • RISK_CPU: The CPU usage exceeds the threshold.

  • RISK_MEMORY: The memory usage exceeds the threshold.

  • RISK_DISK: The disk usage exceeds the threshold.

  • RISK_DISK_CAPACITY: The disk capacity is less than six months.

  • RISK_BACKUP: Backup failed.

  • AUDIT_QPS_OVERFLOW: traffic threshold-crossing alarm

  • RISK_AGENT: The Agent is abnormal.

  • AUDIT_BACKUP_FAILED: indicates that the instance fails to be backed up (O&M side).

status

No

String

Alarm confirmation status

  • DONE: confirmed

  • UNDO: unconfirmed

page

Yes

Integer

Page number

size

Yes

Integer

Number of records on each page.

Table 4 time

Parameter

Mandatory

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: Options:

HALF_HOUR, HOUR, THREE_HOUR, TWELVE_HOUR, DAY, WEEK, MONTH;

start_time

No

String

Start time, which must be in pairs 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, which must be in pairs 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

Table 5 Response body parameters

Parameter

Type

Description

total_num

Integer

Total number of records.

alarm_log

Array of alarm_log objects

Alarms

Table 6 alarm_log

Parameter

Type

Description

id

String

Alarm ID

alarm_life

String

Alarm status. The options are as follows:

  • ON

  • OFF

send_email

Boolean

Whether to send an email.

alarm_time

String

Alarm occurrence time

alarm_type

String

Alarm type.

  • RISK_RULE: risk rule

  • RISK_CPU: Threshold-crossing for CPU usage

  • RISK_MEMORY: The memory usage exceeds the threshold.

  • RISK_DISK: Threshold-crossing for disk usage

  • RISK_DISK_CAPACITY: The disk capacity is less than six months.

  • RISK_BACKUP: Backup failed.

  • AUDIT_QPS_OVERFLOW: delay alarm when the traffic exceeds the threshold

  • RISK_AGENT: The agent is abnormal.

  • AUDIT_BACKUP_FAILED: Instances failed to be backed up (O&M)

alarm_fix_time

String

Time when the alarm is cleared.

alarm_status

String

Alarm confirmation status.

  • DONE: confirmed

  • UNDO: unconfirmed

alarm_risk

String

Alarm risk level. The value can be:

  • LOW

  • MEDIUM

  • HIGH

alarm_description

String

Alarm description.

Status code: 400

Table 7 Response body parameters

Parameter

Type

Description

details

Array of DbssErrorDetail objects

PDP5 authentication exception information

encoded_authorization_message

String

PDP5 authentication exception information

error_code

String

Error Codes

error_msg

String

Error message.

Table 8 DbssErrorDetail

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

PDP5 error information

Status code: 403

Table 9 Response body parameters

Parameter

Type

Description

details

Array of DbssErrorDetail objects

PDP5 authentication exception information

encoded_authorization_message

String

PDP5 authentication exception information

error_code

String

Error Codes

error_msg

String

Error message.

Table 10 DbssErrorDetail

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

PDP5 error information

Status code: 500

Table 11 Response body parameters

Parameter

Type

Description

details

Array of DbssErrorDetail objects

PDP5 authentication exception information

encoded_authorization_message

String

PDP5 authentication exception information

error_code

String

Error Codes

error_msg

String

Error message.

Table 12 DbssErrorDetail

Parameter

Type

Description

error_code

String

Error Codes

error_msg

String

PDP5 error information

Example Requests

/v2/{project_id}/audit/{instance_id}/alarm-log

{
  "time" : {
    "time_range" : "DAY",
    "start_time" : null,
    "end_time" : null
  },
  "risk" : null,
  "type" : null,
  "status" : null,
  "page" : 1,
  "size" : 100
}

Example Responses

Status code: 200

Success

{
  "total_num" : 3,
  "alarm_log" : [ {
    "id" : "99AJFI8BZEbGVdGbOczC",
    "alarm_life" : "ON",
    "send_email" : 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",
    "alarm_life" : "ON",
    "send_email" : 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",
    "alarm_life" : "ON",
    "send_email" : 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 Codes

Status Code

Description

200

Success

400

Incorrect request parameter.

403

Authorization failed.

500

Internal server error.

Error Codes

See Error Codes.