# Only Loki Pod logs are visible in Grafana dashboard

**URL:** <https://community.grafana.com/t/only-loki-pod-logs-are-visible-in-grafana-dashboard/100110>\
**Category:** Grafana Loki\
**Tags:** promtail, query-help, config-help\
**Created:** [July 31, 2023, 5:46am UTC](https://community.grafana.com/t/only-loki-pod-logs-are-visible-in-grafana-dashboard/100110 "2023-07-31T05:46:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aneriddesai](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@aneriddesai](https://community.grafana.com/u/aneriddesai)\
**Post date:** [July 31, 2023, 5:46am UTC](https://community.grafana.com/t/only-loki-pod-logs-are-visible-in-grafana-dashboard/100110/1 "2023-07-31T05:46:45Z")

</div>

I’ve installed grafana-loki and promtail to nable application log forwarding in my cluster. The following is my loki config file:

```auto
auth_enabled: false
common:
  compactor_address: 'loki-backend'
  path_prefix: /var/loki
  replication_factor: 3
  storage:
    s3:
      access_key_id: enterprise-logs
      bucketnames: chunks
      endpoint: logging-minio.shared-system.svc:9000
      insecure: true
      s3forcepathstyle: true
      secret_access_key: supersecret
frontend:
  scheduler_address: query-scheduler-discovery.shared-system.svc.cluster.local.:9095
frontend_worker:
  scheduler_address: query-scheduler-discovery.shared-system.svc.cluster.local.:9095
index_gateway:
  mode: ring
limits_config:
  enforce_metric_name: false
  max_cache_freshness_per_query: 10m
  reject_old_samples: true
  reject_old_samples_max_age: 168h
  split_queries_by_interval: 15m
memberlist:
  join_members:
  - loki-memberlist
query_range:
  align_queries_with_step: true
ruler:
  storage:
    s3:
      bucketnames: ruler
    type: s3
runtime_config:
  file: /etc/loki/runtime-config/runtime-config.yaml
schema_config:
  configs:
  - from: "2022-01-11"
    index:
      period: 24h
      prefix: loki_index_
    object_store: s3
    schema: v12
    store: boltdb-shipper
server:
  grpc_listen_port: 9095
  http_listen_port: 3100
storage_config:
  hedging:
    at: 250ms
    max_per_second: 20
    up_to: 3
table_manager:
  retention_deletes_enabled: false
  retention_period: 0

```

The following is my promtail config file:

```auto
# promtail-config.yaml
server:
  # http_listen_address: 127.0.0.1
  http_listen_port: 9080
  grpc_listen_port: 0
scrape_configs:
  - job_name: kubernetes-pods
    kubernetes_sd_configs:
      - namespaces: {}
      - role: pod
    pipeline_stages:
      - docker: {}
    relabel_configs:
      - source_labels: ['__meta_kubernetes_pod_label_app']
        target_label: 'app'
      - source_labels: ['__meta_kubernetes_pod_label_namespace']
        target_label: 'namespace'
      - source_labels: ['__meta_kubernetes_pod_container_name']
        target_label: 'container_name'
  - job_name: system
    static_configs:
    - targets:
        - localhost
      labels:
        job: varlogs
        __path__ : /var/log/*log
  # Add more scrape_configs as needed for different log sources
clients:
  - url: http://loki-gateway.shared-system.svc.cluster.local:80/loki/api/v1/push

```

But as u can see below i can only see the loki pod logs and only the namespace where i’ve deployed all of this.

 ![Screenshot 2023-07-31 111503](https://us1.discourse-cdn.com/grafana/original/3X/e/6/e6779e32319ed9923d555f3e83478ff871ab7b9f.png)  
 ![Screenshot 2023-07-31 111530](https://us1.discourse-cdn.com/grafana/original/3X/e/8/e837b834c95932534743a3c3a2e6981496d47944.png)

---

<div class="post-metadata">

**Author:** ![b0b](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/b0b/32/8761_2.png) [@b0b](https://community.grafana.com/u/b0b)\
**Post date:** [July 31, 2023, 4:43pm UTC](https://community.grafana.com/t/only-loki-pod-logs-are-visible-in-grafana-dashboard/100110/2 "2023-07-31T16:43:28Z")

</div>

Hi. Not 100% sure but I think the `job_name: system` logs would not have a `namespace` or `pod` label. What if you search for `{job="varlogs"}`?

---

<div class="post-metadata">

**Author:** ![aneriddesai](https://avatars.discourse-cdn.com/v4/letter/a/ea666f/32.png) [@aneriddesai](https://community.grafana.com/u/aneriddesai)\
**Post date:** [August 1, 2023, 5:15am UTC](https://community.grafana.com/t/only-loki-pod-logs-are-visible-in-grafana-dashboard/100110/3 "2023-08-01T05:15:01Z")

</div>

no i meant for the namespaces and other pods are not showing up for the job kubernetes-pod

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/grafana/original/2X/e/ef5308cc58c9e5a13187b5012eb99f406928462f.png) [@system](https://community.grafana.com/u/system)\
**Post date:** [July 31, 2024, 5:15am UTC](https://community.grafana.com/t/only-loki-pod-logs-are-visible-in-grafana-dashboard/100110/4 "2024-07-31T05:15:43Z")

</div>

Closed on July 31, 2024, 5:15am UTC

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