All Products
Search
Document Center

Simple Log Service:Create alert rules

Last Updated:Sep 03, 2024

CloudLens for RDS provides built-in alert rule templates. If you want to monitor ApsaraDB RDS in real time, you need to only create an alert rule from a template. This topic describes how to create an alert rule.

Prerequisites

Configuration related to data collection is complete. For more information, see Enable the log collection feature.

Background information

CloudLens for RDS provides the following built-in resources for alerting: alert rule templates, SLS audit builtin alert policy, SLS audit builtin action policy, SLS audit builtin user group, and SLS audit builtin content template. Before you use the built-in resources, take note of the following items:

  • A built-in alert rule template uses the built-in alert policy.

    Note

    The built-in alert rule templates of CloudLens for RDS are associated with the built-in alert policy. You cannot disassociate the built-in alert policy from the templates or associate other alert policies with the templates.

  • The built-in alert policy uses the built-in action policy.

  • The built-in action policy uses the built-in user group and built-in alert template.

You can use built-in resources or custom resources to create alert rules. In this topic, built-in resources are used as an example. For more information about how to use custom resources, see Create an alert rule for logs.

Step 1: Create a user

  1. Log on to the Simple Log Service console.

  2. In the Log Application section, click the Cloud Service Lens tab and click CloudLens for RDS.

  3. In the left-side navigation pane, click Anomaly Detection.

  4. On the Alert Center page, choose Notification Objects > User Management.

  5. Click Create to create a user. For more information, see Create users.

Step 2: Add the user to the built-in user group

  1. On the Alert Center page, choose Notification Objects > User Group Management.

  2. In the list of user groups, find SLS audit builtin user group and click Edit in the Actions column.

  3. In the Edit User Group dialog box, add the created user from the Available Members section to the Selected Members section. Then, click OK.

Step 3: Create an alert rule

  1. On the Alert Rules tab, click the image icon to the right of Create Alert.

  2. Click Create from Template.

  3. In the Create from Template panel, click RDS Operation Compliance.

  4. In the list of alert rule templates, find the template that you want to use.

  5. Create an alert rule. For more information about how to reconfigure the parameters, see Create an alert rule.

    After the alert rule is created, Simple Log Service starts to monitor ApsaraDB RDS in real time. If you want to create multiple alert rules, click Create Alert.

    For more information about the parameters of an alert rule, see Security of ApsaraDB RDS instances.

What to do next

Operation

Description

Disable an alert rule

If you disable an alert rule, the value in the Status column of the alert rule changes to Disabled, and alerts are no longer triggered based on the alert rule.

The configurations of the alert rule are not deleted. If you want to enable the alert rule again, you do not need to reconfigure the parameters of the alert rule.

Pause an alert rule

If you pause an alert rule, alerts are not triggered based on the alert rule within a specified period of time.

Resume an alert rule

You can resume a paused alert rule based on your business requirements.

Delete an alert rule

The configurations of the alert rule are deleted. The configurations include the Alibaba Cloud account that is used to create the alert rule. If you want to enable the alert rule again, you must reconfigure the parameters of the alert rule.

Upgrade alert rules

If a major upgrade is released for alert rules or if additional configurations are required after alert rules are upgraded, you are prompted to upgrade alert rules. In most cases, Simple Log Service automatically upgrades alert rules.

Initialize alert assets

If the assets generated during alert initialization are deleted by mistake or if the first initialization of alert assets fails, you can perform this operation to forcefully initialize the alert assets.