Bug 2027238 - "Node Exporter / USE Method / Cluster" CPU utilization graph shows incorrect legend
Summary: "Node Exporter / USE Method / Cluster" CPU utilization graph shows incorrect ...
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Monitoring
Version: 4.9
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.10.0
Assignee: Arunprasad Rajkumar
QA Contact: Junqi Zhao
Depends On:
TreeView+ depends on / blocked
Reported: 2021-11-29 07:50 UTC by Arunprasad Rajkumar
Modified: 2022-03-10 16:30 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2022-03-10 16:30:41 UTC
Target Upstream Version:

Attachments (Terms of Use)
OCP: Missing legend (186.75 KB, image/png)
2021-11-29 07:50 UTC, Arunprasad Rajkumar
no flags Details

System ID Private Priority Status Summary Last Updated
Github openshift console pull 10565 0 None open Bug 2027238: (dashboard) Allow leading and trailing spaces in legendFormat 2021-11-29 08:13:32 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:30:57 UTC

Description Arunprasad Rajkumar 2021-11-29 07:50:54 UTC
Created attachment 1843961 [details]
OCP: Missing legend

Description of problem:

As the $title says, the graph shows incorrect text "{{ instance }}" as legend instead of actual instance names.

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


How reproducible:

Steps to Reproduce:
1. Launch admin console
2. Go to Observe > Dashboards > "Node Exporter / USE Method / Cluster"
3. Look at the CPU panel and hover over to "CPU Utilization" graph

Actual results:
Shows "{{ instance }}" text as a legend for all graphs

Expected results:
It should rather show the actual cluster instance names

Additional info:
* Grafana UI shows correct legend
* Node mixin dashboard definition for "CPU Utilization" contains leading and trailing space[1] in the legendFormat, other definitions doesn't have the space
* Console RegEx for `legendFormat` doesn't honour leading and trailing spaces[2]
* Grafana implementation honours leading and trailing spaces[3]

[1] https://github.com/prometheus/node_exporter/blob/9bc184d236a79437f6195b03bd17af061c134881/docs/node-mixin/dashboards/use.libsonnet#L234
[2] https://github.com/openshift/console/blob/d9b8e748965df518a5e1bb8aa0328330c8cb9066/frontend/public/components/monitoring/dashboards/index.tsx#L452
[3] https://github.com/grafana/grafana/blob/f454a5ce60e85e7391b69245166c9b3a32c5c574/pkg/tsdb/prometheus/prometheus.go#L25

Comment 4 Junqi Zhao 2021-12-20 09:23:57 UTC
tested with 4.10.0-0.nightly-2021-12-18-034942, could see the correct legend in "CPU Utilization" graph of dashboard "Node Exporter / USE Method / Cluster"

Comment 9 errata-xmlrpc 2022-03-10 16:30:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.10.3 security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.