Menu
Open source
labelallow
The labelallow stage is an action stage that allows only the provided labels to be included in the label set that is sent to Loki with the log entry.
Schema
yaml
labelallow:
- [<string>]
...
Examples
For the given pipeline:
yaml
kubernetes_sd_configs:
- role: pod
pipeline_stages:
- docker: {}
- labelallow:
- kubernetes_pod_name
- kubernetes_container_name
Given the following incoming labels:
kubernetes_pod_name
:"loki-pqrs"
kubernetes_container_name
:"loki"
kubernetes_pod_template_hash
:"79f5db67b"
kubernetes_controller_revision_hash
:"774858987d"
Only the below labels would be sent to loki
kubernetes_pod_name
:"loki-pqrs"
kubernetes_container_name
:"loki"
Was this page helpful?
Related resources from Grafana Labs
Additional helpful documentation, links, and articles:

Getting started with logging and Grafana Loki
See a demo of the updated features in Loki, and how to create metrics from logs and alert on your logs with powerful Prometheus-style alerting rules.

Essential Grafana Loki configuration settings
This webinar focuses on Grafana Loki configuration including agents Promtail and Docker; the Loki server; and Loki storage for popular backends.

Scaling and securing your logs with Grafana Loki
This webinar covers the challenges of scaling and securing logs, and how Grafana Enterprise Logs powered by Grafana Loki can help, cost-effectively.