Viewing Metrics For A Project
Users can view pod-level metrics on the Project Overview page, and on the Pods page at Applications > Pods > choose pod name. Select Metrics from tabbed list.
OpenShift provides metrics on running pods via the web interface and via API. The metrics API is only available to OpenShift admins, but all users can view metrics on pods within their own projects via the UI.
- To see a list of all metrics for a project called 'chris-sandbox' use the following command, where the 'Bearer' token is the token provided by the OpenShift UI:
curl -H "Authorization: Bearer XXXXXXX" -H "Hawkular-Tenant: chris-sandbox" -X GET https://metrics.webplatformsunpublished.umich.edu/hawkular/metrics/metrics
- To see cpu usage data for a particular pod (ruby-ex/30c0543e-a914-11e6-b65a-005056ab4e14, in this case) in the 'chris-sandbox' project, use the following command:
curl -H "Authorization: Bearer XXXXXXX" -H "Hawkular-Tenant: chris-sandbox" -X GET https://metrics.webplatformsunpublished.umich.edu/hawkular/metrics/counters/ruby-ex%2F30c0543e-a914-11e6-b65a-005056ab4e14%2Fcpu%2Fusage/data?buckets=5\&start=`date -d -10minutes +%s%3N` | python -m json.tool
Project administrators can view metrics via the metrics API. See the following examples for basic use of the metrics API:
- OpenShift Metrics, basic CLI commands.
- Openshift Available Metrics Documentation.
Wednesday, June 3, 2020