All Products
Search
Document Center

CloudOps Orchestration Service:Create an alert O&M task

Last Updated:Dec 25, 2025

CloudOps Orchestration Service (OOS) lets you create O&M tasks that are triggered by threshold alerts for cloud service metrics. When a metric for a monitored cloud resource reaches a specified threshold, OOS executes a specified template to perform alert-based O&M. These tasks run continuously and monitor for alerts until you cancel them. For example, you can create an O&M task to clear a log directory when disk utilization exceeds 80%.

For more information about supported metrics, see Major metrics of Alibaba Cloud services.

To create an alert O&M task, complete the following steps:

  1. Set an alert rule

  2. Select a template

  3. Set the template parameters for the alert trigger

Set an alert rule

Field

Required

Description

Product type

Yes

Select a product from the drop-down list. You can select only one.

Rule description

Yes

The rule for the threshold alert.

Mute for

No

If the monitoring data continuously exceeds the alert threshold, the alert is triggered only once during each mute period. The default period is one day.

Effective period

No

The time range during which the alert rule is in effect. By default, the rule is in effect all day.

Resources to alert on

Yes

Note

If you do not select resources using one of the following three methods, the rule applies to all resources in your account.

  • Select instances manually: Select specific instances to monitor.

  • Specify instance tags: Quickly filter a collection of instances that have the same features or are used for the same purpose.

  • Specify resource group: Use a resource group to centrally manage related instances for unified configuration and maintenance.

A threshold alert rule includes the following fields:

  • Metric name

  • Aggregation period for monitoring data

  • Number of statistical periods

  • Statistical method

  • Comparison operator

  • Threshold

image

Select a template

Select the template to execute when an alert occurs.

Set the template parameters for the alert trigger

For template parameters, you can enter static values or select parameters from the alert message. If you use static parameters, the template is always executed with those values. If you select parameters from the alert message, you can configure jq expressions to extract fields from the message.

To extract fields from an alert message, start with a dollar sign ($) and add a jq expression. For example, the following code shows the format of an alert message for the cpu_total metric of an ECS instance:

{
    "Average": 50.15,
    "Maximum": 50.75,
    "Minimum": 49.75,
    "curLevel": "INFO",
    "instanceId": "i-bp1gn7od******qh5r12",
    "ruleName": "alarmtrigger-130920******0047-exec-de81413d******71b537",
    "timestamp": 1575970560000,
    "userId": "130920******0047"
}

To extract the ID of the instance that triggered the alert, use the expression $.instanceId.

The following static fields can be extracted from the alert message:

Extraction expression

Description

Example value

$.timestamp

The timestamp of the alert, in milliseconds.

1575970560000

$.curLevel

The alert level.

INFO

$.userId

The ID of the Alibaba Cloud account.

130920**0047

$.dimensionFieldName

The value of the monitoring dimension. Replace `dimensionFieldName` with the name of the metric dimension field. For example, the CPU of an ECS instance is monitored by the `instanceId` dimension. You can use $.instanceId to extract the instance ID. For more information, see the Dimensions section in Major metrics of Alibaba Cloud services.

N/A

Example of selecting parameters from an alert message:

The method for setting static parameters is the same as for setting regular template parameters.

Notes:

  • Static parameters (static configuration): These parameters are manually specified when you create the task and do not change during execution. If a task uses these parameters, it always operates on predefined resources and cannot identify the specific instance that triggered the alert.

  • Alert message parameters (dynamic parameters): These are automatically extracted from the message content of an alert event, such as the resourceId and instanceId fields in a CloudMonitor event. They accurately reflect the actual resource associated with the current alert.

If a task uses static parameters instead of dynamically obtaining the resource identity from the alert message, the O&M task might operate on the wrong object. This can cause the resource that triggered the alert to not be processed.