Uploaded image for project: 'OpenShift Console'
  1. OpenShift Console
  2. CONSOLE-3590

Resources and Pod count gets doubled in OpenShift WebConsole when __replica__ is set to $(POD_NAME) and added as external label in cluster-monitoring-config cm.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • openshift-4.10.z, openshift-4.11.z, openshift-4.12.z
    • Monitoring
    • None
    • False
    • None
    • False
    • Important

      Issue: Resources and Pod count gets doubled in OpenShift WebConsole when _replica_ is set to $(POD_NAME) and added as external label in cluster-monitoring-config cm.

      Steps to reproduce:

      1) OpenShift WebConsole > Compute > Nodes (Take screenshot)

      2) Create cluster-monitoring-config cm in openshift-monitoring 

      apiVersion: v1
      kind: ConfigMap
      metadata:
        name: cluster-monitoring-config
        namespace: openshift-monitoring
      data:
        config.yaml: |
          prometheusK8s:
            externalLabels:
               __replica__: $(POD_NAME) 

      https://docs.openshift.com/container-platform/4.10/monitoring/configuring-the-monitoring-stack.html#attaching-additional-labels-to-your-time-series-and-alerts_configuring-the-monitoring-stack

       3) OpenShift WebConsole > Compute > Nodes ---> check pod count and resources --> 2x values are found

      4) With API 2x values are not seen

      oc -n openshift-monitoring exec -c prometheus prometheus-k8s-0 -- curl -s --data-urlencode "query=sum by (instance) (node_memory_MemTotal_bytes)" 'http://localhost:9090/api/v1/query?'  

      More info:

      Git link : https://github.com/openshift/console/blob/4c6249f47bc61c8b8e5dfc52a555dc108a9ed079/frontend/packages/console-app/src/components/nodes/NodesPage.tsx#L416-L447

        1. After_replica_.png
          After_replica_.png
          158 kB
        2. API.png
          API.png
          53 kB
        3. before_replica_.png
          before_replica_.png
          172 kB
        4. Screenshot from 2024-01-29 13-39-11.png
          Screenshot from 2024-01-29 13-39-11.png
          96 kB

            Unassigned Unassigned
            rhn-support-anisal Apurva Nisal
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: