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

[Vector][Loki] vector_component_sent_bytes_total metric for Loki sink not exposed by vector.

XMLWordPrintable

    • False
    • None
    • False
    • NEW
    • VERIFIED
    • Bug Fix
    • Log Collection - Sprint 238, Log Collection - Sprint 239

      Description of problem:

      The metric vector_component_sent_bytes_total is not exposed by Vector. According to the Vector doc this metric should be available. https://vector.dev/docs/reference/configuration/sinks/loki/#component_sent_bytes_total

      $ oc exec collector-mxlxc – curl -k -H "Authorization: Bearer `oc create token prometheus-k8s -n openshift-monitoring`" -H "Content-type: application/json" https://collector:24231/metrics | grep -i vector_component_sent_bytes_total
      Defaulted container "collector" out of: collector, logfilesmetricexporter
        % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed
      100 74826  100 74826    0     0  4298k      0 -::- -::- -::- 4298k
      
      HELP vector_component_sent_bytes_total component_sent_bytes_total TYPE vector_component_sent_bytes_total counter
      vector_component_sent_bytes_total{component_id="prometheus_output",component_kind="sink",component_name="prometheus_output",component_type="prometheus_exporter",hostname="ip-10-0-139-1.us-east-2.compute.internal",protocol="http"} 1267553 1682504147467 

      The metric is available for Elasticsearch.

      $ oc exec collector-nrwjv -- curl -k -H "Authorization: Bearer `oc create token prometheus-k8s -n openshift-monitoring`" -H "Content-type: application/json" https://collector:24231/metrics | grep -i sent_bytes
      Defaulted container "collector" out of: collector, logfilesmetricexporter
        % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed
        0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0# HELP vector_buffer_sent_bytes_total buffer_sent_bytes_total
      # TYPE vector_buffer_sent_bytes_total counter
      vector_buffer_sent_bytes_total{buffer_type="memory",component_id="default",component_kind="sink",component_name="default",component_type="elasticsearch",hostname="ip-10-0-215-1.us-east-2.compute.internal",stage="0"} 7867991 1682503640853
      vector_buffer_sent_bytes_total{buffer_type="memory",component_id="prometheus_output",component_kind="sink",component_name="prometheus_output",component_type="prometheus_exporter",hostname="ip-10-0-215-1.us-east-2.compute.internal",stage="0"} 215356512 1682503640853
      # HELP vector_component_sent_bytes_total component_sent_bytes_total
      # TYPE vector_component_sent_bytes_total counter
      vector_component_sent_bytes_total{component_id="prometheus_output",component_kind="sink",component_name="prometheus_output",component_type="prometheus_exporter",hostname="ip-10-0-215-1.us-east-2.compute.internal",protocol="http"} 17388534 1682503640853
      vector_component_sent_bytes_total{component_id="default",component_kind="sink",component_name="default",component_type="elasticsearch",endpoint="https://elasticsearch:9200/_bulk",hostname="ip-10-0-215-1.us-east-2.compute.internal",protocol="https"} 3513850 1682503640853
      100  148k  100  148k    0     0  5715k      0 --:--:-- --:--:-- --:--:-- 5715k
      1. Version-Release number of selected component (if applicable):

      The metric is used in the OpenShit Logging Collection dashboard and without the metric, no data is displayed for Rate Log Bytes Sent Per Output. 

      Version of Components:

      cluster-logging.v5.7.0

      loki-operator.v5.7.0

      How reproducible:

      Always

      Steps to Reproduce:

      *Deploy LokiStack instance.

      *Create a ClusterLogging instance with LokiStack as the default log store and Vector as collector.

      *Check the OpenShift Logging Collection dashboard on the Web Cnsole. There is no data displayed for Rate Log Bytes Sent Per Output. 

      Check the metric from the collector.

      $ oc exec collector-mxlxc -- curl -k -H "Authorization: Bearer `oc create token prometheus-k8s -n openshift-monitoring`" -H "Content-type: application/json" https://collector:24231/metrics | grep -i vector_component_sent_bytes_total
      Defaulted container "collector" out of: collector, logfilesmetricexporter
        % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed
      100 74826  100 74826    0     0  4298k      0 --:--:-- --:--:-- --:--:-- 4298k
      # HELP vector_component_sent_bytes_total component_sent_bytes_total
      # TYPE vector_component_sent_bytes_total counter
      vector_component_sent_bytes_total{component_id="prometheus_output",component_kind="sink",component_name="prometheus_output",component_type="prometheus_exporter",hostname="ip-10-0-139-1.us-east-2.compute.internal",protocol="http"} 1267553 1682504147467
       

            vparfono Vitalii Parfonov
            rhn-support-ikanse Ishwar Kanse
            Ishwar Kanse Ishwar Kanse
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: