I have the following match stage in my Promtail configuration:
- match:
selector: '{loglevel="ERROR"} !~ <bunch of regex> | type != "usage" and type != "repair"'
stages:
- template:
source: errorCorrected
template: 'corrected'
- labels:
errorCorrected:
- metrics:
errors_corr:
type: counter
description: "Corrected total number of error messages"
prefix: app_log_
max_idle_duration: 24h
source: loglevel
config:
match_all: true
action: inc
With Promtail 2.3.0, I get the following error when loading this config:
invalid match stage config: invalid selector syntax for match stage: parse error at line 1, col 164: syntax error: unexpected IDENTIFIER, expecting != or !~ or |~ or |=
Column 164 corresponds to the |
character in the above selector
LogQL query.
This config worked without issues on Promtail 2.2.0. Are label filters no longer allowed in the selector
for the match
pipeline stage?
Thanks.