Log External Stream
Overview
You can use Timeplus as a lightweight and high-performance tool for application log analysis. Please check the blog for more details.
Create External Log Stream
Create an external stream with the log type to monitor log files, e.g.
CREATE EXTERNAL STREAM proton_log(
raw string
)
SETTINGS
type='log',
log_files='proton-server.log',
log_dir='/var/log/proton-server',
timestamp_regex='^(\d{4}\.\d{2}\.\d{2} \d{2}:\d{2}:\d{2}\.\d+)',
row_delimiter='(\d{4}\.\d{2}\.\d{2} \d{2}:\d{2}:\d{2}\.\d+) \[ \d+ \] \{'
The required settings:
- log_files
- log_dir
- timestamp_regex
- row_delimiter. Only 1 capturing group is expected in the regex.