diff --git a/jsonnet/kube-prometheus/components/node-exporter.libsonnet b/jsonnet/kube-prometheus/components/node-exporter.libsonnet index d59d22e701..1452174aa6 100644 --- a/jsonnet/kube-prometheus/components/node-exporter.libsonnet +++ b/jsonnet/kube-prometheus/components/node-exporter.libsonnet @@ -28,6 +28,12 @@ local defaults = { ruleLabels: {}, _config: { nodeExporterSelector: 'job="' + defaults.name + '"', + // Adjust NodeFilesystemSpaceFillingUp warning and critical thresholds according to the following default kubelet + // GC values, + // imageGCLowThresholdPercent: 80 + // imageGCHighThresholdPercent: 85 + // See https://kubernetes.io/docs/reference/config-api/kubelet-config.v1beta1/ for more details. + fsSpaceFillingUpWarningThreshold: 20, fsSpaceFillingUpCriticalThreshold: 15, diskDeviceSelector: 'device=~"mmcblk.p.+|nvme.+|rbd.+|sd.+|vd.+|xvd.+|dm-.+|dasd.+"', runbookURLPattern: 'https://runbooks.prometheus-operator.dev/runbooks/node/%s', diff --git a/manifests/node-exporter-prometheusRule.yaml b/manifests/node-exporter-prometheusRule.yaml index e24216fafa..7f36e602cb 100644 --- a/manifests/node-exporter-prometheusRule.yaml +++ b/manifests/node-exporter-prometheusRule.yaml @@ -21,7 +21,7 @@ spec: summary: Filesystem is predicted to run out of space within the next 24 hours. expr: | ( - node_filesystem_avail_bytes{job="node-exporter",fstype!=""} / node_filesystem_size_bytes{job="node-exporter",fstype!=""} * 100 < 40 + node_filesystem_avail_bytes{job="node-exporter",fstype!=""} / node_filesystem_size_bytes{job="node-exporter",fstype!=""} * 100 < 20 and predict_linear(node_filesystem_avail_bytes{job="node-exporter",fstype!=""}[6h], 24*60*60) < 0 and