Skip to content
Snippets Groups Projects
Commit 65364967 authored by Frederic Branczyk's avatar Frederic Branczyk
Browse files

kube-prometheus: Improve disk alert

Only trigger disk running full alerts when the disk capacity is over 85%
and use recording rule of the kubernetes-mixin to only consider real
physical filesystems.
parent b3389402
Branches
Tags 19.38.3
No related merge requests found
...@@ -7,11 +7,10 @@ ...@@ -7,11 +7,10 @@
{ {
alert: 'NodeDiskRunningFull', alert: 'NodeDiskRunningFull',
annotations: { annotations: {
description: 'device {{$labels.device}} on node {{$labels.instance}} is running full within the next 24 hours (mounted at {{$labels.mountpoint}})', message: 'Device {{ $labels.device }} of node-exporter {{ $labels.namespace }}/{{ $labels.pod }} is running full within the next 24 hours.',
summary: 'Node disk is running full within 24 hours',
}, },
expr: ||| expr: |||
predict_linear(node_filesystem_free{%(nodeExporterSelector)s,mountpoint!~"^/etc/(?:resolv.conf|hosts|hostname)$"}[6h], 3600 * 24) < 0 and on(instance) up{%(nodeExporterSelector)s} (node:node_filesystem_usage: > 0.85) and (predict_linear(node:node_filesystem_avail:[6h], 3600 * 24) < 0)
||| % $._config, ||| % $._config,
'for': '30m', 'for': '30m',
labels: { labels: {
...@@ -21,11 +20,10 @@ ...@@ -21,11 +20,10 @@
{ {
alert: 'NodeDiskRunningFull', alert: 'NodeDiskRunningFull',
annotations: { annotations: {
description: 'device {{$labels.device}} on node {{$labels.instance}} is running full within the next 2 hours (mounted at {{$labels.mountpoint}})', message: 'Device {{ $labels.device }} of node-exporter {{ $labels.namespace }}/{{ $labels.pod }} is running full within the next 2 hours.',
summary: 'Node disk is running full within 2 hours',
}, },
expr: ||| expr: |||
predict_linear(node_filesystem_free{%(nodeExporterSelector)s,mountpoint!~"^/etc/(?:resolv.conf|hosts|hostname)$"}[30m], 3600 * 2) < 0 and on(instance) up{%(nodeExporterSelector)s} (node:node_filesystem_usage: > 0.85) and (predict_linear(node:node_filesystem_avail:[30m], 3600 * 2) < 0)
||| % $._config, ||| % $._config,
'for': '10m', 'for': '10m',
labels: { labels: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment