Bug 1772796

Summary: "No datapoints found." is shown in metrics chart on route overview page
Product: OpenShift Container Platform Reporter: Yanping Zhang <yanpzhan>
Component: Management ConsoleAssignee: Samuel Padgett <spadgett>
Status: CLOSED ERRATA QA Contact: Yadan Pei <yapei>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.3.0CC: aos-bugs, ccoleman, jokerman
Target Milestone: ---   
Target Release: 4.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-23 11:12:49 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:

Description Yanping Zhang 2019-11-15 08:05:15 UTC
Description of problem:
Click "Networking -> Routes" and check route overview page on cluster with prometheus intalled, eg on router "thanos-querier" page, all charts show "No datapoints found.".

from browser debug console, find one API
https://console-openshift-console.apps.qe-groupd-1115.qe.devcluster.openshift.com/api/prometheus-tenancy/api/v1/query_range?start=1573797859.659&end=1573801459.659&step=60&namespace=openshift-monitoring&query=sum+without+%28instance%2Cexported_pod%2Cexported_service%2Cpod%2Cserver%29+%28irate%28haproxy_server_bytes_in_total%7Bexported_namespace%3D%22openshift-monitoring%22%2Croute%3D%22thanos-querier%22%7D%5B5m%5D%29%29

decoded url is:
https://console-openshift-console.apps.qe-groupd-1115.qe.devcluster.openshift.com/api/prometheus-tenancy/api/v1/query_range?start=1573797859.659&end=1573801459.659&step=60&namespace=openshift-monitoring&query=sum+without+(instance,exported_pod,exported_service,pod,server)+(irate(haproxy_server_bytes_in_total{exported_namespace="openshift-monitoring",route="thanos-querier"}[5m]))

Note:
sum+without+(instance,exported_pod,exported_service,pod,server)+(irate(haproxy_server_bytes_in_total{exported_namespace="openshift-monitoring",route="thanos-querier"}[5m])) is a invalid search

it may be:
sum without (instance,exported_pod,exported_service,pod,server) (irate(haproxy_server_bytes_in_total{exported_namespace="openshift-monitoring",route="thanos-querier"}[5m]))

after encode, should be
sum%20without%20%28instance%2Cexported_pod%2Cexported_service%2Cpod%2Cserver%29%20%28irate%28haproxy_server_bytes_in_total%7Bexported_namespace%3D%22openshift-monitoring%22%2Croute%3D%22thanos-querier%22%7D%5B5m%5D%29%29


Version-Release number of selected component (if applicable):
payload 4.3.0-0.nightly-2019-11-13-233341

How reproducible:
Always

Steps to Reproduce:
1.Set up cluster with prometheus enable.
2.Check overview page of router "thanos-querier"
3.

Actual results:
2.All charts show "No datapoints found.".

Expected results:
2.Should show correct data for each chart.

Additional info:

Comment 1 Samuel Padgett 2019-11-18 13:22:04 UTC
*** Bug 1773124 has been marked as a duplicate of this bug. ***

Comment 2 Samuel Padgett 2019-11-18 13:23:15 UTC
The URL looks to be encoded correctly. The route metrics queries aren't working through the tenancy proxy.

Comment 4 Samuel Padgett 2019-11-19 13:14:11 UTC
Unfortunately, normal users won't be able to see route metrics since `haproxy_server_bytes_in_total` has `namespace=openshift-ingress` for every returned series. Only users who can see metrics in all namespaces will be able to see route metrics. We've hidden the charts for normal users.

Comment 6 Yanping Zhang 2019-11-22 02:53:06 UTC
Payload: 4.3.0-0.nightly-2019-11-21-122827
Tested on OCP 4.3 env with above payload, checked metrics on a route(eg, console route) overview page, the metrics for "Traffic In","Traffic Out","Connection Rate" are shown correctly.
The bug has been fixed, so move it to Verified.

Comment 8 errata-xmlrpc 2020-01-23 11:12:49 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-2020:0062