Promtail config for PostgreSQL logs

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:

- job_name: postgres
    - 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.

I don’t see anywhere you set the value for content so it’s likely empty. I think you can just remove this stage completely.

Thanks Elwech. It is defined in the regex expression.