Create alert rules to monitor the usage of your File Storage NAS resources. If a metric for a resource meets the alert condition, Cloud Monitor automatically sends an alert notification. This helps you promptly identify and address abnormal monitoring data.
Prerequisites
-
A File Storage NAS file system has been created. For more information, see Create a file system.
-
The Cloud Monitor service has been activated.
Log on to the Cloud Monitor product page and follow the on-screen instructions to activate the service.
Procedure
-
Log on to the Cloud Monitor console.
-
In the navigation pane on the left, choose , and then click Create Alert Rule.
-
In the Create Alert Rule panel, configure the following parameters.
-
Configure the basic parameters as follows.
Configuration Item
Description
Product
Select File Storage NAS.
Resource Scope
The scope of resources to which the alert rule applies. Valid values:
-
All Resources: The alert rule applies to all NAS resources.
NoteCurrently, NAS and CPFS share the Cloud Monitor console. If you select All Resources, CPFS resources are included.
-
Application Group: The alert rule applies to all resources in a specified application group for NAS.
-
Instance: The alert rule applies to a specified NAS resource.
Associated resources
When the resource scope is set to application group or instance, select the required associated resource from the drop-down list.
Rule Description
The main body of the alert rule. The rule is triggered when monitoring data meets the alert conditions. Set the rule description as follows:
-
Click Add Rule.
-
In the Set Rule Description panel, enter a Rule Name and set the rule conditions.
-
Simple Metric: Select a metric, and then set a threshold and an alert level for it.
-
Composite Metric: Select an alert level, and then set alert conditions for two or more metrics.
-
Expression: Select an alert level, and then set the alert conditions. For more information about how to set complex alert conditions, see Alert rule expressions.
-
Smart Threshold: For more information about smart thresholds, see Overview and Create a smart threshold-based alert rule.
-
-
Click OK.
NoteFor more information about the metrics supported by NAS, see Metrics.
Mute Period
The interval at which alert notifications are resent if an alert is not resolved. Valid values: 5 minutes, 15 minutes, 30 minutes, 60 minutes, 3 hours, 6 hours, 12 hours, and 24 hours.
An alert is sent when a metric reaches its threshold.
-
If the metric continues to exceed the threshold within the mute period, no additional alert notifications are sent during this period.
-
If the metric has not returned to normal after the mute period, Cloud Monitor sends another alert notification.
For example, if you set Mute Period to 12 hours, Cloud Monitor resends the alert notification after 12 hours if the alert is not resolved.
Effective Period
The period during which the alert rule is active. The rule only checks monitoring data for alerts during this time.
Alert Contact Group
The contact group that receives alert notifications.
Alert notifications for an application group are sent to the alert contacts in this group. An alert contact group is a set of one or more alert contacts.
For more information about how to create alert contacts and alert contact groups, see Create an alert contact or an alert contact group.
Tag
The tags of the alert rule. A tag consists of a key and a value.
NoteYou can add a maximum of 6 tags.
-
-
(Optional) Click Advanced Settings and configure the following parameters.
Configuration Item
Description
Alert Callback
A publicly accessible URL that receives alert data from Cloud Monitor via HTTP POST requests. Only HTTP is supported. Use threshold-based alert callbacks.
To test connectivity to the callback URL:
-
Click Test, located directly to the right of the callback URL.
In the WebHook Test panel, check the HTTP status code and test result details to verify connectivity.
NoteYou can also set the Test Template Type: and Language:. Then click Test again to view updated test results.
-
Click Close.
Auto Scaling
If you enable Auto Scaling, Cloud Monitor triggers the associated scaling rule when an alert occurs. You must specify the Region, ESS Group, and ESS Rule.
Simple Log Service
If you enable Simple Log Service, Cloud Monitor sends alert data to a Logstore in Simple Log Service (SLS) when an alert occurs. You must specify the Region, ProjectName, and Logstore.
Simple Message Queue (formerly MNS) - Topic
If you turn on the Simple Message Queue (formerly MNS) - Topic switch, alert information is sent to an MNS topic when an alert occurs. You must set the region and topic for MNS.
Function Compute
If you enable Function Compute, Cloud Monitor sends alert notifications to Function Compute (FC) for custom formatting when an alert occurs. You must specify the region, service, and function.
For more information about how to set up a service and a function, see Create a function application in the console.
NoDataPolicy
The method for handling alarms for monitoring data. The valid values are:
-
Do not do anything (default)
-
Send alert notifications
-
Treated as normal
-
-
-
Click OK to save the alert rule.
When a file system metric exceeds the specified threshold, an alert notification is automatically sent. This ensures that you are promptly notified of abnormal monitoring data.
Alert rule configuration examples
The following examples describe how to configure alert rules for NAS instances, all resources, or application groups. This helps you promptly identify and address abnormal monitoring data. For more information about the metrics supported by NAS, see Metrics.
Configure simple metric monitoring
For example, you can configure an alert rule to trigger a Warning-level alert when the read latency of a General-purpose file system exceeds 5 ms for three consecutive detection periods. The recommended settings for Resource Scope and Rule Description are as follows. For more information about other parameters, see Step 3.
-
Resource Scope: Instance.
-
Associated Instance: Select a General-purpose file system ID, such as 2973ef4xxxx. In the Associated Instance area, select File Storage NAS for Product, click + Add Instance, and then add the target file system instance to the list.
-
Rule Description
Parameter
Example Value
Metric Type
Simple Metric
Monitoring Metric
Read Latency
Threshold and Alert Level
-
Warning level: Warning
-
Period: 3 consecutive periods (1 period = 1 minute)
-
Monitored value: >=
-
Threshold: 5
-
Configure composite metric monitoring
For example, you can configure an alert rule to trigger a Critical-level alert if, within one detection period, the read/write latency of a file system exceeds 5 ms, or the storage usage of the IA storage class increases by 40% compared with the same time the previous day. The recommended settings for Resource Scope and Rule Description are as follows.
-
Resource Scope: Instance
-
Associated Instance: Select a General-purpose file system ID, such as 2973ef4xxxx.
-
Rule Description: For the Read Latency and Write Latency metrics, set the condition to `Monitored value >= 5 ms`. Set the notification method to Phone + Text Message + Email + WebHook.
Parameter
Example Value
Metric Type
Composite Metric
Alert Level
Critical
Multi-metric Alert Description
-
Click Add Metric. In the Monitoring Metric drop-down list, select .
-
Select the monitored value. In this example, select increase compared to the same time yesterday.
-
Set the threshold. In this example, the value is 40.
-
Then, follow the preceding steps to set the and metrics.
NoteFor more information about how to set complex alert conditions, see Alert rule expressions.
Multi-metric Relationship
An alert is triggered if any condition is met (||)
Number of times the threshold is exceeded
1 consecutive period
-
References
-
For more information about how to configure an alert rule that is triggered based on the calculation results of multiple metrics, see Configure an advanced alert rule.
-
For more information about how to create a smart threshold-based alert rule, see Create a smart threshold-based alert rule.
-
For more information about how to view alerting resources, see View alerting resources.
-
For more information about how to modify an alert rule, see Modify an alert rule.
-
For more information about how to merge alert notifications from different alert rules, see Merge alert notifications.