Gauri Joshi
Gauri Joshi

Reputation: 53

Drop logs from promtail

I have prometheus + loki + grafana + promtail setup. I need to drop the logs which have the words healthcheck or health-check.

My values.yaml file: https://github.com/grafana/helm-charts/blob/main/charts/promtail/values.yaml

Please help me how can I do it.

Upvotes: 3

Views: 4611

Answers (1)

Hariom Saini
Hariom Saini

Reputation: 56

You can do this at the filtering stage in the pipeline

pipelineStages:
# - cri: {}
- drop:
    expression: "(.*/health-check.*)|(.*/health.*)"

docs

Upvotes: 4

Related Questions