Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-10956

Console metrics could have a high cardinality (4.14)

    XMLWordPrintable

Details

    • None
    • No
    • ODC Sprint 234
    • 1
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • NA
    • Bug Fix

    Description

      Description of problem:
      With 4.13 we added new metrics to the console (Epic ODC-7171 - Improved telemetry (provide new metrics), that collect different user and cluster metrics.

      The cluster metrics include:

      1. which perspectives are customized (enabled, disabled, only available for a subset of users)
      2. which plugins are installed and enabled

      These metrics contain the perspective name or plugin name which was unbounded. Admins could configure any perspective and plugin name, also if the perspective or plugin with that name is not available.

      Based on the feedback in https://github.com/openshift/cluster-monitoring-operator/pull/1910 we need to reduce the cardinality and limit the metrics to, for example:

      1. perspectives: admin, dev, acm, other
      2. plugins: redhat, demo, other

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

      How reproducible:
      Always

      Steps to Reproduce:
      On a cluster, you must update the console configuration, configure some perspectives or plugins and check the metrics in Admin > Observe > Metrics:

      avg by (name, state) (console_plugins_info)
      
      avg by (name, state) (console_customization_perspectives_info)
      

      On a local machine, you can use this console yaml:

      apiVersion: console.openshift.io/v1
      kind: ConsoleConfig
      plugins: 
        logging-view-plugin: https://logging-view-plugin.logging-view-plugin-namespace.svc.cluster.local:9443/
        crane-ui-plugin: https://crane-ui-plugin.crane-ui-plugin-namespace.svc.cluster.local:9443/
        acm: https://acm.acm-namespace.svc.cluster.local:9443/
        mce: https://mce.mce-namespace.svc.cluster.local:9443/
        my-plugin: https://my-plugin.my-plugin-namespace.svc.cluster.local:9443/
      customization: 
        perspectives: 
        - id: admin
          visibility: 
            state: Enabled
        - id: dev
          visibility: 
            state: AccessReview
            accessReview: 
              missing: 
                - resource: namespaces
                  verb: get
        - id: dev1
          visibility: 
            state: AccessReview
            accessReview: 
              missing: 
                - resource: namespaces
                  verb: get
        - id: dev2
          visibility: 
            state: AccessReview
            accessReview: 
              missing: 
                - resource: namespaces
                  verb: get
        - id: dev3
          visibility: 
            state: AccessReview
            accessReview: 
              missing: 
                - resource: namespaces
                  verb: get
      

      And start the bridge with:

      ./build-backend.sh
      ./bin/bridge -config ../config.yaml
      

      After that you can fetch the metrics in a second terminal:

      Actual results:

      curl -s localhost:9000/metrics | grep ^console_plugins
      
      console_plugins_info{name="acm",state="enabled"} 1
      console_plugins_info{name="crane-ui-plugin",state="enabled"} 1
      console_plugins_info{name="logging-view-plugin",state="enabled"} 1
      console_plugins_info{name="mce",state="enabled"} 1
      console_plugins_info{name="my-plugin",state="enabled"} 1
      
      curl -s localhost:9000/metrics | grep ^console_customization
      
      console_customization_perspectives_info{name="dev",state="only-for-developers"} 1
      console_customization_perspectives_info{name="dev1",state="only-for-developers"} 1
      console_customization_perspectives_info{name="dev2",state="only-for-developers"} 1
      console_customization_perspectives_info{name="dev3",state="only-for-developers"} 1
      

      Expected results:
      Less cardinality, that means, results should be grouped somehow.

      Additional info:

      Attachments

        Issue Links

          Activity

            People

              cjerolim Christoph Jerolimov
              cjerolim Christoph Jerolimov
              Sanket Pathak Sanket Pathak
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: