grafana / loki

Like Prometheus, but for logs.
https://grafana.com/loki
GNU Affero General Public License v3.0
23.66k stars 3.42k forks source link

promtail daemonset relabel_configs does not work #13488

Open kyle-oceanbase opened 3 months ago

kyle-oceanbase commented 3 months ago

I deployed promtail daemonset in my k8s to collect my application logs. I want to add some K8S node or pod labels, but when i query logs in grafana, i did not see any k8s labels and only labels in static_configs can be found. Here is my configmap for promtail, can you help me?

apiVersion: v1 kind: ConfigMap metadata: name: promtail namespace: prod labels: app: promtail data: promtail.yaml: | client: backoff_config: max_period: 5m max_retries: 10 min_period: 500ms batchsize: 1048576 batchwait: 1s external_labels: {} timeout: 10s positions: filename: /run/promtail/positions.yaml server: http_listen_port: 3101 target_config: sync_period: 10s scrape_configs:

JStickler commented 3 months ago

Questions have a better chance of being answered if you ask them on the community forums.