Promtail to create new label based on the selector

Hi,

I’m new to Loki and trying to deploy it on our non-prod cluster. I’m able to push the logs and visualize the logs in Grafana. I have a requirement where I need to get the part of the logs(containing a work) and make it available under a new label.
Unfortunately I’m not able to get the configuration working.

pipeline_stages:
- match:
   selector: '{app="web-app"} |= "analytics"'
   stages:
     - labels:
       app: web-app-analytics

Please advice.

Loki version: 2.3.0

Promtail version: 2.3.0

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.