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

[release-5.6] Missing Loki Volume API in LokiStack

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Normal Normal
    • Logging 5.6.21
    • Logging 5.6.20
    • Log Storage
    • None
    • False
    • None
    • False
    • NEW
    • NEW
    • Before this update, LokiStack was missing a route for the Volume API caused a page not found error. With this update, Lokistack exposes the Volume API resolves the issue.
    • Bug Fix
    • Log Storage - Sprint 256
    • Low

      Description of problem:

      Loki exposes a Volume API to request the log volume for a set of stream selectors. This is a simple way to tell how much data is saved raw on Loki without writing expensive bytes_over_time metric queries.

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

      5.6.z

      How reproducible:

      Always

      Steps to Reproduce:

      export LOKI_PUBLIC_URL=$(k -n openshift-logging get route lokistack-dev -o jsonpath="{.spec.host}")
      
      curl -k -G -H "X-Scope-OrgID: infrastructure" -H "Authorization: Bearer $(oc whoami -t)" "https://${LOKI_PUBLIC_URL}/api/logs/v1/infrastructure/loki/api/v1/index/volume_range" --data-urlencode 'query={log_type="infrastructure"}' --data-urlencode "start=$(date --date '15 minutes ago' +%s%N)" --data-urlencode "end=$(date +%s%N)" --data-urlencode 'targetLabels=kubernetes_namespace_name' --data-urlencode 'limit=10' | jq
      
      

      Actual results:

      404 Not Found 

      Expected results:

      Return the volume saved in the Loki index for the given set of labels.

      Additional info:

      https://grafana.com/docs/loki/latest/reference/loki-http-api/#query-log-volume

              ptsiraki@redhat.com Periklis Tsirakidis
              ptsiraki@redhat.com Periklis Tsirakidis
              Anping Li Anping Li
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: