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

Creating Alarm Rules for a DB Instance

Scenarios

You can create alarm rules for GaussDB(for MySQL) to customize the monitored objects and notification policies and stay aware of the GaussDB(for MySQL) instance statuses.

The GaussDB(for MySQL) alarm rules include alarm rule names, services, dimensions, monitored objects, metrics, alarm thresholds, monitoring period, and whether to send notifications.

Creating Alarm Rules for Instances

  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 on the left, choose Cloud Service Monitoring > GaussDB(for MySQL).
  4. In the instance list, click in the front of the instance. Locate a node and click Create Alarm Rule in the Operation column.

    Figure 1 Creating an alarm rule for an instance

  5. 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.
      Table 1 Parameter description

      Parameter

      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 content parameters.
      Table 2 Parameter description

      Parameter

      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 is triggered.

    3. Configure alarm notification parameters.
      Figure 2 Configuring an alarm notification

      Table 3 Parameter description

      Parameter

      Description

      Alarm Notification

      Specifies whether to notify users when alarms are triggered. Notifications can be sent by email or text message, or through HTTP/HTTPS request to servers.

      Notification Recipient

      You can select a notification group or topic subscription as required.

      Notification Group

      Specifies the notification group that needs to send alarm notifications.

      Notification Object

      Specifies the object an alarm notification is to be sent to. You can select the account contact or a topic.
      • Account contact is the mobile phone number and email address provided for registration.
      • Topic is used to publish messages and subscribe to notifications. If the required topic is unavailable, create one first and add subscriptions to it.

        For details, see Creating a Topic and Adding Subscriptions.

      Validity Period

      Cloud Eye sends notifications only within the validity period specified in the alarm rule.

      If you set Validity Period to 08:00-20:00, Cloud Eye sends notifications only within 08:00-20:00.

      Trigger Condition

      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 3 Configuring advanced settings
      Table 4 Parameter description

      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.

  6. Click Create. The alarm rule is created.

Creating Alarm Rules for Metrics

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and a project.
  3. Click in the upper left corner of the page, choose Databases > GaussDB(for MySQL).
  4. On the Instances page, locate the instance and click View Metric 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 displayed Basic Information page, click View Metric in the upper right corner.
    • In the Node List area of the Basic Information page, locate a node and click View Metric in the Operation column.

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

    Figure 4 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.
      Table 5 Parameter description

      Parameter

      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 content parameters.
      Table 6 Parameter description

      Parameter

      Description

      Method

      Specifies the method for triggering an alarm. If you select Configure manually, you can configure Alarm Policy and Alarm Severity as required.

      Alarm Policy

      Specifies the policy for triggering an alarm.

    3. Configure alarm notification parameters.
      Figure 5 Configuring an alarm notification

      Table 7 Parameter description

      Parameter

      Description

      Alarm Notification

      Specifies whether to notify users when alarms are triggered. Notifications can be sent by email or text message, or through HTTP/HTTPS request to servers.

      Notification Recipient

      You can select a notification group or topic subscription as required.

      Notification Group

      Specifies the notification group that needs to send alarm notifications.

      Notification Object

      Specifies the object an alarm notification is to be sent to. You can select the account contact or a topic.
      • Account contact is the mobile phone number and email address provided for registration.
      • Topic is used to publish messages and subscribe to notifications. If the required topic is unavailable, create one first and add subscriptions to it.

        For details, see Creating a Topic and Adding Subscriptions.

      Validity Period

      Cloud Eye sends notifications only within the validity period specified in the alarm rule.

      If you set Validity Period to 08:00-20:00, Cloud Eye sends notifications only within 08:00-20:00.

      Trigger Condition

      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 6 Configuring advanced settings
      Table 8 Parameter description

      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.