All Products
Search
Document Center

Simple Log Service:Logtail configuration generator

Last Updated:Mar 25, 2026

If you plan to configure Logtail collection tasks by using an AliyunPipelineConfig CRD or by calling an API, this topic describes how to use the logtail configuration generator. This tool automatically generates the required CRD definitions and API parameter scripts to accelerate the configuration process and reduce manual effort.

Procedure

  1. Log on to the Simple Log Service console.

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

    image

  3. In the left-side navigation pane, click image > CRD Generator.

    image

  4. On the CRD Generator page, select a collection scenario at the top and configure the logtail configuration in the left-side section. After you complete the configuration, a YAML script for the AliyunPipelineConfig CRD and a JSON configuration for API calls are generated in the Preview configurations section on the right.

    • Collection scenario: The following collection scenarios are supported: Text logs in a server scenario, Kubernetes - file, and Stdout and stderr - new/old version.

    • Logtail configuration: Click Import logtail configuration to import an existing configuration on the Import logtail configuration page, or create a new logtail configuration based on the selected collection scenario.

    • Preview configurations:

      • YAML: Generates a script to create a logtail configuration by using an AliyunPipelineConfig CRD. This script can be used directly without modification.

      • JSON: Provides the configuration for calling the CreateLogtailPipelineConfig API operation. The key-value pairs in the JSON correspond to the parameter-value pairs for the API call.

    image

  5. If you create a new logtail configuration and use LoongCollector to process logs in SPL mode (as shown in the following figure), you must first provide a sample log. Then, when you click Preview to view the processing result, ensure that you specify the correct Project name and Logstore name.

    image

  6. Copy the generated YAML or JSON and create a logtail configuration based on your specific scenario.

Scenarios

Text logs

When you collect text logs in a server scenario, you cannot use a CRD to create the logtail configuration. The following example shows how to use the logtail configuration generator to create the configuration by making an API call.

  1. Generate parameters for the API call: In the left-side section of the CRD Generator page, complete the logtail configuration or click Import logtail configuration.

    image

  2. Make the API call: The generated JSON script in the right-side section provides the parameters for the CreateLogtailPipelineConfig operation (Debugging).

Kubernetes - file

  1. On the CRD Generator page, click Kubernetes - file.

    image

  2. In the left-side section, click Import logtail configuration or refer to the following documents to complete the logtail configuration.

  3. Create a logtail configuration.

    AliyunPipelineConfig CRD

    The YAML script generated in the right-side section is for creating a logtail configuration using an AliyunPipelineConfig CRD. For detailed steps, see the following topics based on your scenario:

    API

    The generated JSON script in the right-side section provides the parameters for the CreateLogtailPipelineConfig operation (Debugging).

Stdout and stderr

  1. On the CRD Generator page, click Stdout and stderr - new version or Stdout and stderr - old version.

    image

  2. In the left-side section, click Import logtail configuration or refer to the following documents to complete the logtail configuration.

    • To collect stdout and stderr (old version) from an ACK cluster where Logtail is deployed as a DaemonSet, see Simple Log Service console.

    • To collect stdout and stderr (old version) from a self-managed Kubernetes cluster where Logtail is deployed as a DaemonSet, see Simple Log Service console.

  3. Create a logtail configuration.

    AliyunPipelineConfig CRD

    The YAML script generated in the right-side section is for creating a logtail configuration using an AliyunPipelineConfig CRD. For detailed steps, see the following topics based on your scenario:

    API

    The generated JSON script in the right-side section provides the parameters for the CreateLogtailPipelineConfig operation (Debugging).