Bug 1577127 - Cannot get prometheus metrics of ASB
Summary: Cannot get prometheus metrics of ASB
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Service Broker
Version: 3.10.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: 3.10.0
Assignee: Shawn Hurley
QA Contact: Zhang Cheng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-11 09:07 UTC by Zhang Cheng
Modified: 2018-07-30 19:15 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2018-07-30 19:15:23 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1816 None None None 2018-07-30 19:15:53 UTC

Description Zhang Cheng 2018-05-11 09:07:57 UTC
Description of problem: 
Cannot get prometheus metrics of ASB


service-catalog & asb image using images from brew registry:
service-catalog: v3.10.0-0.38.0;Upstream:v0.1.16
asb: 1.2.10


How reproducible:
Always


Steps to Reproduce:
1. Deploy service catalog & ansible service broker by openshift ansible.
2. Check prometheus metrics of ASB by:
# oc login by chezhang user
# oc adm policy add-cluster-role-to-user cluster-debugger chezhang
# host=`oc get route -n openshift-ansible-service-broker | grep -v NAME | awk '{print $2}'`
#  curl -k -H "Authorization: bearer `oc whoami -t`" https://${host}/metrics | grep -i ^asb
3. Provision a serviceinstance from web console, check Check prometheus metrics of ASB again:
#  curl -k -H "Authorization: bearer `oc whoami -t`" https://${host}/metrics | grep -i ^asb


Actual results:  
2. None asb_specs_loaded{registry_name="dh"}, at this time.
$ curl -k -H "Authorization: bearer `oc whoami -t`" https://asb-1338-openshift-ansible-service-broker.apps.0510-d9c.qe.rhcloud.com/metrics | grep -i ^asb
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 11766  100 11766    0     0  12385      0 --:--:-- --:--:-- --:--:-- 12385
asb_deprovision_jobs 0
asb_provision_jobs 0
asb_sandbox 0
asb_specs_loaded{registry_name="apb-push"} 0
asb_specs_reset 1
asb_update_jobs 0

3. None asb_actions_requested{action="provision"}, asb_provision_jobs and asb_sandbox at this time:
$ curl -k -H "Authorization: bearer `oc whoami -t`" https://asb-1338-openshift-ansible-service-broker.apps.0510-d9c.qe.rhcloud.com/metrics | grep -i ^asb
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 11766  100 11766    0     0  12385      0 --:--:-- --:--:-- --:--:-- 12385
asb_deprovision_jobs 0
asb_provision_jobs 0
asb_sandbox 0
asb_specs_loaded{registry_name="apb-push"} 0
asb_specs_reset 1
asb_update_jobs 0


Expected results: 
2. Should get loaded specs count, such as:
 asb_specs_loaded{registry_name="dh"} 4

3. Should get provision request, provision jobs and sandbox count, such as below:
[While provisioning]:
asb_actions_requested{action="provision"} 1
asb_provision_jobs 1
asb_sandbox 1

[After provisioned]:
asb_actions_requested{action="provision"} 1


Addition info: 
None

Comment 1 Shawn Hurley 2018-05-15 13:37:08 UTC
PR: https://github.com/openshift/ansible-service-broker/pull/948

Please note that the asb_sandbox metrics will not be added back for this release. due to the bundle-lib refactor.

Comment 3 David Zager 2018-05-24 17:31:33 UTC
https://errata.devel.redhat.com/advisory/33505 moved to QE

openshift-enterprise-asb-container-v3.10.0-0.51.0.1
openshift-enterprise-mediawiki-apb-v3.10.0-0.51.0.1
openshift-enterprise-postgresql-apb-v3.10.0-0.51.0.1
openshift-enterprise-mysql-apb-v3.10.0-0.51.0.1
openshift-enterprise-mariadb-apb-v3.10.0-0.51.0.1
openshift-enterprise-apb-tools-v3.10.0-0.32.0.2

Comment 4 Zhang Cheng 2018-05-28 07:35:27 UTC
Verified in here. 
Opened another bug to trace asb_sandbox metrics issue.

# service-catalog --version
v3.10.0-0.53.0;Upstream:v0.1.19
# asbd --version
1.2.14

Comment 6 errata-xmlrpc 2018-07-30 19:15:23 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:1816


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