Updated on 2024-11-06 GMT+08:00

Creating an Alarm Rule for a DB Instance

Scenarios

You can create alarm rules for a DB instance to configure the monitored objects and notification policies and then stay aware of the DB instance status.

The following parameters can be configured: alarm rule names, services, dimensions, monitored objects, metrics, alarm thresholds, monitoring period, and whether to send notifications.

Creating an Alarm Rule for a DB Instance

  1. Log in to the management console.
  2. Click in the upper left corner of the page. Under Management & Governance, click Cloud Eye.
  3. In the navigation pane, choose Cloud Service Monitoring.
  4. Click the GaussDB(for MySQL) dashboard.
  5. In the instance list, locate the target instance and choose More > Create Alarm Rule in the Operation column.
  6. On the displayed page, configure parameters as needed. For details, see Creating an Alarm Rule.

    1. Configure the alarm rule name and description.
      Figure 1 Configuring the alarm rule name and description
      Table 1 Name and Description

      Parameter

      Description

      Name

      Specifies the name of the alarm rule. The system generates a random name, but you can change it if needed.

      Example value: alarm-b6al

      Description

      (Optional) Provides supplementary information about the alarm rule.

    2. Configure alarm rule parameters.
      Figure 2 Configuring an alarm rule
      Table 2 Alarm rule parameters

      Parameter

      Description

      Method

      Select an associated template, use an existing template or create a custom template as required.

      • Modifying the template will also modify its associated alarm rules.
      • If you select Configure manually, you can configure Alarm Policy and Alarm Severity as required.

      Template

      Select the template to be used.

      You can select a default alarm template or create a custom template.

      For details about how to create a custom template, see Creating a Custom Template

      Alarm Policy

      Specifies the policy for triggering an alarm.

      A maximum of 50 alarm policies can be added to an alarm rule. If any one of these alarm policies is met, an alarm will be triggered.

    3. Configure alarm notification parameters.
      Figure 3 Alarm Notification
      Table 3 Alarm Notification parameters

      Parameter

      Description

      Alarm Notification

      Specifies whether to send notifications to users over different protocols, such as SMS, email, voice notification, HTTP, HTTPS, FunctionGraph (function), FunctionGraph (workflow), WeCom chatbot, DingTalk chatbot, Lark chatbot, and WeLink chatbot.

      Notification Type

      The following three options are available:

      • Notification policies: Flexible alarm notifications by severity and more notification channels are provided.
      • Notification groups: Configure notification templates on Cloud Eye.
      • Topic subscriptions: Configure notification templates on SMN.

      Notification Policies

      If Notification policies is selected for Notification Recipient, you need to select one or more notification policies. You can specify the notification group, window, template, and other parameters in a notification policy.

      Notification Group

      If Notification groups is selected for Notification Recipient, select the notification groups to which alarm notifications will be sent.

      Notification Object

      Specifies the object to which alarm notifications will be sent. You can select the account contact or a topic name. This parameter is available only if Topic subscriptions is selected for Notification Recipient.

      • Account contact is the mobile phone number and email address of the registered account.
      • Topic is used to publish messages and subscribe to notifications. If the required topic is unavailable, create one first and add subscriptions to it.

      Notification Template

      This parameter is only available if Notification groups or Topic subscriptions is selected for Notification Recipient. You can select an existing template or create a new one.

      Notification Window

      This parameter is only available if Notification groups or Topic subscriptions is selected for Notification Recipient.

      Specifies the time window during which Cloud Eye sends notifications.

      If Notification Window is set to 08:00-20:00, Cloud Eye sends notifications only within this window.

      Trigger Condition

      This parameter is only available if Notification groups or Topic subscriptions is selected for Notification Recipient.

      Specifies the condition for triggering the alarm notification. You can select Generated alarm (when an alarm is generated), Cleared alarm (when an alarm is cleared), or both.

    4. Configure the enterprise project and tag.
      Figure 4 Advanced Settings

      Table 4 Enterprise Project and Tag

      Parameter

      Description

      Enterprise Project

      Specifies the enterprise project that the alarm rule belongs to. Only users with the enterprise project permissions can view and manage the alarm rule.

      For details about how to create an enterprise project, see Creating an Enterprise Project.

      Tag

      Adding tags helps you better identify and manage your DB instances.

  7. Click Create.

Creating an Alarm Rule for a Metric

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click in the upper left corner of the page and choose Databases > GaussDB(for MySQL).
  4. On the Instances page, locate the DB instance and click View Metrics in the Operation column to go to the Cloud Eye console.

    Alternatively, go to the Cloud Eye console using either of the following methods:

    • On the Instances page, click the instance name to go to the Basic Information page. In the upper right corner of the page, click and choose View Metric.
    • In the Node List area of the Basic Information page, locate a node and click View Metrics in the Operation column.

  5. Locate the metric that you want to create an alarm for and click in the upper right corner of the metric.

    Figure 5 Creating an alarm rule for a metric

  6. On the Create Alarm Rule page, configure parameters as needed. For details, see Creating an Alarm Rule.

    1. Configure the alarm rule name and description.
      Figure 6 Configuring the alarm rule name and description
      Table 5 Name and Description

      Parameter

      Description

      Name

      Specifies the name of the alarm rule. The system generates a random name, but you can change it if needed.

      Example value: alarm-b6al

      Description

      (Optional) Provides supplementary information about the alarm rule.

    2. Configure alarm rule parameters.
      Figure 7 Configuring alarm rule parameters
      Table 6 Alarm rule parameters

      Parameter

      Description

      Method

      The default value is Configure manually.

      • Modifying the template will also modify its associated alarm rules.
      • If you select Configure manually, you can configure Alarm Policy and Alarm Severity as required.

      Alarm Policy

      Specifies the policy for triggering an alarm.

      A maximum of 50 alarm policies can be added to an alarm rule. If any one of these alarm policies is met, an alarm will be triggered.

    3. Configure alarm notification parameters.
      Figure 8 Alarm Notification
      Table 7 Alarm Notification parameters

      Parameter

      Description

      Alarm Notification

      Specifies whether to send notifications to users over different protocols, such as SMS, email, voice notification, HTTP, HTTPS, FunctionGraph (function), FunctionGraph (workflow), WeCom chatbot, DingTalk chatbot, Lark chatbot, and WeLink chatbot.

      Notification Type

      The following three options are available:

      • Notification policies: Flexible alarm notifications by severity and more notification channels are provided.
      • Notification groups: Configure notification templates on Cloud Eye.
      • Topic subscriptions: Configure notification templates on SMN.

      Notification Policies

      If Notification policies is selected for Notification Recipient, you need to select one or more notification policies. You can specify the notification group, window, template, and other parameters in a notification policy.

      Notification Group

      If Notification groups is selected for Notification Recipient, select the notification groups to which alarm notifications will be sent.

      Notification Object

      Specifies the object to which alarm notifications will be sent. You can select the account contact or a topic name. This parameter is available only if Topic subscriptions is selected for Notification Recipient.

      • Account contact is the mobile phone number and email address of the registered account.
      • Topic is used to publish messages and subscribe to notifications. If the required topic is unavailable, create one first and add subscriptions to it.

      Notification Template

      This parameter is only available if Notification groups or Topic subscriptions is selected for Notification Recipient. You can select an existing template or create a new one.

      Notification Window

      This parameter is only available if Notification groups or Topic subscriptions is selected for Notification Recipient.

      Specifies the time window during which Cloud Eye sends notifications.

      If Notification Window is set to 08:00-20:00, Cloud Eye sends notifications only within this window.

      Trigger Condition

      This parameter is only available if Notification groups or Topic subscriptions is selected for Notification Recipient.

      Specifies the condition for triggering the alarm notification. You can select Generated alarm (when an alarm is generated), Cleared alarm (when an alarm is cleared), or both.

    4. Configure the enterprise project and tag.
      Figure 9 Advanced Settings

      Table 8 Enterprise Project and Tag

      Parameter

      Description

      Enterprise Project

      Specifies the enterprise project that the alarm rule belongs to. Only users with the enterprise project permissions can view and manage the alarm rule.

      For details about how to create an enterprise project, see Creating an Enterprise Project.

      Tag

      Adding tags helps you better identify and manage your DB instances.

  7. Click Create.