Prometheus operator shows "it accesses file system via bearer token file which Prometheus specification prohibits" warning in RHOCP 4

Solution Verified - Updated -

Issue

  • Prometheus cannot scrape metrics from some platform namespaces.
  • Prometheus operator shows the following warning repeatedly:

    2022-02-02T06:28:19.670850525Z level=warn ts=2022-02-02T06:28:19.670751821Z caller=operator.go:1753 component=prometheusoperator msg="skipping servicemonitor" error="it accesses file system via bearer token file which Prometheus specification prohibits" servicemonitor=openshift-compliance/metrics namespace=openshift-user-workload-monitoring prometheus=user-workload
    

Environment

  • Red Hat OpenShift Container Platform (RHOCP)
    • 4.8
    • 4.9
    • 4.10
  • Prometheus

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content