diff --git a/jsonnetfile.lock.json b/jsonnetfile.lock.json index e19f701a6fd5fe2eef7a869addf3c806aa8d12cd..85837c30b9f53a7233cca72ff788e31b547bd6b6 100644 --- a/jsonnetfile.lock.json +++ b/jsonnetfile.lock.json @@ -97,7 +97,7 @@ "subdir": "docs/node-mixin" } }, - "version": "154d59dee72b894f7245d8d78c9344d1211d521f" + "version": "e7c2dbed4e0278731b59e9870eb9a9d046047aa8" }, { "name": "promgrafonnet", diff --git a/manifests/grafana-dashboardDefinitions.yaml b/manifests/grafana-dashboardDefinitions.yaml index b7438d941a3c28a35d97d923650e86ae4d22f0f8..34d9078253c00b390d1c609b2f543726578489e8 100644 --- a/manifests/grafana-dashboardDefinitions.yaml +++ b/manifests/grafana-dashboardDefinitions.yaml @@ -10963,7 +10963,7 @@ items: "steppedLine": false, "targets": [ { - "expr": "(\n sum without (device) (\n max without (fstype, mountpoint) (\n node_filesystem_size_bytes{job=\"node-exporter\", } - node_filesystem_avail_bytes{job=\"node-exporter\", }\n )\n ) \n/ ignoring (instance) group_left\n sum without (instance, device) (\n max without (fstype, mountpoint) (\n node_filesystem_size_bytes{job=\"node-exporter\", }\n )\n )\n) \n", + "expr": "(\n sum without (device) (\n max without (fstype, mountpoint) (\n node_filesystem_size_bytes{job=\"node-exporter\", fstype!=\"\"} - node_filesystem_avail_bytes{job=\"node-exporter\", fstype!=\"\"}\n )\n ) \n/ ignoring (instance) group_left\n sum without (instance, device) (\n max without (fstype, mountpoint) (\n node_filesystem_size_bytes{job=\"node-exporter\", fstype!=\"\"}\n )\n )\n) \n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{instance}}", @@ -11911,7 +11911,7 @@ items: "steppedLine": false, "targets": [ { - "expr": "1 -\n(\n max without (mountpoint, fstype) (node_filesystem_avail_bytes{job=\"node-exporter\", , instance=\"$instance\"}})\n/\n max without (mountpoint, fstype) (node_filesystem_size_bytes{job=\"node-exporter\", , instance=\"$instance\"}})\n)\n", + "expr": "1 -\n(\n max without (mountpoint, fstype) (node_filesystem_avail_bytes{job=\"node-exporter\", fstype!=\"\", instance=\"$instance\"})\n/\n max without (mountpoint, fstype) (node_filesystem_size_bytes{job=\"node-exporter\", fstype!=\"\", instance=\"$instance\"})\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{device}}", @@ -12679,14 +12679,14 @@ items: "steppedLine": false, "targets": [ { - "expr": "sum(\n max by (device) (\n node_filesystem_size_bytes{job=\"node-exporter\", instance=\"$instance\", }\n -\n node_filesystem_avail_bytes{job=\"node-exporter\", instance=\"$instance\", }\n )\n)\n", + "expr": "sum(\n max by (device) (\n node_filesystem_size_bytes{job=\"node-exporter\", instance=\"$instance\", fstype!=\"\"}\n -\n node_filesystem_avail_bytes{job=\"node-exporter\", instance=\"$instance\", fstype!=\"\"}\n )\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "used", "refId": "A" }, { - "expr": "sum(\n max by (device) (\n node_filesystem_avail_bytes{job=\"node-exporter\", instance=\"$instance\", }\n )\n)\n", + "expr": "sum(\n max by (device) (\n node_filesystem_avail_bytes{job=\"node-exporter\", instance=\"$instance\", fstype!=\"\"}\n )\n)\n", "format": "time_series", "intervalFactor": 2, "legendFormat": "available", diff --git a/manifests/prometheus-rules.yaml b/manifests/prometheus-rules.yaml index b90c8efb6c067c210c1a8dc45520d3bb6344578b..afcd6b0943f11f479b0342c7b7e68b4cfb224f6a 100644 --- a/manifests/prometheus-rules.yaml +++ b/manifests/prometheus-rules.yaml @@ -242,11 +242,11 @@ spec: summary: Filesystem is predicted to run out of space within the next 24 hours. expr: | ( - node_filesystem_avail_bytes{job="node-exporter",} / node_filesystem_size_bytes{job="node-exporter",} < 0.4 + node_filesystem_avail_bytes{job="node-exporter",fstype!=""} / node_filesystem_size_bytes{job="node-exporter",fstype!=""} < 0.4 and - predict_linear(node_filesystem_avail_bytes{job="node-exporter",}[6h], 24*60*60) < 0 + predict_linear(node_filesystem_avail_bytes{job="node-exporter",fstype!=""}[6h], 24*60*60) < 0 and - node_filesystem_readonly{job="node-exporter",} == 0 + node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 ) for: 1h labels: @@ -260,11 +260,11 @@ spec: summary: Filesystem is predicted to run out of space within the next 4 hours. expr: | ( - node_filesystem_avail_bytes{job="node-exporter",} / node_filesystem_size_bytes{job="node-exporter",} < 0.2 + node_filesystem_avail_bytes{job="node-exporter",fstype!=""} / node_filesystem_size_bytes{job="node-exporter",fstype!=""} < 0.2 and - predict_linear(node_filesystem_avail_bytes{job="node-exporter",}[6h], 4*60*60) < 0 + predict_linear(node_filesystem_avail_bytes{job="node-exporter",fstype!=""}[6h], 4*60*60) < 0 and - node_filesystem_readonly{job="node-exporter",} == 0 + node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 ) for: 1h labels: @@ -277,9 +277,9 @@ spec: summary: Filesystem has less than 5% space left. expr: | ( - node_filesystem_avail_bytes{job="node-exporter",} / node_filesystem_size_bytes{job="node-exporter",} * 100 < 5 + node_filesystem_avail_bytes{job="node-exporter",fstype!=""} / node_filesystem_size_bytes{job="node-exporter",fstype!=""} * 100 < 5 and - node_filesystem_readonly{job="node-exporter",} == 0 + node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 ) for: 1h labels: @@ -292,9 +292,9 @@ spec: summary: Filesystem has less than 3% space left. expr: | ( - node_filesystem_avail_bytes{job="node-exporter",} / node_filesystem_size_bytes{job="node-exporter",} * 100 < 3 + node_filesystem_avail_bytes{job="node-exporter",fstype!=""} / node_filesystem_size_bytes{job="node-exporter",fstype!=""} * 100 < 3 and - node_filesystem_readonly{job="node-exporter",} == 0 + node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 ) for: 1h labels: @@ -308,11 +308,11 @@ spec: summary: Filesystem is predicted to run out of inodes within the next 24 hours. expr: | ( - node_filesystem_files_free{job="node-exporter",} / node_filesystem_files{job="node-exporter",} < 0.4 + node_filesystem_files_free{job="node-exporter",fstype!=""} / node_filesystem_files{job="node-exporter",fstype!=""} < 0.4 and - predict_linear(node_filesystem_files_free{job="node-exporter",}[6h], 24*60*60) < 0 + predict_linear(node_filesystem_files_free{job="node-exporter",fstype!=""}[6h], 24*60*60) < 0 and - node_filesystem_readonly{job="node-exporter",} == 0 + node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 ) for: 1h labels: @@ -326,11 +326,11 @@ spec: summary: Filesystem is predicted to run out of inodes within the next 4 hours. expr: | ( - node_filesystem_files_free{job="node-exporter",} / node_filesystem_files{job="node-exporter",} < 0.2 + node_filesystem_files_free{job="node-exporter",fstype!=""} / node_filesystem_files{job="node-exporter",fstype!=""} < 0.2 and - predict_linear(node_filesystem_files_free{job="node-exporter",}[6h], 4*60*60) < 0 + predict_linear(node_filesystem_files_free{job="node-exporter",fstype!=""}[6h], 4*60*60) < 0 and - node_filesystem_readonly{job="node-exporter",} == 0 + node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 ) for: 1h labels: @@ -343,9 +343,9 @@ spec: summary: Filesystem has less than 5% inodes left. expr: | ( - node_filesystem_files_free{job="node-exporter",} / node_filesystem_files{job="node-exporter",} * 100 < 5 + node_filesystem_files_free{job="node-exporter",fstype!=""} / node_filesystem_files{job="node-exporter",fstype!=""} * 100 < 5 and - node_filesystem_readonly{job="node-exporter",} == 0 + node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 ) for: 1h labels: @@ -358,9 +358,9 @@ spec: summary: Filesystem has less than 3% inodes left. expr: | ( - node_filesystem_files_free{job="node-exporter",} / node_filesystem_files{job="node-exporter",} * 100 < 3 + node_filesystem_files_free{job="node-exporter",fstype!=""} / node_filesystem_files{job="node-exporter",fstype!=""} * 100 < 3 and - node_filesystem_readonly{job="node-exporter",} == 0 + node_filesystem_readonly{job="node-exporter",fstype!=""} == 0 ) for: 1h labels: