All Products
Search
Document Center

Simple Log Service:Use CloudMonitor to monitor Simple Log Service

Last Updated:Nov 29, 2024

You can use CloudMonitor to monitor the resource usage of Simple Log Service based on various metrics including write traffic, overall queries per second (QPS), and service status. You can configure alert rules to monitor log collection and shard usage and identify related exceptions.

Prerequisites

If you want to use a Resource Access Management (RAM) user to view the metrics that are provided by CloudMonitor, make sure that the RAM user is granted the read-only or read and write permissions on CloudMonitor. To grant the permissions, you can use an Alibaba Cloud account to attach the AliyunCloudMonitorReadOnlyAccess or AliyunCloudMonitorFullAccess policy to the RAM user. For more information, see Step 2: Grant permissions to the RAM user.

View metrics that are provided by CloudMonitor

  1. Log on to the Simple Log Service console.

  2. In the Projects section, click the project you want.

    image

  3. On the Log Storage > Logstores tab, find the logstore whose metrics you want to view and choose 日志库管理图标 > Monitor.

    image

  4. View the metrics.

Metric description

Metric

Description

Write Traffic

The size of data that is written in real time to the logstore per minute.

Size of Raw Data

The original size of data that is written to the logstore per minute. This metric measures the size of the data before compression.

Overall QPS

The QPS of all operations.

Number of operations

The number of API operations that are called per minute. For more information, see List of operations by function.

Service Status

The numbers of returned HTTP status codes.

Traffic resolved successfully

The size of raw log data that is collected by Logtail.

Lines resolved successfully

The number of log lines that are collected by Logtail.

Lines failed to be resolved

The number of log lines that Logtail fails to collect. If statistics are displayed in this chart, errors occurred during log data collection.

Number of errors

The number of errors that occurred during log data collection.

Number of error instances

The number of machines on which errors occurred during log data collection.

Number of error IPs

The numbers of IP addresses for which different types of errors are reported.

You can identify an IP address based on the error type. Then, you can log on to the machine to view the /usr/local/ilogtail/ilogtail.LOG file and troubleshoot the error.

Lines

The number of log lines that are written to the logstore per minute.

Read Traffic

The size of data that is read in real time from the logstore per minute.

Delay Time of Consumption

The difference between the current consumption checkpoint and the point in time at which the most recent data is written to the queue. In a consumer group, the value of this metric is the largest time difference among all shards.

Configure alert rules

Simple Log Service allows you to configure alert rules by using CloudMonitor. If the Service Status metric meets a trigger condition in an alert rule, a text message or an email notification is sent to the specified recipients. You can configure alert rules in the CloudMonitor console to monitor log collection and shard usage and identify related exceptions.

On the monitoring page of a cloud service, you can configure alert rules for resources. When an alert is triggered based on the configured alert rules, CloudMonitor sends an alert notification to you.

  1. Log on to the CloudMonitor console.

  2. In the left-side navigation pane, choose Cloud Service Monitoring > Cloud Service Monitoring.

  3. On the Cloud Service Monitoring page, select a cloud service.

  4. Create an alert rule for the cloud service.

    • Create an alert rule on the Alert Rules page.

      1. On the monitoring page of the cloud service, find the resource for which you want to create an alert rule. Click Alert Rules in the Actions column.

      2. On the Alert Rules page, click Create Alert Rule.

      3. In the Create Alert Rule panel, configure parameters for the alert rule.

      4. Click Confirm.

    • Create an alert rule on the monitoring page of the cloud service.

      1. On the monitoring page of the cloud service, click Create Alert Rule in the upper-right corner.

      2. In the Create Alert Rule panel, configure parameters for the alert rule.

      3. Click Confirm.

    Note

    For more information about how to configure parameters for an alert rule, see Create an alert rule.

View alert rules that are configured by using CloudMonitor

On the monitoring page of a cloud service, you can view all alert rules that are configured for resources.

  1. Log on to the CloudMonitor console.

  2. In the left-side navigation pane, choose Cloud Service Monitoring > Cloud Service Monitoring.

  3. On the Cloud Service Monitoring page, select a cloud service.

  4. On the monitoring page of the cloud service, click View Alert Rules in the upper-right corner.