Updated on 2024-05-27 GMT+08:00

Structuring Templates

LTS supports two types of structuring templates: system templates and custom templates.

System Templates

You can choose from multiple system templates, but cannot modify the field types in them or delete the fields. For details, see Table 1.

  1. Click System template and select a template. A sample log event is displayed for each template.
  1. When you select a template, the log parsing result is displayed in the Template Details area. Click Save.

    • During log structuring, if a system template is used, the time in the system template is the customized log time. You can search for a template by template name to quickly query its information.
    • Fields of the string type do not support range query using the >, =, or < operators or the "in" syntax. Use asterisks (*) or question marks (?) for fuzzy query. You need to reconfigure the structuring and change the value of this field to a number.
    Table 1 System template fields

    Structuring Method

    Field Name

    Field Type Can Be Changed

    Field Can Be Deleted

    Field Details

    ELB structuring template

    Defined by ELB.

    No

    No

    Collecting Logs from ELB

    VPC structuring template

    Defined by VPC.

    No

    No

    Collecting Logs from VPC

    CTS structuring template

    Keys in JSON log events.

    No

    No

    Collecting Logs from CTS

    APIG structuring template

    Defined by APIG.

    No

    No

    Collecting Logs from API Gateway

    DCS audit logs

    Defined by DCS.

    No

    No

    Collecting Logs from DCS

    Tomcat

    Defined by Tomcat.

    No

    No

    Collecting Logs from Tomcat

    Nginx

    Defined by Nginx.

    No

    No

    Collecting Logs from Nginx

    GAUSSV5

    Defined by GAUSSV5.

    No

    No

    Collecting Logs from GaussDB

    DDS audit logs

    Defined by DDS.

    No

    No

    Collecting Logs from DDS

    DDS error logs

    Defined by DDS.

    No

    No

    Collecting Logs from DDS

    DDS slow query logs

    Defined by DDS.

    No

    No

    Collecting Logs from DDS

    CFW access control logs

    Defined by CFW.

    No

    No

    Collecting Logs from CFW

    CFW attack logs

    Defined by CFW.

    No

    No

    Collecting Logs from CFW

    CFW traffic logs

    Defined by CFW.

    No

    No

    Collecting Logs from CFW

    MySQL error logs

    Defined by MySQL.

    No

    No

    Collecting Logs from RDS for MySQL

    MySQL slow query logs

    Defined by MySQL.

    No

    No

    Collecting Logs from RDS for MySQL

    PostgreSQL slow query logs

    Defined by PostgreSQL.

    No

    No

    Collecting Logs from RDS for PostgreSQL

    PostgreSQL error logs

    Defined by PostgreSQL.

    No

    No

    Collecting Logs from RDS for PostgreSQL

    SQL Server error logs

    Defined by SQL Server.

    No

    No

    Collecting Logs from RDS for SQL Server

    GeminiDB Redis slow query logs

    Defined by GeminiDB Redis.

    No

    No

    Collecting Logs from GeminiDB Redis

    CDN

    Defined by CDN.

    No

    No

    Collecting Logs from CDN

    SMN

    Defined by SMN.

    No

    No

    Collecting Logs from SMN

    GAUSSDB_MYSQL error logs

    Defined by GaussDB_MySQL.

    No

    No

    Collecting Logs from GaussDB(for MySQL)

    GaussDB_MySQL slow query logs

    Defined by GaussDB_MySQL.

    No

    No

    Collecting Logs from GaussDB(for MySQL)

    ER Enterprise Router

    Defined by ER.

    No

    No

    Collecting Logs from ER

    MySQL audit logs

    Defined by MySQL.

    No

    No

    Collecting Logs from RDS for MySQL

    GeminiDB Cassandra slow query logs

    Defined by GeminiDB Cassandra.

    No

    No

    Collecting Logs from GeminiDB Cassandra

    GeminiDB Mongo slow query logs

    Defined by GeminiDB Mongo.

    No

    No

    Collecting Logs from GeminiDB Mongo

    GeminiDB Mongo error logs

    Defined by GeminiDB Mongo.

    No

    No

    Collecting Logs from GeminiDB Mongo

    WAF access logs

    Defined by WAF.

    No

    No

    Collecting Logs from WAF

    WAF attack logs

    Defined by WAF.

    No

    No

    Collecting Logs from WAF

    DMS rebalancing logs

    Defined by DMS.

    No

    No

    Collecting Logs from DMS for Kafka

    CCE audit logs

    Defined by CCE.

    No

    No

    Ingesting CCE Application Logs to LTS

    CCE event logs

    Defined by CCE.

    No

    No

    Ingesting CCE Application Logs to LTS

    GeminiDB Redis audit logs

    Defined by GeminiDB Redis.

    No

    No

    Collecting Logs from GeminiDB Redis

    influx slow query logs

    Defined by influx.

    No

    No

    -

Custom Templates

Click Custom template and select a template. There are two ways to obtain a custom template:
  • When you extract fields using methods of regular expression, JSON, delimiter, or Nginx, click Save as Template in the lower left corner. In the displayed dialog box, enter the template name and click OK. The template will be displayed in the custom template list.
  • Create a custom template under the Structuring Template option.

    Select Custom template and click Create Template. Enter a template name, select Regular Expressions, JSON, Delimiter, or Nginx, configure the template, and click Save. The template will be displayed in the custom template list.