Bug 1887428

Summary: oauth-apiserver service should be monitored by prometheus
Product: OpenShift Container Platform Reporter: Standa Laznicka <slaznick>
Component: apiserver-authAssignee: Standa Laznicka <slaznick>
Status: CLOSED ERRATA QA Contact: pmali
Severity: medium Docs Contact:
Priority: medium    
Version: 4.6CC: aos-bugs, mfojtik
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: There was configuration missing for Prometheus to scrape the oauth-apiserver pods in the openshift-oauth-apiserver namespace. Consequence: The metrics of the oauth-apiserver pods could not be queried in the cluster's Prometheus. Fix: Add the missing configuration. Result: oauth-apiserver metrics are now available for querying in the cluster's Prometheus instance.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-24 15:24:44 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:    
Bug Blocks: 1914848    

Description Standa Laznicka 2020-10-12 12:38:59 UTC
Description of problem:
The metrics of the oauth API servers' service are not being scraped by Prometheus and therefore don't appear in results of Prometheus queries

Version-Release number of selected component (if applicable):
4.6

How reproducible:
100%

Steps to Reproduce:
1. Go to Prometheus console
2. either
a) attempt to query apiserver metrics and look for oauth-apiserver
or
b) go to Status/Targets and look for oauth-apiserver 

Actual results:
no oauth-apiserver

Expected results:
being able to see the oauth-apiserver in Prometheus targets and query its metrics

Additional info:
it's because the CAO does not include ServiceMonitor for the oauth-apiserver in its manifests

Comment 3 pmali 2020-11-09 10:10:42 UTC
Marking as verified, able to see the oauth-apiserver in Prometheus targets and query its metrics.

$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.7.0-0.nightly-2020-10-27-051128   True        False         6h12m   Cluster version is 4.7.0-0.nightly-2020-10-27-051128

Comment 6 errata-xmlrpc 2021-02-24 15:24:44 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 (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), 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-2020:5633