Bug 1764313 - Console operator /metrics endpoint doesn't contain console_url metric [openshift-4.3]
Summary: Console operator /metrics endpoint doesn't contain console_url metric [opensh...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.3.0
Assignee: bpeterse
QA Contact: Yadan Pei
URL:
Whiteboard:
: 1766123 (view as bug list)
Depends On:
Blocks: 1764316 1768684 1780170 1780180
TreeView+ depends on / blocked
 
Reported: 2019-10-22 17:52 UTC by bpeterse
Modified: 2020-01-23 11:09 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1764316 1780170 1780180 (view as bug list)
Environment:
Last Closed: 2020-01-23 11:08:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console-operator pull 299 0 'None' closed Bug 1764313: 4.3 console_url is no longer reported on metrics endpoint (fix, with e2e test) 2020-07-17 10:05:41 UTC
Red Hat Product Errata RHBA-2020:0062 0 None None None 2020-01-23 11:09:20 UTC

Description bpeterse 2019-10-22 17:52:16 UTC
The /metrics endpoint should have an e2e test to validate that it responds with prometheus metrics.  The key metrics is console_url.  

The console operator is not currently reporting console_url on master (4.3).

Comment 1 Samuel Padgett 2019-10-28 11:55:26 UTC
*** Bug 1766123 has been marked as a duplicate of this bug. ***

Comment 2 bpeterse 2019-11-07 15:32:28 UTC
The problem here is several layers deep.  The wiring code in library-go is no longer usable. Instead, we need to use:

k8smetrics "k8s.io/component-base/metrics"
"k8s.io/component-base/metrics/legacyregistry"

The component-base in kube has shifted away form using a global metrics registry.  Fortunately, it is surfaced as a legacyregistry, so we can fix the wiring.  PR updated.

Comment 4 Yanping Zhang 2019-11-13 10:19:38 UTC
Payload 4.3.0-0.nightly-2019-11-13-004353
Checked on ocp 4.3 env with above version, now there is console_url in metrics, and filtering on prometheus ui with "console_url" will have output.

$ oc -n openshift-console-operator --config=xxianew.kubeconfig exec console-operator-686c665bf6-txmg7 -- curl -k -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6Ijk0STk1N0ZqOXZxc0NnVmp6em9UWUFEZm5vbWpwMW50SlNYQl9CVENNMzQifQ.eyJpc3MiOiJrdWJlcm5ldGVzL3NlcnZpY2VhY2NvdW50Iiwia3ViZXJuZXRlcy5pby9zZXJ2aWNlYWNjb3VudC9uYW1lc3BhY2UiOiJvcGVuc2hpZnQtbW9uaXRvcmluZyIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VjcmV0Lm5hbWUiOiJwcm9tZXRoZXVzLWs4cy10b2tlbi14bTVqciIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50Lm5hbWUiOiJwcm9tZXRoZXVzLWs4cyIsImt1YmVybmV0ZXMuaW8vc2VydmljZWFjY291bnQvc2VydmljZS1hY2NvdW50LnVpZCI6IjZhMmYwYzIxLTQ0NDAtNDJhYS1hOTA2LTEzZDRjMDQyZjIyNyIsInN1YiI6InN5c3RlbTpzZXJ2aWNlYWNjb3VudDpvcGVuc2hpZnQtbW9uaXRvcmluZzpwcm9tZXRoZXVzLWs4cyJ9.uKiGvLsJ37ZSuODDgbJXVIaE_CMrvvcjHF8TiGD0uAplHpy0AR1xGIyypiyTAz-MezCJyHp7bkZKfPaIjHDZXSj69bXca9YJdHPOpz2H_yHyvghavOVlu0HVG_9u0AAVqukJCXpTUbuinhIHXlgqj1aWvXWNz5jcrF8ZNlWHrFI1p-6zlZU-3OOTShIQdQ2sgDnWb_zmCrw-va6nqUmUG-yQTv_SCEfK-GggIKlyfc8OS0eoITui-kwDMHMhz5l2ZfIsG29SQQKldXSFzj5E9mhatao_I0O_HGl0dJrYeQ1LaV5bt5SuL6zuEluN0q3ONxJzgmVp7fJ-NfeaVQIxew" https://10.128.0.27:8443/metrics | grep console_url
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 12516    0 12516    0     0  92027      0 --:--:-- --:--:-- --:--:-- 92711
# HELP console_url [ALPHA] URL of the console exposed on the cluster
# TYPE console_url gauge
console_url{url=""} 0
console_url{url="https://console-openshift-console.apps.xxia-1113-43.qe.devcluster.openshift.com"} 1

The bug has been fixed.

Comment 6 errata-xmlrpc 2020-01-23 11:08:59 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


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