From 64c73eafe55d23f155a5a64749d126d870f9954f Mon Sep 17 00:00:00 2001
From: Aleksandar Topuzovic <aleksandar.topuzovic@gmail.com>
Date: Tue, 5 Jun 2018 14:59:40 +0100
Subject: [PATCH] Ignore '/etc/*' mountpoints

* Ignores '/etc/resolv.conf', '/etc/hosts' and '/etc/hostname' mountpoints
* Otherwise 3 additional alerts are generated
---
 jsonnet/kube-prometheus/alerts/node.libsonnet | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/jsonnet/kube-prometheus/alerts/node.libsonnet b/jsonnet/kube-prometheus/alerts/node.libsonnet
index f5387a99..46a5e36d 100644
--- a/jsonnet/kube-prometheus/alerts/node.libsonnet
+++ b/jsonnet/kube-prometheus/alerts/node.libsonnet
@@ -11,7 +11,7 @@
               summary: 'Node disk is running full within 24 hours',
             },
             expr: |||
-              predict_linear(node_filesystem_free{%(nodeExporterSelector)s}[6h], 3600 * 24) < 0
+              predict_linear(node_filesystem_free{%(nodeExporterSelector)s,mountpoint!~"^/etc/(?:resolv.conf|hosts|hostname)$"}[6h], 3600 * 24) < 0
             ||| % $._config,
             'for': '30m',
             labels: {
@@ -25,7 +25,7 @@
               summary: 'Node disk is running full within 2 hours',
             },
             expr: |||
-              predict_linear(node_filesystem_free{%(nodeExporterSelector)s}[30m], 3600 * 2) < 0
+              predict_linear(node_filesystem_free{%(nodeExporterSelector)s,mountpoint!~"^/etc/(?:resolv.conf|hosts|hostname)$"}[30m], 3600 * 2) < 0
             ||| % $._config,
             'for': '10m',
             labels: {
-- 
GitLab