Configure PVC Metrics

You can use dashboards and alerts for PersistentVolumeClaim (PVC) metrics in the regions where PVC metrics are supported.

To see data on PVC dashboards and alerts, ensure that the prerequisites are met.

Prerequisites

  • Upgrade Sysdig agent to v12.2.0

  • If you are upgrading the Sysdig agent, either download sysdig-agent-clusterrole.yaml or apply the following rule to the ClusterRole associated with your Sysdig agent.

      rules:
    - apiGroups:
      - ""
      resources:
      - nodes/metrics
        nodes/proxy
    - nonResourceURLs:
      - /metrics
      verbs:
      - get
    

    The rules are required to scrape the kubelet containers. With this rule enabled, you will also have the kubelet metrics and can access kubelet templates for both dashboards and alerts.

    This configuration change is only required for agent upgrades because the sysdig-agent-clusterrole.yaml associated with fresh installations will already have this configuration. See Steps for Kubernetes (Vanilla) for information on Sysdig agent installation.

  • If you are an existing Sysdig user, include the following configuration in the dragent.yaml file:

    k8s_extra_resources:
      include:
        - persistentvolumes
        - persistentvolumeclaims
        - storageclasses
    

Access PVC Dashboard Template

  1. Log in to Sysdig Monitor and click Dashboards.

  2. On the Dashboards slider, scroll down to locate Dashboard Templates.

  3. Click Kubernetes to expand the Kubernetes dashboard templates.

  4. Select the PVC and Storage dashboard.

Access PVC Alert Template

  1. Log in to Sysdig Monitor and click Alerts.

  2. On the Alerts page, click Library.

  3. On the Library page, click All Templates.

  4. Select the Kubenetes PVC alert templates.

PVC Metrics

MetricsMetric TypeLabels
kube_persistentvolume_status_phaseGaugepersistentvolume, phase
kube_persistentvolume_claim_refGaugepersistentvolume, name
kube_storageclass_createdGaugestorageclass
kube_storageclass_infoGaugestorageclass, provisioner, reclaim_policy, volume_binding_mode
kube_storageclass_labelsGaugestorageclass
kube_pod_spec_volumes_persistentvolumeclaims_infoGaugenamespace, pod, uid, volume, persistentvolumeclaim
kube_pod_spec_volumes_persistentvolumeclaims_readonlyGaugenamespace, pod, uid, volume, persistentvolumeclaim
kube_persistentvolumeclaim_status_conditionGaugenamespace, persistentvolumeclaim, type, status
kube_persistentvolumeclaim_status_phaseGaugenamespace, persistentvolumeclaim, phase
kube_persistentvolumeclaim_access_modeGaugenamespace, persistentvolumeclaim, access_mode
kubelet_volume_stats_inodesGaugenamespace, persistentvolumeclaim
kubelet_volume_stats_inodes_freeGaugenamespace, persistentvolumeclaim
kubelet_volume_stats_inodes_usedGaugenamespace, persistentvolumeclaim
kubelet_volume_stats_used_bytesGaugenamespace, persistentvolumeclaim
kubelet_volume_stats_available_bytesGaugenamespace, persistentvolumeclaim
kubelet_volume_stats_capacity_bytesGaugenamespace, persistentvolumeclaim
storage_operation_duration_seconds_bucketGaugeoperation_name, volume_plugin,le
storage_operation_duration_seconds_sumGaugeoperation_name, volume_plugin
storage_operation_duration_seconds_countGaugeoperation_name, volume_plugin
storage_operation_errors_totalGaugeoperation_name, volume_plugin
storage_operation_status_countGaugeoperation_name, status, volume_plugin


Last modified January 13, 2022