_data/rules.yml: Use humanize instead of % printf.

This commit is contained in:
Jonathan Davies 2019-06-25 15:54:47 +01:00
parent c7ca57f57f
commit 2574946609

View file

@ -301,7 +301,7 @@ services:
query: 'kubelet_volume_stats_available_bytes / kubelet_volume_stats_capacity_bytes * 100 < 10'
severity: warning
- name: Volume full in four days
description: "{{ $labels.namespace }}/{{ $labels.persistentvolumeclaim }} is expected to fill up within four days. Currently {{ printf '%0.2f' $value }}% is available."
description: "{{ $labels.namespace }}/{{ $labels.persistentvolumeclaim }} is expected to fill up within four days. Currently {{ $value | humanize }}% is available."
query: '100 * (kubelet_volume_stats_available_bytes / kubelet_volume_stats_capacity_bytes) < 15 and predict_linear(kubelet_volume_stats_available_bytes[6h], 4 * 24 * 3600) < 0'
severity: critical