Bug 1737164

Summary: OLM metrics should be scraped by telemeter
Product: OpenShift Container Platform Reporter: Evan Cordell <ecordell>
Component: OLMAssignee: Evan Cordell <ecordell>
OLM sub component: OLM QA Contact: Bruno Andrade <bandrade>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: chezhang, chuo, jfan, jiazha, lmeyer, scolange, vlaad
Version: 4.1.0   
Target Milestone: ---   
Target Release: 4.1.z   
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: 2019-09-10 15:59:27 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:
Bug Depends On: 1737156    
Bug Blocks:    

Description Evan Cordell 2019-08-02 23:41:25 UTC

Comment 1 Jian Zhang 2019-08-05 01:43:14 UTC
Hi, Evan

Could you help give more details about this bug? Such as the basic description, reproduce steps.
And, it's better to fil in that two Priority and Severity fields.

Comment 2 Jian Zhang 2019-08-05 06:25:56 UTC
Setting changes for bug 1737156.

Comment 4 Zhang Cheng 2019-08-08 02:59:21 UTC
Although have not got enough info from report, It depend on bug 1737156 from title.

Comment 7 Jian Zhang 2019-08-16 02:20:36 UTC
Not ready for the test since the fixed PR https://github.com/operator-framework/operator-lifecycle-manager/pull/976 hasn't been merged yet.
Change status to MODIFIED.

Comment 15 Bruno Andrade 2019-08-27 18:57:09 UTC
LGTM, marking as verified

Steps used to validate:

1) Create a subscription for etcd operator on default project 

2) Check subscription_sync_total metrics on catalog operator

 oc get pods -n openshift-operator-lifecycle-manager
NAME                                READY   STATUS    RESTARTS   AGE
catalog-operator-5f68dfb696-kk6vr   1/1     Running   1          20m
olm-operator-588cb66f54-m8h59       1/1     Running   1          20m
olm-operators-ph5nk                 1/1     Running   0          17m
packageserver-54f9598d56-2zqpw      1/1     Running   0          16m
packageserver-54f9598d56-rvclf      1/1     Running   0          16m


oc port-forward catalog-operator-5f68dfb696-kk6vr 8081  -n openshift-operator-lifecycle-manager
Forwarding from 127.0.0.1:8081 -> 8081
Forwarding from [::1]:8081 -> 8081
Handling connection for 8081

curl -k -H "Authorization: Bearer $(oc sa get-token prometheus-k8s -n openshift-monitoring)" https://localhost:8081/metrics | grep subs
# HELP subscription_count Number of subscriptions
# TYPE subscription_count gauge
subscription_count 2.0
# HELP subscription_sync_total Monotonic count of subscription syncs
# TYPE subscription_sync_total counter
subscription_sync_total{installed="",name="etcd"} 2.0
subscription_sync_total{installed="etcdoperator.v0.9.4",name="etcd"} 2.0
subscription_sync_total{installed="packageserver.v0.9.0",name="packageserver"} 2.0

3) Query for {__name__="subscription_sync_total"} on Prometheus UI and checked that all metrics are shown:
http://pics.osci.redhat.com/5chjce.png


Cluster Details:

	Cluster Version:
	oc get clusterversion -o json|jq ".items[0].status.history[0].version"
		"4.1.0-0.nightly-2019-08-27-070548"

	OLM Version:
	oc exec catalog-operator-5f68dfb696-kk6vr -n openshift-operator-lifecycle-manager -- olm -version
	OLM version: 0.9.0
	git commit: b28fc94

Comment 17 errata-xmlrpc 2019-09-10 15:59:27 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/RHSA-2019:2594