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

Bug 2027290

Summary: Prometheus can't scrap metrics from openshift-* namespace in OCP4
Product: OpenShift Container Platform Reporter: Danila Kiselev <dkiselev>
Component: MonitoringAssignee: Simon Pasquier <spasquie>
Status: CLOSED DUPLICATE QA Contact: Junqi Zhao <juzhao>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.8CC: amuller, anpicker, aos-bugs, erooth
Target Milestone: ---   
Target Release: ---   
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: 2021-11-29 10:56:30 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 Danila Kiselev 2021-11-29 10:33:32 UTC
Description of problem:
Prometheus return an error for openshift-network-diagnostics namespace:

~~~
level=warn ts=2021-11-04T08:05:44.022232114Z caller=operator.go:1697 component=prometheusoperator msg="skipping servicemonitor" error="it accesses file system via bearer token file which Prometheus specification prohibits" servicemonitor=openshift-network-diagnostics/network-check-source namespace=openshift-user-workload-monitoring prometheus=user-workload
~~~

Labeling with "openshift.io/cluster-monitoring: "true"" helps to fix the error, but openshift-* namespace should work out of the box. 

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

How reproducible:
For this particular namespace.

Comment 1 Simon Pasquier 2021-11-29 10:56:30 UTC

*** This bug has been marked as a duplicate of bug 1986061 ***