All Products
Search
Document Center

Simple Log Service:Enterprise Distributed Application Service logs

Last Updated:Dec 23, 2024

Log Service and Enterprise Distributed Application Service (EDAS) jointly launch the log collection feature. You can use the feature to deliver business logs and container stdout and stderr of applications that are deployed in Container Service for Kubernetes (ACK) clusters to Log Service for query and analysis. This topic describes the assets and billing of the log collection feature.

Assets

  • Project and Logstore

    Important
    • Before you disable the log collection feature, do not delete the projects or Logstores that are related to EDAS logs. Otherwise, EDAS logs cannot be sent to Log Service.

    • If you have enabled the pay-by-ingested-data billing mode, Log Service creates a dedicated Logstore that uses the pay-by-ingested-data billing mode by default. If you want to switch the billing mode from pay-by-ingested-data to pay-by-feature, you can modify the configuration of the Logstore. For more information, see Manage a logstore.

    After you enable the log collection feature, EDAS uses the project that is specified when you create your Kubernetes cluster and creates a custom Logstore in the project.

  • Dedicated dashboard

    After you enable the feature, Log Service does not generate dedicated dashboards. You can create a custom dashboard to visualize query results. For more information, see Create a dashboard.

Billing

  • You are not charged for log collection on the EDAS side.

  • If your Logstore uses the pay-by-feature billing mode, you are charged for storage, read traffic, number of requests, data transformation, and data shipping after the logs are collected from EDAS to Log Service. The fees are included in the bills of Log Service. For more information, see Billable items of pay-by-feature.

  • If your Logstore uses the pay-by-ingested-data billing mode, you are charged only for read traffic over the Internet after the logs are collected from EDAS to Log Service. The fees are included in the bills of Log Service. For more information, see Billable items of pay-by-ingested-data.

Enable the log collection feature

Prerequisites

Procedure

Configure log collection when you create an application

  1. Log on to the EDAS console. In the left-side navigation pane, choose Application Management > Applications. The Applications page appears. In the top navigation bar, select a region. In the upper part of the page, select a namespace. In the upper-left corner, click Create Application.

  2. In the Basic Information step, specify Cluster Type and Application Runtime Environment and click Next. The following table describes the parameters.

    Parameter

    Description

    Cluster Type

    The type of the cluster in which you want to deploy the application. Select Kubernetes Clusters.

    Application Runtime Environment

    The application runtime environment. Select an application runtime environment based on the type of the hosted application.

    • Java

      • Custom: Select this option if you want to use a custom image to deploy the application in a Kubernetes cluster.

      • Java: Select this option if you want to use a universal JAR package to deploy the application as a Dubbo or a Spring Boot application. You can set the Java Environment parameter after you select this option.

      • Tomcat: Select this option if you want to use a universal WAR package to deploy the application as a Dubbo or a Spring application. You can set the Java Environment and Container Version parameters after you select this option.

      • EDAS-Container (HSF): Select this option if you want to use a WAR or FatJar package to deploy the application as a High-speed Service Framework (HSF) application. You can set the Java Environment, Pandora Version, and Ali-Tomcat Version parameters after you select this option.

    • PHP: Select this option if the application is a PHP application that runs on Apache HTTP Server.

    • Node.js, C++, Go, and Other Languages: Select this option if you want to use a custom image to deploy the application in a Kubernetes cluster. The configuration process for multi-language applications is not described in this topic.

  3. In the Configurations step, configure the environment information, basic information, and deployment method for the application, set the related resource parameters, and then click Next.

  4. In the Advanced Settings step, click Log Collection Settings, turn on Enable log collection to SLS, and then set the parameters based on your business requirements.

    Configure log collection

    Parameter

    Description

    Logstore Name

    Enter the name of the Logstore to receive logs. If the Logstore does not exist, a Logstore with the specified name is created.

    Collection Log Type

    You can select File Logs (Log Path in Container) or Standard Output Logs of Container.

    Collection Path

    Enter the storage path of logs in the container. Example:/usr/local/tomcat/logs/catalina.*.log

    Important
    • The specified storage path of logs must contain the log file name. Example: /tmp0/cjsc.log.

    • Do not store other important files in the directory where the log file is stored. Otherwise, your files may be overwritten.

    • To configure multiple collection rules, click Add Log Source.

  5. Click Create Application.

  6. On the Creation Completed page, check the information in the Basic Information, Configurations, and Advanced Settings sections. Then, click Create Application.

    In the upper part of the Application Overview page, click View Details. On the Change List page, view the application change process. Wait several minutes until the application is deployed. After the application change process is complete, view the status of the instance in the Basic Information section of the Application Overview page. If the status shows that a pod is running, the application is deployed.

Configure log collection when you deploy an application

If you did not configure log collection when you created an application, you can configure the relevant settings when you deploy the application.

  1. Log on to the EDAS console.

  2. In the left-side navigation pane, click Application Management > Applications. In the top navigation bar, select a region. In the upper part of the page, select a namespace. Select Container Service or Serverless Kubernetes Cluster from the Cluster Type drop-down list. Then, find the application that you want to deploy and click the application name.

  3. On the Overview or Basic information page, choose Deploy > Deploy in the upper-right corner.

  4. On the Select Deployment Mode page, select a deployment mode and click Start Deployment in the upper-right corner of the specified deployment mode section.

  5. Configure the application environment and deployment package information. In the Advanced Settings step, click Log Collection Settings, turn on Enable log collection to SLS, set the parameters based on your business requirements, and then click OK.

    Configure log collection

    Parameter

    Description

    Logstore Name

    Enter the name of the Logstore to receive logs. If the Logstore does not exist, a Logstore with the specified name is created.

    Collection Log Type

    You can select File Logs (Log Path in Container) or Standard Output Logs of Container.

    Collection Path

    Enter the storage path of logs in the container. Example:/usr/local/tomcat/logs/catalina.*.log

    Important
    • The application is restarted after you click OK. We recommend that you perform this operation during off-peak hours.

    • The specified storage path of logs must contain the log file name. Example: /tmp0/cjsc.log.

    • Do not store other important files in the directory where the log file is stored. Otherwise, your files may be overwritten.

What to do next

After you collect logs to Simple Log Service, you can query, analyze, download, ship, and transform the logs. You can also configure alert rules for the logs. For more information, see Common operations on logs of Alibaba Cloud services.