Uploaded image for project: 'OpenShift Logging'
  1. OpenShift Logging
  2. LOG-4170

Query Label Values from Loki return duplicate values.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Major Major
    • Logging 5.8.0
    • Logging 5.6.6, Logging 5.7.1
    • Log Storage
    • False
    • None
    • False
    • NEW
    • VERIFIED
    • Hide
      Before this update, Loki filtered label values for active streams without removing duplicates caused the labels values API to return duplicate values (e.g. this broke the UX of Grafana's Label Browser). With this update, Loki filters duplicate label values for active streams resolves the issue and Grafana Label browser users can select Label values successfully.
      Show
      Before this update, Loki filtered label values for active streams without removing duplicates caused the labels values API to return duplicate values (e.g. this broke the UX of Grafana's Label Browser). With this update, Loki filters duplicate label values for active streams resolves the issue and Grafana Label browser users can select Label values successfully.
    • Bug Fix
    • Medium
    • Log Storage - Sprint 237, Log Storage - Sprint 239, Log Storage - Sprint 240
    • Moderate

      Description of problem:

      Facing issue in getting a unique list of label values from Loki labels endpoint. Query Label Values from Loki return duplicate values.
      The problem is only faced by query via the Loki Gateway (official way), whereas query via internal Loki Query Frontend is working fine.

      Get kubernetes_namespace_name  label values via loki gateway.

       

      $ export LOKI_ADDR=https://logging-loki-openshift-logging.apps.a3.cp.cna.at/api/logs/v1/application
      $ export LOKI_BEARER_TOKEN=$(oc whoami -t)$ logcli labels kubernetes_namespace_name | sort
      2023/05/25 08:46:28 https://logging-loki-openshift-logging.apps.a3.cp.cna.at/api/logs/v1/application/loki/api/v1/label/kubernetes_namespace_name/values?end=1684997188562309848&start=1684993588562309848ams-accessible-prod
      ams-abc1-prod
      ams-abc1-prod
      ams-abc2-hot
      ams-abc2-hot
      ams-abc2-hot
      ams-abc2-hot
      ams-abc3-prod
      ams-abc3-prod
      ams-abc3-prod
      ams-abc3-prod
      ams-abc3-prod 

       

      Direct Query  via query-frontend internal service works fine.

       

      $ env | grep LOKI_ADDR
      LOKI_ADDR=https://logging-loki-query-frontend-http.openshift-logging.svc.cluster.local:3100
      $ logcli labels kubernetes_namespace_name | sort | more
      2023/05/25 06:50:03 https://logging-loki-query-frontend-http.openshift-logging.svc.cluster.local:3100/loki/api/v1/label/kubernetes_namespace_name/values?end=1684997403783482739&start=1684993803783482739
      ams-abc1-prod
      ams-abc2-hot
      ams-abc3-prod
      ams-abc4-qs
      ams-abc5-schul
      ams-abc6-qs 

       

       

      Version-Release number of selected component (if applicable):

      loki operator version 5.7.1 and 5.6.6

              ptsiraki@redhat.com Periklis Tsirakidis
              rhn-support-amanverm Aman Dev Verma
              Kabir Bharti Kabir Bharti
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: