Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1618634

Summary: [admin] Some metrics data are empty
Product: OpenShift Container Platform Reporter: Yadan Pei <yapei>
Component: MonitoringAssignee: Frederic Branczyk <fbranczy>
Status: CLOSED ERRATA QA Contact: Junqi Zhao <juzhao>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.11.0CC: aos-bugs, dma, jokerman, mmccomas, yapei
Target Milestone: ---   
Target Release: 3.11.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: 2018-10-11 07:25:20 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
EmptyData1
none
EmptyData2
none
nodes metrics
none
pod metrics none

Description Yadan Pei 2018-08-17 07:41:08 UTC
Description of problem:
Empty data shown for CPU,Memory and Disk Usage on Home, Node CPU, Network, RAM data are also empty

Version-Release number of selected component (if applicable):
registry.reg-aws.openshift.com:443/openshift3/ose-console                   v3.11               e5f3dbab56b30       288MB
openshift v3.11.0-0.16.0

How reproducible:
Always

Steps to Reproduce:
1.Enable Cluster Monitoring
# oc get pods -n openshift-monitoring
NAME                                           READY     STATUS    RESTARTS   AGE
alertmanager-main-0                            3/3       Running   0          52m
alertmanager-main-1                            3/3       Running   0          51m
alertmanager-main-2                            3/3       Running   0          51m
cluster-monitoring-operator-7f956789fc-xk6hf   1/1       Running   0          1h
grafana-6bd78bcd6d-x2lr2                       2/2       Running   0          1h
kube-state-metrics-58d4dd6b44-gt288            3/3       Running   0          51m
node-exporter-2rsml                            2/2       Running   0          51m
node-exporter-hwnpq                            2/2       Running   0          51m
node-exporter-zwk4h                            2/2       Running   0          51m
prometheus-k8s-0                               4/4       Running   1          1h
prometheus-k8s-1                               4/4       Running   1          52m
prometheus-operator-7fff695789-zv7bb           1/1       Running   0          1h
2.Login to admin console with cluster-admin
3.Browse to Home -> Status
4.Browse to Nodes Overview page

Actual results:
3. Some metrics charts such as API Servers Up, Alerts Firing, API Request Success Rate are shown with correct data, but CPU Usage, Memory Usage and Disk Usage are with empty value. It looks like the query expression used wrong variables which leads to "No datapoints found" thus empty value

Several Graph errors eg:
Graph error: No data from query (sum(node_filesystem_size{device!="rootfs"}) - sum(node_filesystem_free{device!="rootfs"})) / sum(node_filesystem_size{device!="rootfs"}) * 100

4.CPU, RAM, Network In, Network Out, FileSystem data are empty
base.jsx:12 Graph error: No data from query for RAM.
base.jsx:12 Graph error: No data from query for CPU.
base.jsx:12 Graph error: No data from query for Network In.
base.jsx:12 Graph error: No data from query for Network Out.
base.jsx:12 Graph error: No data from query for Filesystem.


Expected results:
3-4. Correct query expression should be used and data should be shown correctly

Additional info:

Comment 1 Yadan Pei 2018-08-17 07:44:53 UTC
Created attachment 1476569 [details]
EmptyData1

Comment 2 Yadan Pei 2018-08-17 07:45:26 UTC
Created attachment 1476570 [details]
EmptyData2

Comment 3 Samuel Padgett 2018-08-17 13:38:06 UTC
Transitioning to Monitoring because it looks like the console requests are correct, just that Prometheus isn't returning any data.

Comment 4 Frederic Branczyk 2018-08-17 13:42:25 UTC
Are you getting an actual error or just an empty result? A user needs appropriate RBAC permissions (view ClusterRole should be sufficient).

Comment 5 Junqi Zhao 2018-08-20 08:46:32 UTC
maybe related to Bug 1619132

Comment 6 Frederic Branczyk 2018-08-20 10:33:20 UTC
Yes I believe Junqi is correct, I believe this is the same problem as https://bugzilla.redhat.com/show_bug.cgi?id=1619132

Comment 7 Yadan Pei 2018-08-23 05:55:09 UTC
> Are you getting an actual error or just an empty result? A user needs appropriate RBAC permissions (view ClusterRole should be sufficient).

I'm getting empty data on console and error info base.jsx:12 Graph error: No data from query for RAM/CPU.... in browser dev console, I use cluster-admin to view metric

>Yes I believe Junqi is correct, I believe this is the same problem as

Thanks, I will wait for bug 1619132 to be resolved

Comment 8 Frederic Branczyk 2018-08-23 09:52:54 UTC
We just merged a number of pull requests that should fix most of these problems. We also noticed some incorrect behavior for filesystem graphs that is already in the works, I would suggest to create a new issue for that though.

Comment 9 Frederic Branczyk 2018-08-23 19:34:51 UTC
All relevant pull requests for this have now been merged. Please go ahead and test this.

Comment 10 Junqi Zhao 2018-08-27 02:26:17 UTC
Please change to ON_QA, issue is fixed,see the attached picture

cluster monitoring version: v3.11.0-0.22.0.0
# openshift version
openshift v3.11.0-0.22.0

Comment 11 Junqi Zhao 2018-08-27 02:27:28 UTC
Created attachment 1478846 [details]
nodes metrics

Comment 12 Junqi Zhao 2018-08-27 02:28:08 UTC
Created attachment 1478847 [details]
pod metrics

Comment 13 Junqi Zhao 2018-08-28 00:18:12 UTC
Per Comment 10 - Comment 12, set to VERIFIED

Comment 15 errata-xmlrpc 2018-10-11 07:25:20 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, 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/RHBA-2018:2652