From 3b1d62f3795ced17da3d2b4cbeb1b51d3cba44bb Mon Sep 17 00:00:00 2001 From: e1mo Date: Wed, 21 Feb 2024 23:50:37 +0100 Subject: [PATCH 1/2] Flake update Amongst others, contains a dokuwiki update --- flake.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 2594e64..c465274 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { @@ -43,11 +43,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1707956935, - "narHash": "sha256-ZL2TrjVsiFNKOYwYQozpbvQSwvtV/3Me7Zwhmdsfyu4=", + "lastModified": 1712439257, + "narHash": "sha256-aSpiNepFOMk9932HOax0XwNxbA38GOUVOiXfUVPOrck=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a4d4fe8c5002202493e87ec8dbc91335ff55552c", + "rev": "ff0dbd94265ac470dda06a657d5fe49de93b4599", "type": "github" }, "original": { @@ -59,11 +59,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1707603439, - "narHash": "sha256-LodBVZ3+ehJP2azM5oj+JrhfNAAzmTJ/OwAIOn0RfZ0=", + "lastModified": 1712437997, + "narHash": "sha256-g0whLLwRvgO2FsyhY8fNk+TWenS3jg5UdlWL4uqgFeo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d8cd80616c8800feec0cab64331d7c3d5a1a6d98", + "rev": "e38d7cb66ea4f7a0eb6681920615dfcc30fc2920", "type": "github" }, "original": { @@ -89,11 +89,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1707842202, - "narHash": "sha256-3dTBbCzHJBinwhsisGJHW1HLBsLbj91+a5ZDXt7ttW0=", + "lastModified": 1712458908, + "narHash": "sha256-DMgBS+jNHDg8z3g9GkwqL8xTKXCRQ/0FGsAyrniVonc=", "owner": "Mic92", "repo": "sops-nix", - "rev": "48afd3264ec52bee85231a7122612e2c5202fa74", + "rev": "39191e8e6265b106c9a2ba0cfd3a4dafe98a31c6", "type": "github" }, "original": { From fdd155da3d4e5a69f2c555ab1363129e1000e04c Mon Sep 17 00:00:00 2001 From: e1mo Date: Sun, 31 Mar 2024 16:01:44 +0200 Subject: [PATCH 2/2] monitoring: Flip order of disk warning rules That way the alerting emails actually include how much disk space is available instead of the fact that the disk is not read-only. --- services/monitoring/rules.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/monitoring/rules.yaml b/services/monitoring/rules.yaml index 7827c86..d4cf772 100644 --- a/services/monitoring/rules.yaml +++ b/services/monitoring/rules.yaml @@ -92,7 +92,7 @@ groups: summary: "Elevated load15 on {{ $labels.instance }}" - alert: LowFreeDiskSpace - expr: node_filesystem_readonly == 0 and ON (instance, device, mountpoint) (node_filesystem_avail_bytes * 100) / node_filesystem_size_bytes < 15 + expr: ((node_filesystem_avail_bytes * 100) / node_filesystem_size_bytes < 15) and on (instance, device, mountpoint) node_filesystem_readonly == 0 for: 10m labels: serverity: info @@ -100,7 +100,7 @@ groups: summary: "{{ $labels.mountpoint }} on {{ $labels.instance }} has less than 15% space left" - alert: VeryLowFreeDiskSpace - expr: node_filesystem_readonly == 0 and ON (instance, device, mountpoint) (node_filesystem_avail_bytes * 100) / node_filesystem_size_bytes < 5 + expr: ((node_filesystem_avail_bytes * 100) / node_filesystem_size_bytes < 5) and ON (instance, device, mountpoint) node_filesystem_readonly == 0 for: 3m labels: serverity: error