---
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
  creationTimestamp: "2025-10-27T12:44:56Z"
  generation: 1
  managedFields:
  - apiVersion: monitoring.coreos.com/v1
    fieldsType: FieldsV1
    fieldsV1:
      f:metadata:
        f:ownerReferences:
          .: {}
          k:{"uid":"d7929b37-b978-4024-8017-73d0daa42c59"}: {}
      f:spec:
        .: {}
        f:groups:
          .: {}
          k:{"name":"persistent-volume-alert.rules"}:
            .: {}
            f:name: {}
            f:rules: {}
    manager: manager
    operation: Update
    time: "2025-10-27T12:44:56Z"
  name: prometheus-pvc-rules
  namespace: openshift-storage
  ownerReferences:
  - apiVersion: v1
    blockOwnerDeletion: true
    controller: true
    kind: ConfigMap
    name: ocs-client-operator-config
    uid: d7929b37-b978-4024-8017-73d0daa42c59
  resourceVersion: "59222"
  uid: 19da2d1b-19ea-42d3-bd6a-27de88d516c3
spec:
  groups:
  - name: persistent-volume-alert.rules
    rules:
    - alert: PersistentVolumeUsageNearFull
      annotations:
        description: PVC {{ $labels.persistentvolumeclaim }} utilization has crossed
          75%. Free up some space or expand the PVC.
        message: PVC {{ $labels.persistentvolumeclaim }} is nearing full. Data deletion
          or PVC expansion is required.
        severity_level: warning
        storage_type: ceph
      expr: |
        (kubelet_volume_stats_used_bytes * on (namespace,persistentvolumeclaim) group_left(storageclass, provisioner) (kube_persistentvolumeclaim_info * on (storageclass)  group_left(provisioner) kube_storageclass_info {provisioner=~"(.*rbd.csi.ceph.com)|(.*cephfs.csi.ceph.com)"})) / (kubelet_volume_stats_capacity_bytes * on (namespace,persistentvolumeclaim) group_left(storageclass, provisioner) (kube_persistentvolumeclaim_info * on (storageclass)  group_left(provisioner) kube_storageclass_info {provisioner=~"(.*rbd.csi.ceph.com)|(.*cephfs.csi.ceph.com)"})) > 0.75
      for: 5s
      labels:
        severity: warning
    - alert: PersistentVolumeUsageCritical
      annotations:
        description: PVC {{ $labels.persistentvolumeclaim }} utilization has crossed
          85%. Free up some space or expand the PVC immediately.
        message: PVC {{ $labels.persistentvolumeclaim }} is critically full. Data
          deletion or PVC expansion is required.
        severity_level: error
        storage_type: ceph
      expr: |
        (kubelet_volume_stats_used_bytes * on (namespace,persistentvolumeclaim) group_left(storageclass, provisioner) (kube_persistentvolumeclaim_info * on (storageclass)  group_left(provisioner) kube_storageclass_info {provisioner=~"(.*rbd.csi.ceph.com)|(.*cephfs.csi.ceph.com)"})) / (kubelet_volume_stats_capacity_bytes * on (namespace,persistentvolumeclaim) group_left(storageclass, provisioner) (kube_persistentvolumeclaim_info * on (storageclass)  group_left(provisioner) kube_storageclass_info {provisioner=~"(.*rbd.csi.ceph.com)|(.*cephfs.csi.ceph.com)"})) > 0.85
      for: 5s
      labels:
        severity: critical
