Skip to content

Commit

Permalink
Merge pull request #73 from nrobert13/alert_kube_persistent_volume_er…
Browse files Browse the repository at this point in the history
…rror

add alert for Pending or Failed PersistentVolumes
  • Loading branch information
metalmatze authored Nov 8, 2018
2 parents 58c53cb + 7049c79 commit f7ca48c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions alerts/storage_alerts.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,19 @@
message: 'Based on recent sampling, the PersistentVolume claimed by {{ $labels.persistentvolumeclaim }} in Namespace {{ $labels.namespace }} is expected to fill up within four days. Currently {{ printf "%0.2f" $value }}% is available.',
},
},
{
alert: 'KubePersistentVolumeErrors',
expr: |||
kube_persistentvolume_status_phase{phase=~"Failed|Pending",%(prefixedNamespaceSelector)s%(kubeStateMetricsSelector)s} > 0
||| % $._config,
'for': '5m',
labels: {
severity: 'critical',
},
annotations: {
message: 'The persistent volume {{ $labels.persistentvolume }} has status {{ $labels.phase }}.',
},
},
],
},
],
Expand Down

0 comments on commit f7ca48c

Please sign in to comment.