Field | Description |
remote_addr | Client IP address. If a proxy server is used, the proxy server's IP address is displayed. |
remote_user | Client name. |
time_local | Access time and time zone, server local time. |
request_method | The HTTP request method. |
request_uri | Requested access address. |
protocol | Protocol. |
request | Requested URI and HTTP protocol. |
request_time | Total duration of the entire request; measured in seconds. |
request_length | The length of the request message, including the request line, request header, and request body. |
status | Status codes from HTTP requests. |
body_bytes_sent | Number of content bytes sent to the client as the file body. |
http_referer | Link address of the source page accessed. |
http_user_agent | Client browser information. |
Reserved field | Description |
__path__ | Original log file directory and file name. |
__source__ | IP address of the server where the original log file is located. |
Configuration | Description |
Can be overwritten by new configuration | If there is an updated collection configuration, log files will not be collected according to the current configuration and will be collected based on the latest one. |
Permanent effect | Even if updated collection configurations exist, log files will continue to be collected based on the current configuration. Permanent effect applies only to LogCollector version 2.1.0 and later and may result in duplicate collection fees. For more details, refer to Collecting multiple copies of file logs or standard output. |
Configuration | Description |
Directory path | The specified directories that can be skipped during collection. Directory paths support exact matching and wildcard pattern matching.
|
File path | The specified files can be skipped during collection. You need to configure the file path and file name. File path supports both exact match and wildcard pattern match.
|
Configuration | Description |
Full |
|
Increment | Only newly added content within the file is collected. When new logs are written to log files within the monitor scope, it triggers LogCollector collection.
|
Configuration | Description |
Nginx log configuration | Nginx log format. Usually recorded in the Nginx.conf file, starting with log_format. For example, it can be set as: |
Regular expression | TLS automatically generates a regular expression based on the content provided in the Nginx log configuration. You can also make custom modifications based on this. |
Log example | Enter a log sample that matches the Nginx log configuration and click Verify. |
Extract result | TLS matches and parses fields based on Nginx log configuration and log samples, generating Nginx key names and their values. Check if the Key and Value fields match in the extracted result. If not, adjust Nginx log configuration, regular expression, or log sample until the fields are extracted correctly. |
Configuration | Description |
Filter | Log field filtering rules. It can be enabled or disabled. Disabled by default. When enabled, you can configure filtering rules by using regular expressions. Only logs that fully match the regular expression will be collected and reported. This helps you filter log data that you need. For example, set key to response_code and the filtering rule to 400|500. This means only logs with response_code values of 400 or 500 will be collected. |
Upload hostname field | This feature determines whether to upload the hostname field. By default, it is disabled.
|
Parse collection path | Extract fields from the collection path by using regular expressions and add them as metadata to the log data. By default, this function is turned off. After enabling this feature, set the collection path sample, extract regular expression, and extract result.
|
HashKey routing shard | Specify the HashKey to write data into the log shard that meets the range requirements. By default, this feature is disabled.
|
Upload original log | This feature determines whether to upload the original log as a single field to TLS. By default, it is disabled.
|
Upload constant fields | After enabling, LogCollector will encapsulate key and value of the specified field in each log entry. Constant fields must follow these restrictions:
|
Upload host group label | You can select whether to upload the label information of the host group to TLS. By default, it is enabled.
|
Extended configuration | LogCollector extended configuration. It is written in JSON object format. Currently supported parameters include CloseInactive, CloseRemoved, CloseRenamed, CloseEOF, and CloseTimeout. For detailed parameter descriptions, see the Advanced data structure in CreateRule. For example, using the following configurations will cause: no new entry is written for 10 seconds; log file is removed; log file is renamed; LogCollector reads data to the end of file; the handle is released when log file monitoring exceeds 30 minutes. |