2.10. Accessing the metrics of your service as a developer
After you have enabled monitoring your own services, deployed a service, and set up metrics collection for the service, you can access the metrics of the service as a developer or as a user with view permissions for the project.
The Grafana instance shipped within OpenShift Container Platform Monitoring is read-only and displays only infrastructure-related dashboards.
Prerequisites
- Deploy the service that you want to monitor.
- Enable monitoring of your own services.
- Have metrics scraping set up for the service.
- Log in as a developer or as a user with view permissions for the project.
Procedure
Go to the OpenShift Container Platform web console, switch to the Developer Perspective, then click Advanced → Metrics. Select the project you want to see the metrics for.
注意Developers can only use the Developer Perspective and not the Administrator Perspective. They can only query metrics from a single project. They cannot access the third-party UIs provided with OpenShift Container Platform Monitoring.
- Use the PromQL interface to run queries for your services.