ListAlertRules

Updated at:

Retrieves a paginated list of custom monitoring alert rules.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

Owner

string

No

The Alibaba Cloud UID of the owner of the custom rule.

1933790683****

TaskIds

array

No

The IDs of the scheduling tasks.

integer

No

The ID of the scheduling task.

1234

Types

array

No

The list of alert trigger types.

string

No

The type of the alert trigger. Valid values:

  • Finished: The instance is completed.

  • UnFinished: The instance is not completed.

  • Error: An error occurs on the instance.

  • CycleUnfinished: The instance cycle is not completed.

  • Timeout: The instance times out.

  • InstanceTransferComplete: The task-to-instance transfer is completed.

  • InstanceTransferFluctuate: The number of instances fluctuates.

  • ExhaustedError: An error still occurs after automatic reruns.

  • InstanceKeyword: The error instance contains a keyword.

  • InstanceErrorCount: The number of error instances.

  • InstanceErrorPercentage: The proportion of error instances.

  • ResourceGroupPercentage: The resource group utilization rate.

  • ResourceGroupWaitCount: The number of instances waiting for resources in the resource group.

Error

Receiver

string

No

The Alibaba Cloud UID of the alert recipient.

1933790683****

Name

string

No

Filters by alert rule name. Partial name matching is supported.

error_rule

PageNumber

integer

Yes

The page number. Minimum value: 1.

1

PageSize

integer

Yes

The number of entries per page. Maximum value: 100.

10

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID. You can use this ID to locate logs and troubleshoot issues.

A6C6B486-E3A2-5D52-9E76-D938048****

PagingInfo

object

The pagination information.

TotalCount

integer

The total number of alert rules that meet the query conditions.

5

PageNumber

integer

The page number.

1

PageSize

integer

The number of entries per page.

10

AlertRules

array<object>

The list of alert rules that meet the query conditions. You can pass the Id of a list item to GetAlertRule to query details such as notification configurations.

array<object>

Id

integer

The ID of the custom rule.

22125

Name

string

The name of the custom rule.

error_test

Owner

string

The Alibaba Cloud UID of the owner of the custom rule.

1933790683****

Enabled

boolean

Indicates whether the alert rule is enabled.

true

TriggerCondition

object

The condition that triggers the alert.

Type

string

The type of the alert trigger. Valid values:

  • Finished: The instance is completed.

  • UnFinished: The instance is not completed.

  • Error: An error occurs on the instance.

  • CycleUnfinished: The instance cycle is not completed.

  • Timeout: The instance times out.

  • InstanceTransferComplete: The task-to-instance transfer is completed.

  • InstanceTransferFluctuate: The number of instances fluctuates.

  • ExhaustedError: An error still occurs after automatic reruns.

  • InstanceKeyword: The error instance contains a keyword.

  • InstanceErrorCount: The number of error instances.

  • InstanceErrorPercentage: The proportion of error instances.

  • ResourceGroupPercentage: The resource group utilization rate.

  • ResourceGroupWaitCount: The number of instances waiting for resources in the resource group.

Error

Extension

object

The extension information. Some trigger conditions require configuration.

Error

object

The error alert configuration.

StreamTaskIds

array

The IDs of the real-time computing tasks to be monitored.

integer

The ID of the real-time computing task.

123

AutoRerunAlertEnabled

boolean

Specifies whether to generate an alert when an offline task is automatically rerun due to a failure.

false

Timeout

object

The timeout alert configuration.

TimeoutInMinutes

integer

The timeout period. Unit: minutes.

10

UnFinished

object

The settings for alerts when an instance has not finished.

UnFinishedTime

string

The deadline for completion, in hh:mm format. Valid values for hh: 0 to 47. Valid values for mm: 0 to 59.

12:00

CycleUnfinished

object

The settings for alerts when a cycle has not finished.

CycleAndTime

array<object>

The list of cycle and time configurations.

object

CycleId

integer

The cycle ID. Valid values: 1 to 288.

1

Time

string

The deadline for completion, in hh:mm format. Valid values for hh: 0 to 47. Valid values for mm: 0 to 59.

01:00

InstanceErrorCount

object

The alert configuration for the number of error task instances.

Count

integer

The number of error task instances. Valid values: 1 to 10000.

10

InstanceErrorPercentage

object

The alert configuration for the proportion of error task instances.

Percentage

integer

The proportion of error instances. Valid values: 1 to 100.

10

InstanceTransferFluctuate

object

The alert configuration for the fluctuation in the number of task-to-instance transfers.

Trend

string

The type of fluctuation in task-to-instance transfers. Valid values:

  • abs: Absolute value.

  • increase: Increase.

  • decrease: Decrease.

abs

Percentage

integer

The percentage of fluctuation in task-to-instance transfers. Valid values: 1 to 100.

10

Target

object

The monitored object.

Type

string

The monitored object type. Valid values:

  • Task: Node.

  • Baseline: Baseline.

  • Project: Workspace.

  • BizProcess: Business flow.

Task

Ids

array

The IDs of the monitored objects.

integer

The ID of the monitored object.

32567

AllowTasks

array

The whitelist of monitored nodes.

integer

The ID of the node in the monitoring whitelist.

123123

Examples

Success response

JSON format

{
  "RequestId": "A6C6B486-E3A2-5D52-9E76-D938048****",
  "PagingInfo": {
    "TotalCount": 5,
    "PageNumber": 1,
    "PageSize": 10,
    "AlertRules": [
      {
        "Id": 22125,
        "Name": "error_test",
        "Owner": "1933790683****",
        "Enabled": true,
        "TriggerCondition": {
          "Type": "Error",
          "Extension": {
            "Error": {
              "StreamTaskIds": [
                123
              ],
              "AutoRerunAlertEnabled": false
            },
            "Timeout": {
              "TimeoutInMinutes": 10
            },
            "UnFinished": {
              "UnFinishedTime": "12:00"
            },
            "CycleUnfinished": {
              "CycleAndTime": [
                {
                  "CycleId": 1,
                  "Time": "01:00"
                }
              ]
            },
            "InstanceErrorCount": {
              "Count": 10
            },
            "InstanceErrorPercentage": {
              "Percentage": 10
            },
            "InstanceTransferFluctuate": {
              "Trend": "abs",
              "Percentage": 10
            }
          },
          "Target": {
            "Type": "Task",
            "Ids": [
              32567
            ],
            "AllowTasks": [
              123123
            ]
          }
        }
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.