Accessing the IBM Storage Scale container native metrics from outside the Openshift cluster - IBM/ibm-spectrum-scale-bridge-for-grafana GitHub Wiki

You can query Prometheus metrics with from outside the cluster when monitoring your own services, for example the IBM Storage Scale container native internal performance metrics, with user-defined projects. Read how to Setup Openshift Monitoring stack for monitoring IBM Storage Scale container native project to get more info.

To access this data from outside the cluster, create the thanos-querier route.

oc apply -f https://raw.githubusercontent.com/IBM/ibm-spectrum-scale-bridge-for-grafana/refs/heads/master/examples/openshift_deployment_scripts/cnsa_workload_monitoring/route-external-access-thanos-querier.yaml

This access only supports using a bearer token for authentication.

oc login --token=sha256~JrD85Ikv__WAT2tr8vvfhEPkQuJi8Ug1j69CNnKS7_Q --server=https://api.ocp2.vmlocal:6443

TOKEN=$(oc whoami -t)
echo "Bearer $TOKEN"

In the Grafana web interface, create a Prometheus datasource using the thanos-querier route url as the Prometheus server url.

/images/Openshift/Prometheus_datasource_url.png

Add the HTTP Headers "Authorization" to the Authentication properties. As "Authorization" value insert the output of the echo command in the previous step.

/images/Openshift/Prometheus_datasource_authentication.png

In the Performance section, select Thanos as the Prometheus type from the drop down menu.

/images/Openshift/Prometheus_datasource_type.png

Save and test the connection.