Sample Monitoring capabilities for VMs in Red Hat OpenShift Virtualization
This section discusses monitoring using Cloud Insights for VMs in Red Hat OpenShift Virtualization.
Monitoring based on events and creating Alerts
Here is a sample where the namespace that contains a VM in OpenShift Virtualization is monitored based on events. In this example, a monitor is created based on logs.kubernetes.event for the specified namespace in the cluster.
This query provides all the events for the virtual machine in the namespace. (There is only one virtual machine in the namespace). An advanced query can also be constructed to filter based on the event where the reason is “failed” or “FailedMount” These events are typically created when there is an issue in creating a PV or mounting the PV to a pod indicating issues in the dynamic provisioner for creating persistent volumes for the VM.
While creating the Alert Monitor as shown above, you can also configure notification to recipients. You can also provide corrective actions or additional information that can be useful to resolve the error. In the above example, additional information could be to look into the Trident backend configuration and storage class definitions for resolving the issue.
Change Analytics
With Change Analytics, you can get a view of what changed in the state of your cluster including who made that change which can help in troubleshooting issues.
In the above example, Change Analysis is configured on the OpenShift cluster for the namespace that contains an OpenShift Virtualization VM. The dashboard shows changes against the timeline. You can drill down to see what changed and the click on All Changes Diff to see the diff of the manifests. From the manifest, you can see that a new backup of the persistent disks was created.
Backend Storage Mapping
With Cloud Insights, you can easily see the backend storage of the VM disks and several statistics about the PVCs.
You can click on the links under the backend column, which will pull data directly from the backend ONTAP storage.
Another way to look at all the pod to storage mapping is creating an All Metrics query From Observability menu under Explore.
Clicking on any of the links will give you the corresponding details from ONTP storage. For example, clicking on an SVM name in the storageVirtualMachine column will pull details about the SVM from ONTAP. Clicking on an internal volume name will pull details about the volume in ONTAP.