All Products
Search
Document Center

Microservices Engine:Export MSE traffic protection metrics to SLS

Last Updated:Aug 27, 2026

The Microservices Engine (MSE) traffic protection feature ensures business stability from multiple traffic-related dimensions such as traffic throttling, circuit breaking, degradation, and system overload protection. The MSE traffic protection feature provides more professional and stable traffic protection methods and traffic distribution analysis in seconds. If you want to query metrics in a more flexible manner during a long period of time, you can use the method of reporting traffic protection metrics to Simple Log Service. This topic describes how to report metric logs of the traffic protection feature of MSE Microservices Governance to Simple Log Service.

Prerequisites

Enable Logtail

If you enabled Simple Log Service when you created your ACK cluster, you can skip this section. Otherwise, follow these steps to enable Logtail. For more information, see Install Logtail when you create a cluster.

Note

This operation applies only to ACK dedicated clusters and ACK managed clusters.

  1. Log on to the ACK console. In the left navigation pane, click Clusters.

  2. On the Clusters page, click the name of your cluster. In the left navigation pane, click Components and Add-ons .

  3. On the Logs and Monitoring tab, find logtail-ds and click Install.

Collect data

This section describes how to configure the data source of Simple Log Service. Sentinel logs are collected, parsed, and reported to Simple Log Service. For more information, see the Configure data source and parsing format step in this topic.

  1. Log on to the Simple Log Service console.

  2. Click Quick Data Import. In the Import Data dialog box, enter Kubernetes in the search box, and then click Kubernetes - File.

  3. In the Select Logstore step, select a Project and a Logstore, and then click Next.

    Select the Project named k8s-log-{your_k8s_cluster_id} or another Project. For the Logstore, you can select an existing one or create one. For more information, see Create a Logstore.

  4. In the Machine Group Configuration step, select the target Machine Group (k8s-group-${your_k8s_cluster_id}). Move this machine group from the Source Machine Group list to the Applied Machine Group list, and then click Next.

    If you select another Project, create a Machine Group as prompted on the page.

  5. In the Logtail Configuration step, configure the data source and parsing format. After the configuration is complete, click Next.

    Parameter

    Description

    Config name

    Enter a configuration name.

    File Path

    • For agent versions earlier than 4.3.0: Logtail collects logs from the fixed path ${user_home}/logs/csp/{app_name}-metrics.log.{date}. Replace ${user_home} with the system's home directory. For example, if the system's home directory is root, the log directory is /root/logs/csp and the file name is *-metrics.log*.

    • For agent versions 4.3.0 and later: Logtail collects logs from the fixed path /home/admin/.opt/AliyunJavaAgent/logs/sentinel/{app_name}-metrics.log.{date}. The log directory is /home/admin/.opt/AliyunJavaAgent/logs/sentinel and the file name is *-metrics.log*.

    Note
    • To support both old and new agent versions, we recommend creating two identical Logtail configurations, each with a different file path.

    • You can view the agent version on the application's node details page.

    • For more information about the file path, see Important logs.

    Log Sample

    1724811932000|2024-08-28 02:25:32|com.alibabacloud.mse.demo.c.service.HelloServiceCTwo|24|0|24|0|1|0|1|202|OUT

    Processing Method

    Select Data Parsing (Delimiter Mode). Add a delimiter parsing plug-in and configure it as shown in the figures below.

  6. In the Query and Analysis Configurations step, wait for the Automatic Refresh to the right of Preview Data to complete. Add and modify some index fields, and then click Next.

Verify log reporting

  1. Log on to the Simple Log Service console.

  2. In the Projects list, click the target project and select the target logstore. The metrics now appear in the newly created logstore.

    e1b77201e1ce8c167e26077bc663726e