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

Bug 1577127

Summary: Cannot get prometheus metrics of ASB
Product: OpenShift Container Platform Reporter: Zhang Cheng <chezhang>
Component: Service BrokerAssignee: Shawn Hurley <shurley>
Status: CLOSED ERRATA QA Contact: Zhang Cheng <chezhang>
Severity: high Docs Contact:
Priority: medium    
Version: 3.10.0CC: aos-bugs, jiazha, jmatthew, zhsun, zitang
Target Milestone: ---   
Target Release: 3.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-30 19:15:23 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 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