<p>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</p>
<p>Here's how i tried to add the labels using external_labels:</p>
<pre><code>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

</code></pre>
<p>Is this the correct approach or am i missing something?</p>

sal
<p>The following configuration worked for me:</p>
<pre><code>promtail:
  enabled: true
  config:
    logLevel: info
    serverPort: 3100
    clients:
      - url: http://loki:3100/loki/api/v1/push
        external_labels:
          cluster: &quot;prod&quot;
scrape_configs:
- job_name: kubernetes
  kubernetes_sd_configs:
  - role: pod
</code></pre>
