Simple Log Service provides built-in alert monitoring rules in CloudLens for SLS. To monitor Simple Log Service in real time, you need to configure an alert monitoring rule to generate an alert instance. Then, you can receive alert notifications such as DingTalk messages. This topic describes how to configure alerts.
Prerequisites
Log collection for important logs, detailed logs, job run logs, and audit logs is enabled for a project. For more information, see Enable the log collection feature.
Background information
CloudLens for SLS provides alert monitoring rules such as the baseline alert monitoring rule, interval-valued comparison alert monitoring rule, and periodicity-valued comparison alert monitoring rule. You can use these alert monitoring rules to monitor the usage of resources such as projects, Logtail, and consumer groups. CloudLens for SLS supports different notification methods, such as text messages, DingTalk messages, emails, voice calls, and custom webhooks. You can enable an alert monitoring rule as needed. The following list describes the characteristics of each type of alert monitoring rule:
Baseline alert monitoring rule: If the value of a metric is greater than or less than the threshold that you specify, an alert is triggered. For example, if the number of times that the project quota is exceeded is greater than 2, an alert is triggered.
Interval-valued comparison and periodicity-valued comparison alert monitoring rules: If the rate of change between the value within the current time period and the value of a historical time period exceeds or drops below the threshold that you specify, an alert is triggered. For example, if the growth rate of the number of Logtail collection errors on the current day exceeds 20% compared with the number of Logtail collection errors on the previous day, an alert is triggered.
Procedure
- Log on to the Log Service console.
In the Log Application section, click the Cloud Service Lens tab. Then, click CloudLens for SLS.
In the navigation pane on the left, click Anomaly Detection.
On the Alert Rules tab, click Create Alert > Create From Template. For more information about the alert parameters, see Create an alert monitoring rule.
Related operations
On the Alert Rules page, you can perform the following operations.
Operation | Description |
Disable an alert instance | If you disable an alert instance, the status of the alert monitoring rule changes to Disabled, which is displayed in the Status column. Alerts are no longer triggered based on the alert monitoring rule. If you disable an alert instance, the parameter configurations of the alert monitoring rule are not deleted. If you want to enable the alert instance again, you do not need to reconfigure the parameters of the alert monitoring rule. |
Pause an alert instance | If you pause an alert instance, alerts are not triggered based on the alert monitoring rule within a specified period of time. |
Resume an alert instance | You can resume a paused alert instance as needed. |
Delete an alert instance | If you delete an alert instance, the parameter configurations of the alert monitoring rule are also deleted. If you want to enable an alert instance again, you must reconfigure the parameters of the alert monitoring rule. |