Prometheus queries intermintently returning no metrics

Solution Verified - Updated -

Issue

  • Continuously, 50% of the queries returned by Prometheus doesn't have any metrics.
[user@master01 ~]$ export TOKEN=$( oc whoami -t)
[user@master01 ~]$ export URL=https://prometheus-k8s-openshift-monitoring.apps.example.local
[user@master01 ~]$ curl -s -g -k -X GET -H "Authorization: Bearer $TOKEN" -H 'Accept: application/json' -H 'Content-Type: application/json' "$URL/api/v1/query?query=up" | python -mjson.tool
{ "data": { "result": [], "resultType": "vector" }, "status": "success" }

Environment

  • Red Hat OpenShift Container Platform

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