How to query Prometheus API on Service Mesh from the command line in OpenShift 4

Solution Unverified - Updated -

Issue

  • How to get the metrics using curl from Prometheus on Service Mesh?
  • Why trying to access the dedicated Prometheus instance of Service Mesh is throwing the following error:

    $ curl -X GET -kI "https://prometheus-istio-system.apps.ocp.example.com/api/v1/targets" -H "Authorization: Bearer $TOKEN"
    HTTP/1.1 403 Forbidden
    ...
    

Environment

  • Red Hat Openshift Container Platform
    • 4.x
  • Red Hat OpenShift Service Mesh
    • 2.x

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