Bug 2027238

Summary: "Node Exporter / USE Method / Cluster" CPU utilization graph shows incorrect legend
Product: OpenShift Container Platform Reporter: Arunprasad Rajkumar <arajkuma>
Component: MonitoringAssignee: Arunprasad Rajkumar <arajkuma>
Status: CLOSED ERRATA QA Contact: Junqi Zhao <juzhao>
Severity: low Docs Contact:
Priority: medium    
Version: 4.9CC: amuller, anpicker, aos-bugs, erooth
Target Milestone: ---   
Target Release: 4.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-10 16:30:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
OCP: Missing legend none

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):

4.9

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.

https://access.redhat.com/errata/RHSA-2022:0056