Configure PV monitoring with Container insights
Starting with agent version ciprod10052020, Container insights integrated agent now supports monitoring PV (persistent volume) usage. With agent version ciprod01112021, the agent supports monitoring PV inventory, including information about the status, storage class, type, access modes, and other details.
PV metrics
Container insights automatically starts monitoring PV usage by collecting the following metrics at 60-second intervals and storing them in the InsightMetrics table.
| Metric name | Metric Dimension (tags) | Metric Description |
|---|---|---|
pvUsedBytes |
podUID, podName, pvcName, pvcNamespace, capacityBytes, clusterId, clusterName |
Used space in bytes for a specific persistent volume with a claim used by a specific pod. capacityBytes is folded in as a dimension in the Tags field to reduce data ingestion cost and to simplify queries. |
Learn more about configuring collected PV metrics here.
PV inventory
Container insights automatically starts monitoring PVs by collecting the following information at 60-second intervals and storing them in the KubePVInventory table.
| Data | Data Source | Data Type | Fields |
|---|---|---|---|
| Inventory of persistent volumes in a Kubernetes cluster | Kube API | KubePVInventory |
PVName, PVCapacityBytes, PVCName, PVCNamespace, PVStatus, PVAccessModes, PVType, PVTypeInfo, PVStorageClassName, PVCreationTimestamp, TimeGenerated, ClusterId, ClusterName, _ResourceId |
Monitor Persistent Volumes
Container insights includes pre-configured charts for this usage metric and inventory information in workbook templates for every cluster. You can also enable a recommended alert for PV usage, and query these metrics in Log Analytics.
Workload Details Workbook
You can find usage charts for specific workloads in the Persistent Volume tab of the Workload Details workbook directly from an AKS cluster by selecting Workbooks from the left-hand pane, from the View Workbooks drop-down list in the Insights pane, or from the Reports (preview) tab in the Insights pane.
Persistent Volume Details Workbook
You can find an overview of persistent volume inventory in the Persistent Volume Details workbook directly from an AKS cluster by selecting Workbooks from the left-hand pane. You can also open this workbook from the View Workbooks drop-down list in the Insights pane or from the Reports tab in the Insights pane.
Persistent Volume Usage Recommended Alert
You can enable a recommended alert to alert you when average PV usage for a pod is above 80%. Learn more about alerting here and how to override the default threshold here.
Next steps
- Learn more about collected PV metrics here.