Hello,
I am trying to configure promtail for a PostgreSQL where timestamps are in CET timezone. I also wish to take into account multiline feature to reassemble such lines.
This is the config:
scrape_configs:
- job_name: postgres
pipeline_stages:
- multiline:
firstline: '^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3} CET'
- regex:
expression: '^(?P<time>\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\.\d{3} CET) (?P<content>.*)$'
- timestamp:
source: time
format: 2006-01-02 03:04:05.000 CET
- output:
source: content
This a sample log file:
And this is the debug output from promtail, parsing the above log:
Nothing is inserted in the loki database.
Thanks for your help.