Updated on 2023-11-29 GMT+08:00

Structuring Templates

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

System Templates

System templates: ELB, VPC, CTS, APIG, DCS (audit logs), Tomcat, Nginx, GAUSSV5 audit logs, DDS (audit, error, and slow logs), CFW (access control, attack, and traffic logs), MySQL (error and slow logs), PostgreSQL (error and slow logs), SQL Server error logs, GAUSSDB_REDIS slow logs, CDN, SMN, GaussDB_MySQL (error and slow logs), ER, MySQL audit logs, GaussDB for Cassandra slow logs, GaussDB for Mongo slow and error logs, WAF access logs, WAF attack logs, DMS rebalancing logs, CCE audit logs, CCE event logs, GaussDB for Redis audit logs

  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.

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.