Drop function is not working in promtail configuration

  enabled: true
  # Enable Promtail service monitoring
  # serviceMonitor:
  #   enabled: true
  # User defined pipeline stages
    - docker: {}
    - drop:
        source: namespace
        expression: "kube-.*"

Updating it still kube-system logs are showing in loki & if I replace it with any other NS then also loki is showing it
Bascially when we apply this configuration its not getting updated inside promtail container using loki-stack helm chart

You need to match first before drop. For example:

- match: # Drop logs that aren't loki related.
    selector: '{namespace=~"kube-.*"}'
    action: drop
    drop_counter_reason: kube_namespaces

Also make sure the label namespace is available.

the thing you are suggesting works as helm values in loki-stack helm chart right mate?

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