Adding new label to logs stream of pods with promtail

Hi, i have like 2 or 3 clusters that i am collecting logs from centrally using grafana loki. I want to able to distinguish the logs from each of environment, each environment is its own k8s cluster. But i still see only the stock labels that are added and not the ones i am trying to add

Here’s how i tried to add the labels using external_labels:

promtail:
enabled: true
config:
logLevel: info
serverPort: 3100
clients:
- url: http://loki:3100/loki/api/v1/push
external_labels:
cluster: prod
scrape_configs:
- job_name: kubernetes
kubernetes_sd_configs:
- role: pod
label_config:
external_labels:
cluster: prod

Is this the correct approach or am i missing something?

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