Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Creating a Threshold Rule

Updated on 2024-08-05 GMT+08:00

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

Creation Methods

There are two creation methods: Directly Creating Threshold Rules and Using Templates to Create 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 threshold rules, ensure that a static threshold template has been created according to Creating a Static Threshold Template.

Precautions

  • If you need AOM to send email or SMS notifications when the threshold rule status (Exceeded, Normal, Insufficient, or Disabled) changes, set an alarm action rule according to Creating an Alarm Action Rule.
  • If you use a threshold rule to monitor the same metric of multiple resources in batches, pay attention to the following:
    • If the metric status of a resource is Exceeded, the status of the threshold rule is also Exceeded.
    • If the metric status of one or more resources is Insufficient or Normal, the status of the threshold rule is Normal.

Directly Creating 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. Set a threshold rule.

    1. Set basic information such as the rule name and description.
    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 objects: Click Select Resource Object, add objects by dimension or resource, and click Confirm.
          NOTE:
          • A threshold rule can monitor up to 100 pieces of metric data.
          • If you enable Apply to All () when selecting objects to monitor, an alarm rule will be created for all metrics of the type you select under an application or service. For example, if you select CCE/Host/Host/CPU Usage and enable Apply to All, an alarm rule will be created for all hosts in CCE.
          • Click Edit resource objects to modify the selected resource object.
        • 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 command 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).
            NOTE:

            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 Period, Consecutive Periods, and Threshold Criterion. Table 1 describes the parameters.
        Table 1 Alarm condition parameters

        Category

        Parameter

        Description

        Trigger Condition

        Statistical Period

        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 Criterion is set to > 85, if the actual metric value exceeds 85, a threshold alarm is generated.

        Move the cursor to the graph area above the alarm condition. The ID, IP address, and unit of the current metric are displayed.

        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 set 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 alarm notifications. For details, see Alarm Tags and Annotations.

        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.
        1. Specify whether to enable an alarm action rule. After an alarm action rule is enabled, the system sends notifications based on the associated SMN topic and message template. If the existing alarm action rules cannot meet your requirements, click Create Rule to create one. For details, see Creating an Alarm Action Rule.
        2. After an alarm action rule is selected, specify whether to enable alarm clearance notification. After alarm clearance notification is enabled, if the alarm clearance condition set in Advanced Settings > Alarm Clearance is met, alarm clearance notifications are sent based on the selected action rule.
      • Alarm Noise Reduction: Alarms are sent only after being processed based on noise reduction rules, preventing alarm storms.

        Select a grouping rule from the drop-down list. If existing grouping rules cannot meet your requirements, click Create Rule to create one. For details, see Creating a Grouping Rule.

  3. Click Create Now. A threshold rule is created. Click to monitor the same metric of multiple resources.

    In the expanded list, if the metric data of a host meets the preset alarm condition, 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.

Using Templates to Create Threshold Rules

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

  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. Set a threshold rule.

    1. Set basic information such as the rule name and description.
    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.
        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 a Static Threshold Template.

        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 set 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 alarm 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.
        1. Specify whether to enable an alarm action rule. After an alarm action rule is enabled, the system sends notifications based on the associated SMN topic and message template. If the existing alarm action rules cannot meet your requirements, click Create Rule to create one. For details, see Creating an Alarm Action Rule.
        2. After an alarm action rule is selected, specify whether to enable alarm clearance notification. After alarm clearance notification is enabled, if the alarm clearance condition set in Advanced Settings > Alarm Clearance is met, alarm clearance notifications are sent based on the selected action rule.
      • Alarm Noise Reduction: Alarms are sent only after being processed based on noise reduction rules, preventing alarm storms.

        Select a grouping rule from the drop-down list. If existing grouping rules cannot meet your requirements, click Create Rule to create one. For details, see Creating a Grouping Rule.

  3. Click Create Now. A threshold rule is created. Click to monitor the same metric of multiple resources.

    In the expanded list, if the metric data of a host meets the preset alarm condition, 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.

More Operations

After creating a threshold rule, perform the operations listed in Table 3 if needed.

Table 3 Related operations

Operation

Description

Editing a threshold rule

Click Edit in the Operation column.

Deleting threshold rules

  • To delete a threshold rule, click Delete in the Operation column.
  • To delete one or more threshold rules, select the check boxes before them and click Batch Operation and then Delete above the rule list.

Starting or stopping a threshold rule

Click More > Start or Stop in the Operation column. Alternatively, select the check boxes before one or more threshold rules and choose Batch Operation > Start or Stop above the rule list.

NOTE:

Single-resource threshold rules cannot be started or stopped.

Searching for a 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 the threshold condition 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.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback