Chapter 2. Metrics and Service Mesh
2.1. Using metrics Copy linkLink copied to clipboard!
You can use the OpenShift Container Platform monitoring stack and Red Hat OpenShift Service Mesh to track the health and performance of your applications. You can learn how to monitor metrics and alerts.
2.1.1. Configuring OpenShift Monitoring with Service Mesh Copy linkLink copied to clipboard!
You can integrate Red Hat OpenShift Service Mesh with user-workload monitoring to enable observability in your service mesh. User-workload monitoring provides access to essential built-in tools and is required to run Kiali, the dedicated console for Istio.
Prerequisites
- Red Hat OpenShift Service Mesh is installed.
- User-workload monitoring is enabled. See Enabling monitoring for user-defined projects.
Procedure
Create a YAML file named
servicemonitor.ymlto monitor the Istio control plane:Example
ServiceMonitorobjectCopy to Clipboard Copied! Toggle word wrap Toggle overflow Apply the YAML file by running the following command:
oc apply -f servicemonitor.yml
$ oc apply -f servicemonitor.ymlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a YAML file named
podmonitor.ymlto collect metrics from the Istio proxies:Example
PodMonitorobjectCopy to Clipboard Copied! Toggle word wrap Toggle overflow Apply the YAML file by running the following command:
oc apply -f podmonitor.yml
$ oc apply -f podmonitor.ymlCopy to Clipboard Copied! Toggle word wrap Toggle overflow On the OpenShift Console go to Observe
Metrics, and run the query istio_requests_total.NoteThe Metrics implementation can take a few minutes for the query to return results.