All Products
Search
Document Center

CloudMonitor:Custom monitoring

Last Updated:Feb 26, 2024

You can use the custom monitoring feature to create custom metrics and configure alert rules for the metrics. You can call the PutCustomMetric operation to report business metrics about which you are concerned to CloudMonitor. Then, you can view monitoring data and configure alert rules for these metrics in the CloudMonitor console. CloudMonitor sends alert notifications about abnormal metrics to you. This allows you to handle failures at the earliest opportunity and ensures business continuity.

Important The custom monitoring feature will no longer be available from September 14, 2024. We recommend that you use the custom monitoring feature in Hybrid Cloud Monitoring instead.

Prerequisites

Monitoring data is reported. For more information, see Overview.

Background information

The following items describe the differences between event monitoring and custom monitoring.

  • The event monitoring feature is used to report, query, and trigger alerts for non-sequential data.

  • The custom monitoring feature is used to report, query, and trigger alerts for time series data that is continuously collected on a regular basis.

View the monitoring data of custom metrics

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, click Custom Monitoring.

  3. On the Time Series tab of the Custom Monitoring page, select the application group and time series. Then, click Select Dimension.

  4. In the Dimensions panel, select the dimension that you want to use and click OK.

    By default, CloudMonitor queries the monitoring data for the latest one hour. You can select a time period based on your needs.

Create an alert rule for custom monitoring

  1. Log on to the CloudMonitor console.
  2. In the left-side navigation pane, click Custom Monitoring.

  3. Click the Alert Rules tab.

  4. Click Create Alert Rule.

  5. In the Create/Modify Custom Monitoring Alert Rule panel, configure the parameters for the alert rule. The following table describes the parameters.

    Parameter

    Description

    Rule Name

    The name of the alert rule.

    Application Group

    The ID of the application group to which the alert rule belongs.

    Default value: Does not belong to any group. You can select an application group based on your business requirements. For information about how to create an application group, see Create an application group.

    Metric

    The name of the custom metric.

    Dimension

    The resources for which you want to query the monitoring data.

    The value is a set of key-value pairs. Examples: instanceId:i-uf6j91r34rnwawoo**** and userId:100931896542****.

    Notification Method

    Email + Webhook

    Rule Description

    The condition that triggers an alert. If the metric meets the specified condition, an alert is triggered.

    Contact Group

    The alert contact groups. For more information about how to create an alert contact group, see Create an alert contact or alert contact group.

    • If the Application Group parameter is set to Does not belong to any group, you can select one or more alert contact groups. If an alert is triggered, the alert contacts in the alert contact groups receive alert notifications.

    • If you select an application group from the Application Group drop-down list, you can select one or more alert contact groups. If an alert is triggered, the alert contacts in the alert contact groups receive alert notifications. The alert contact group of the application group remains unchanged. The alert contacts in the alert contact group do not receive alert notifications.

    Triggered when threshold is exceeded for

    The number of consecutive times that the threshold value is exceeded. If the number of times exceeds the limit that you specify, the alert contacts in the alert contact groups receive alert notifications. Valid values: 1, 3, 5, 10, 15, and 30.

    Mute For

    The interval at which CloudMonitor resends alert notifications before the alert is cleared. Valid values: 5 Minutes, 10 Minutes, 15 Minutes, 30 Minutes, 60 Minutes, 3 Hours, 6 Hours, 12 Hours, and 24 Hours.

    If the threshold value is exceeded, CloudMonitor sends an alert notification. If the threshold value is exceeded again within the mute period, CloudMonitor does not resend an alert notification. If the alert is not cleared after the mute period ends, CloudMonitor resends an alert notification.

    Effective Period

    The period during which the alert rule is effective. CloudMonitor sends alert notifications based on the alert rule only within the effective period.

    Note

    If an alert rule is not effective, no alert notification is sent. However, the alert history is still displayed on the Alert History page.

    Alert Callback

    The callback URL that can be accessed over the Internet. CloudMonitor sends a POST or GET request to push an alert notification to the callback URL that you specify. Only HTTP requests are supported. For information about how to configure callback URLs, see Use the alert callback feature to send notifications about threshold-triggered alerts.

    To test the connectivity of an alert callback URL, perform the following steps:

    1. Click Test next to the callback URL.

      In the Webhook Test panel, you can check and troubleshoot the connectivity of the alert callback URL based on the returned status code and test result details.

      Note

      To obtain the details of the test result, configure the Test Template Type and Language parameters and click Test.

    2. Click Close.

  6. Click Confirm.