Cloud Monitor allows you to create alert rules for custom metrics. When a custom metric exceeds a specified threshold, Cloud Monitor sends an alert notification to the designated alert contact group.
Prerequisites
Custom monitoring data is reported to Cloud Monitor. For more information, see Overview.
Procedure
-
Log on to the Cloud Monitor console.
-
In the left-side navigation pane, choose .
-
Click the Alert Rules tab.
-
Click Create Alert Rule.
-
In the Create/Modify Custom Monitoring Alert Rule panel, configure the parameters for the alert rule.
Parameter
Description
Alert Rule Name
The name of the alert rule.
Application Group
The application group that the alert rule belongs to.
By default, an alert rule does not belong to any application group. You can select one as needed. For more information about how to create an application group, see Create an application group.
Metric
The name of the custom metric.
Dimension
Key-value pairs that identify the resource for which you want to query metric data.
Format: A collection of key-value pairs. Example:
instanceId:i-uf6j91r34rnwawoo****,userId:100931896542****.Notification Method
Email + webhook
Desciption
The condition that triggers the alert. Cloud Monitor triggers an alert when the monitoring data meets this condition.
Contact Group
The alert contact group that receives notifications. For more information about how to create an alert contact group, see Create an alert contact or an alert contact group.
-
If you set Application Group to Does not belong to any group, you can select an alert contact group. Cloud Monitor sends notifications to the contacts in this group when the alert rule is triggered.
-
If you select a specific application group for Application Group, you can also select an alert contact group here. Cloud Monitor sends notifications only to the contacts in this group, overriding the alert contact group configured for the application group.
Number of times the threshold is exceeded before alerts are triggered
The number of consecutive times the threshold must be exceeded before Cloud Monitor sends an alert notification. Valid values: 1, 3, 5, 10, 15, and 30.
Mute Period
The interval between repeated alert notifications when an alert is not cleared. Valid values: 5 minutes, 10 minutes, 15 minutes, 30 minutes, 60 minutes, 3 hours, 6 hours, 12 hours, and 24 hours.
When a metric triggers an alert, Cloud Monitor sends a notification. If the metric continues to exceed the threshold during the mute period, no new notifications are sent. After the mute period ends, Cloud Monitor sends another notification if the alert is still active.
Effective Period
The time range during which the alert rule is active. Cloud Monitor sends alert notifications only within this period.
NoteIf an alert is triggered outside the effective period, Cloud Monitor does not send a notification, but still adds a record of the alert to the Alert History.
Alert Callback
A publicly accessible URL to which Cloud Monitor pushes alert information by using POST or GET requests. Only the HTTP protocol is supported. For more information about how to use alert callbacks, see Use alert callbacks for threshold-based alerts.
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.
-
-
Click Confirm.