Creating Static Threshold Rules

You can set threshold conditions for resource metrics by setting static threshold rules. If a metric value meets the threshold condition, a threshold alarm will be generated. If no metric data is reported, an insufficient data event will be generated.

Creation Methods

There are two creation methods: Directly Creating Static Threshold Rules and Using Templates to Create Static Threshold Rules. Only one rule is generated at a time. All resources are monitored using the same rule. To use the second method to create a static threshold rule, ensure that a static threshold template has been created according to Creating Static Threshold Templates.

Precautions

If you need AOM to send notifications by email or SMS message when the static threshold rule status (Exceeded, OK, Insufficient, or Disabled) changes, set an alarm action policy according to Creating an Alarm Action Policy.

Directly Creating Static Threshold Rules

  1. Log in to the AOM console. In the navigation pane, choose Alarm Center > Alarm Rules. Then, click Create Alarm Rule in the upper right corner.
  2. Customize a static threshold rule.

    1. Set basic information such as the rule name and description.
      Figure 1 Setting basic information
    2. Set details about the rule.
      1. Set Rule Type to Threshold alarm.
      2. Select monitored objects. Use either of the following methods:
        • Select resource object: Click Select Resource Object, add objects by dimension or resource, and click Confirm.

          A threshold rule can monitor a maximum of 100 metrics.

        • Command input: Both manual and auto inputs are supported.
          • Manual input: used when you know the metric name and IP address, and you are familiar with the Prometheus format.
            For example, to query the CPU usage of the host, run the avg(label_replace(avg_over_time(aom_node_cpu_usage{hostID="81010a40-1682-41c1-9645-f0588ff9c0cf",nodeIP="192.168.1.210",clusterId = '00000000-0000-0000-0000-00000000'}[59999ms]), "__name__","aom_node_cpu_usage","","")) by(__name__,hostID,nodeIP) command.

            For details about Prometheus commands, move the cursor to next to the search box and click Learn more.

          • Auto input: used when you do not know the metric information or are unfamiliar with the Prometheus format. The command can only be automatically filled when you switch from the Metric Monitoring page.

            Specifically, choose Monitoring > Metric Monitoring in the navigation pane. Then, click Add Metric and select Dimension or Resource for Add By. Select up to 12 metrics to monitor. Next, click in the Operation column. The system automatically switches to the threshold rule creation page and fills the Prometheus command for your metric.

      3. Set an alarm condition. Click Custom and set information such as statistical periods, consecutive periods, and threshold condition. Table 1 describes the parameters.
        Table 1 Alarm condition parameters

        Category

        Parameter

        Description

        Trigger Condition

        Statistical Periods

        Interval at which metric data is collected. By default, only one period is measured. A maximum of five periods can be measured.

        Consecutive Periods

        When the metric value meets the threshold condition for a specified number of consecutive periods, a threshold-crossing alarm will be generated.

        Statistic

        Method used to measure metrics. Options: Avg., Min., Max., Sum, and Samples.

        Threshold Condition

        Trigger condition of a threshold alarm. A threshold condition consists of two parts: operators (≥, ≤, >, and <) and threshold value. For example, after Threshold Condition is set to > 85, if the actual metric value exceeds 85, a threshold alarm is generated.

        Alarm Severity

        Severity of a threshold alarm. Options: Critical, Major, Minor, and Warning.

        Advanced Settings

        Alarm Clearance

        An alarm will be cleared if the monitored object does not meet the trigger condition within the monitoring period. By default, metrics in only one period are monitored. You can set up to five monitoring periods.

        Action Taken for Insufficient Data

        Action to be taken when no metric data is generated or metric data is insufficient within the monitoring period. You can configure this option based on your requirements.

        By default, metrics in only one period are monitored. You can set up to five monitoring periods.

        Options: Alarm, Insufficient data, Keep previous status, and Normal.

        Figure 2 Setting an alarm condition
      4. Set alarm tags and annotations to group alarms. They can be associated with alarm noise reduction policies for sending notifications.

        Click Add Tag or Add Annotation.

    3. Set an alarm notification policy. There are two alarm notification modes.
      • Direct alarm reporting: An alarm is directly sent when the alarm condition is met.

        You need to configure whether to enable an alarm action policy. After this function is enabled, the system sends alarm notifications based on the associated SMN topic and message template. If the existing alarm action policies cannot meet the requirements, click Create Policy to add one. For details about how to set an alarm action policy, see Creating an Alarm Action Policy.

        Figure 3 Selecting the direct alarm reporting mode
      • Alarm noise reduction: Alarms are sent only after being processed based on alarm action policies, preventing alarm storms.

        Select a grouping rule to reduce alarm noise. If existing grouping rules cannot meet your requirements, click Create Grouping Rule to create one. For details, see Grouping Rules.

        Figure 4 Selecting the alarm noise reduction mode

  3. Click Create Now. As shown in the following figure, a static threshold rule is created. Click to monitor the same metric of multiple resources in batches.

    In the expanded list, if the physical memory usage of a host exceeds 10%, a threshold alarm is generated on the alarm page. To view the alarm, go to the AOM console and choose Alarm Center > Alarm List in the navigation pane. If a host meets the preset notification policy, the system sends an alarm notification to the specified personnel by email, SMS, or WeCom.

    Figure 5 Creating a static threshold rule

Using Templates to Create Static Threshold Rules

Before creating a static threshold, ensure that a static threshold template has been created according to Creating Static Threshold Templates.

  1. Log in to the AOM console. In the navigation pane, choose Alarm Center > Alarm Rules. Then, click Create Alarm Rule in the upper right corner.
  2. Customize a static threshold rule.

    1. Set basic information such as the rule name and description.
      Figure 6 Setting basic information
    2. Set details about the rule.
      1. Set Rule Type to Threshold alarm.
      2. Select monitored objects. When a template is used to create a threshold rule, you can select metrics only by dimension or resource. The command input mode is not supported.
      3. Set an alarm condition. Click Template, select the created static threshold template from the drop-down list, and set parameters, such as Alarm Clearance and Action Taken for Insufficient Data.
        Figure 7 Setting an alarm condition
        Table 2 Alarm condition parameters

        Category

        Parameter

        Description

        Alarm Template

        -

        Select the static threshold template you have created. If the existing templates do not meet your requirements, click Create Alarm Template to create one. For details, see Creating Static Threshold Templates.

        Trigger Condition

        -

        The system automatically imports the preset trigger condition in the template. Note that the condition cannot be modified.

        Advanced Settings

        Alarm Clearance

        An alarm will be cleared if the monitored object does not meet the trigger condition within the monitoring period. By default, metrics in only one period are monitored. You can set up to five monitoring periods.

        Action Taken for Insufficient Data

        Action to be taken when no metric data is generated or metric data is insufficient within the monitoring period. You can configure this option based on your requirements.

        By default, metrics in only one period are monitored. You can set up to five monitoring periods.

        Options: Alarm, Insufficient data, Keep previous status, and Normal.

      4. Set alarm tags and annotations to group alarms. They can be associated with alarm noise reduction policies for sending notifications.

        Click Add Tag or Add Annotation.

    3. Set an alarm notification policy. There are two alarm notification modes.
      • Direct alarm reporting: An alarm is directly sent when the alarm condition is met.

        You need to configure whether to enable an alarm action policy. After this function is enabled, the system sends alarm notifications based on the associated SMN topic and message template. If the existing alarm action policies cannot meet the requirements, click Create Policy to add one. For details about how to set an alarm action policy, see Creating an Alarm Action Policy.

        Figure 8 Selecting the direct alarm reporting mode
      • Alarm noise reduction: Alarms are sent only after being processed based on alarm action policies, preventing alarm storms.

        Select a grouping rule to reduce alarm noise. If existing grouping rules cannot meet your requirements, click Create Grouping Rule to create one. For details, see Grouping Rules.

        Figure 9 Selecting the alarm noise reduction mode

  3. Click Create Now. As shown in the following figure, a static threshold rule is created. Click to monitor the same metric of multiple resources in batches.

    In the expanded list, if the physical memory usage of a host exceeds 10%, a threshold alarm is generated on the alarm page. To view the alarm, go to the AOM console and choose Alarm Center > Alarm List in the navigation pane. If a host meets the preset notification policy, the system sends an alarm notification to the specified personnel by email, SMS, or WeCom.

    Figure 10 Creating a static threshold rule

More Operations

After creating static threshold rules, perform the operations listed in Table 3 if needed.

Table 3 Related operations

Operation

Description

Modifying a static threshold rule

Click Modify in the Operation column.

Deleting a static threshold rule

  • To delete a static threshold rule, click Delete in the Operation column.
  • To delete one or more static threshold rules, select them and click Delete above the rule list.

Starting or stopping a static threshold rule

Choose More > Start or Stop in the Operation column.

NOTE:

Single-resource static threshold rules cannot be started or stopped.

Searching for a static threshold rule

You can search for a rule by rule name, description, or metric name. Simply enter a keyword in the search box in the upper right corner and click .

Viewing an alarm

When the metric value of a resource meets threshold conditions during the configured consecutive periods, the system reports a threshold alarm.

In the navigation pane, choose Alarm Center > Alarm List to view the alarm.

Viewing an event

When no metric data of a resource is reported during the configured consecutive periods, the system reports an insufficient data event.

In the navigation pane, choose Alarm Center > Event List to view the event.