Im trying to extract subject as label from mailbox file.
Whatever the order between regex and multiline, i never succeed to extract the subject or at least to send it to loki from promtail
I checked regex on regexp101 with go regexp and it’s working fine.
My block is the following :
- job_name: crontab pipeline_stages: - regex: expression: "^Subject: (?P<subject>.+) - multiline: firstline: "From foobar@" maxline: 200 static_configs: labels: subject: subject
I dont know what im doing wrong, but subject is never appearing in graphana, instead i have “subject subject”
Can you help ?