42 lines
1.7 KiB
YAML
42 lines
1.7 KiB
YAML
apiVersion: monitoring.coreos.com/v1
|
|
kind: PrometheusRule
|
|
metadata:
|
|
name: ceph-rbd-volume-capacity
|
|
namespace: prometheus
|
|
labels:
|
|
release: prometheus
|
|
spec:
|
|
groups:
|
|
- name: ceph-rbd-volume-capacity
|
|
rules:
|
|
- alert: CephRBDPersistentVolumeFillingUp
|
|
expr: |-
|
|
(
|
|
1 - kubelet_volume_stats_available_bytes{job="kubelet",metrics_path="/metrics"}
|
|
/ kubelet_volume_stats_capacity_bytes{job="kubelet",metrics_path="/metrics"}
|
|
)
|
|
* on(namespace,persistentvolumeclaim) group_left(storageclass,volumename)
|
|
kube_persistentvolumeclaim_info{storageclass=~"rook-ceph-block.*"}
|
|
> 0.80
|
|
for: 10m
|
|
labels:
|
|
severity: warning
|
|
annotations:
|
|
summary: "Ceph RBD PVC is more than 80% full"
|
|
description: "{{ $labels.namespace }}/{{ $labels.persistentvolumeclaim }} is {{ $value | humanizePercentage }} used."
|
|
- alert: CephRBDPersistentVolumeFillingUp
|
|
expr: |-
|
|
(
|
|
1 - kubelet_volume_stats_available_bytes{job="kubelet",metrics_path="/metrics"}
|
|
/ kubelet_volume_stats_capacity_bytes{job="kubelet",metrics_path="/metrics"}
|
|
)
|
|
* on(namespace,persistentvolumeclaim) group_left(storageclass,volumename)
|
|
kube_persistentvolumeclaim_info{storageclass=~"rook-ceph-block.*"}
|
|
> 0.90
|
|
for: 5m
|
|
labels:
|
|
severity: critical
|
|
annotations:
|
|
summary: "Ceph RBD PVC is more than 90% full"
|
|
description: "{{ $labels.namespace }}/{{ $labels.persistentvolumeclaim }} is {{ $value | humanizePercentage }} used."
|