aboutsummaryrefslogtreecommitdiff
path: root/systems
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2024-04-19 23:43:13 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2024-06-11 00:17:42 +0200
commite8d50f14185867d490f002aa5c408343ea5ea062 (patch)
treefda35affc1c4a03660d2367a05a5fee343a1bcf7 /systems
parent408ce9363bf574796487fedfe59a4a2ff0cbb4cb (diff)
downloadNix-e8d50f14185867d490f002aa5c408343ea5ea062.tar.gz
Nix-e8d50f14185867d490f002aa5c408343ea5ea062.tar.zst
Nix-e8d50f14185867d490f002aa5c408343ea5ea062.zip
Factorize smartd monitoring
Diffstat (limited to 'systems')
-rw-r--r--systems/backup-2/flake.lock2
-rw-r--r--systems/dilion/flake.lock2
-rw-r--r--systems/dilion/monitoring.nix38
-rw-r--r--systems/eldiron/flake.lock2
-rw-r--r--systems/eldiron/monitoring.nix38
-rw-r--r--systems/monitoring-1/flake.lock2
-rw-r--r--systems/quatresaisons/flake.lock2
7 files changed, 17 insertions, 69 deletions
diff --git a/systems/backup-2/flake.lock b/systems/backup-2/flake.lock
index d6e56a5..7d5992e 100644
--- a/systems/backup-2/flake.lock
+++ b/systems/backup-2/flake.lock
@@ -389,7 +389,7 @@
389 }, 389 },
390 "locked": { 390 "locked": {
391 "lastModified": 1, 391 "lastModified": 1,
392 "narHash": "sha256-A50vXg0qfzUhyQZKToEseYsLgtaYke41KE/4uuyj+PY=", 392 "narHash": "sha256-Lpe56lKWhlMQiQoCgvMJuqJtJ8+szDldjqMAGyt2U3U=",
393 "path": "../../flakes/private/monitoring", 393 "path": "../../flakes/private/monitoring",
394 "type": "path" 394 "type": "path"
395 }, 395 },
diff --git a/systems/dilion/flake.lock b/systems/dilion/flake.lock
index a690504..ce8bb8f 100644
--- a/systems/dilion/flake.lock
+++ b/systems/dilion/flake.lock
@@ -207,7 +207,7 @@
207 }, 207 },
208 "locked": { 208 "locked": {
209 "lastModified": 1, 209 "lastModified": 1,
210 "narHash": "sha256-A50vXg0qfzUhyQZKToEseYsLgtaYke41KE/4uuyj+PY=", 210 "narHash": "sha256-Lpe56lKWhlMQiQoCgvMJuqJtJ8+szDldjqMAGyt2U3U=",
211 "path": "../../flakes/private/monitoring", 211 "path": "../../flakes/private/monitoring",
212 "type": "path" 212 "type": "path"
213 }, 213 },
diff --git a/systems/dilion/monitoring.nix b/systems/dilion/monitoring.nix
index 5c4e5b0..e45aa25 100644
--- a/systems/dilion/monitoring.nix
+++ b/systems/dilion/monitoring.nix
@@ -9,6 +9,12 @@ let
9 }; 9 };
10in 10in
11{ 11{
12 config.myServices.monitoring.smartdDisks = [
13 "ata-Micron_1100_MTFDDAK512TBN_171216BD2A4B"
14 "ata-Micron_1100_MTFDDAK512TBN_171216BD2A70"
15 "ata-TOSHIBA_MG04ACA400N_96K1K87YFVLC"
16 "ata-WDC_WD3000FYYZ-01UL1B2_WD-WMC1F0E4X6WP"
17 ];
12 config.myServices.monitoring.activatedPlugins = [ "memory" "command" "bandwidth" "mdadm" "zfs" "notify-secondary" "smartctl" ]; 18 config.myServices.monitoring.activatedPlugins = [ "memory" "command" "bandwidth" "mdadm" "zfs" "notify-secondary" "smartctl" ];
13 config.myServices.monitoring.objects = lib.mkMerge [ 19 config.myServices.monitoring.objects = lib.mkMerge [
14 (monitoring.lib.objectsCommon { 20 (monitoring.lib.objectsCommon {
@@ -23,38 +29,6 @@ in
23 { 29 {
24 service = [ 30 service = [
25 { 31 {
26 service_description = "Disk /dev/disk/by-id/ata-Micron_1100_MTFDDAK512TBN_171216BD2A4B is sane";
27 use = "local-service";
28 check_command = [ "check_smartctl" "/dev/disk/by-id/ata-Micron_1100_MTFDDAK512TBN_171216BD2A4B" ];
29 __passive_servicegroups = "webstatus-resources";
30
31 check_interval = 60;
32 }
33 {
34 service_description = "Disk /dev/disk/by-id/ata-Micron_1100_MTFDDAK512TBN_171216BD2A70 is sane";
35 use = "local-service";
36 check_command = [ "check_smartctl" "/dev/disk/by-id/ata-Micron_1100_MTFDDAK512TBN_171216BD2A70" ];
37 __passive_servicegroups = "webstatus-resources";
38
39 check_interval = 60;
40 }
41 {
42 service_description = "Disk /dev/disk/by-id/ata-TOSHIBA_MG04ACA400N_96K1K87YFVLC is sane";
43 use = "local-service";
44 check_command = [ "check_smartctl" "/dev/disk/by-id/ata-TOSHIBA_MG04ACA400N_96K1K87YFVLC" ];
45 __passive_servicegroups = "webstatus-resources";
46
47 check_interval = 60;
48 }
49 {
50 service_description = "Disk /dev/disk/by-id/ata-WDC_WD3000FYYZ-01UL1B2_WD-WMC1F0E4X6WP is sane";
51 use = "local-service";
52 check_command = [ "check_smartctl" "/dev/disk/by-id/ata-WDC_WD3000FYYZ-01UL1B2_WD-WMC1F0E4X6WP" ];
53 __passive_servicegroups = "webstatus-resources";
54
55 check_interval = 60;
56 }
57 {
58 service_description = "No mdadm array is degraded"; 32 service_description = "No mdadm array is degraded";
59 use = "local-service"; 33 use = "local-service";
60 check_command = ["check_mdadm"]; 34 check_command = ["check_mdadm"];
diff --git a/systems/eldiron/flake.lock b/systems/eldiron/flake.lock
index 461bebb..27d4d5b 100644
--- a/systems/eldiron/flake.lock
+++ b/systems/eldiron/flake.lock
@@ -2038,7 +2038,7 @@
2038 }, 2038 },
2039 "locked": { 2039 "locked": {
2040 "lastModified": 1, 2040 "lastModified": 1,
2041 "narHash": "sha256-A50vXg0qfzUhyQZKToEseYsLgtaYke41KE/4uuyj+PY=", 2041 "narHash": "sha256-Lpe56lKWhlMQiQoCgvMJuqJtJ8+szDldjqMAGyt2U3U=",
2042 "path": "../../flakes/private/monitoring", 2042 "path": "../../flakes/private/monitoring",
2043 "type": "path" 2043 "type": "path"
2044 }, 2044 },
diff --git a/systems/eldiron/monitoring.nix b/systems/eldiron/monitoring.nix
index 92da7cf..f3b9aeb 100644
--- a/systems/eldiron/monitoring.nix
+++ b/systems/eldiron/monitoring.nix
@@ -4,6 +4,12 @@ let
4 emailCheck = monitoring.lib.emailCheck config.myEnv.monitoring.email_check; 4 emailCheck = monitoring.lib.emailCheck config.myEnv.monitoring.email_check;
5in 5in
6{ 6{
7 config.myServices.monitoring.smartdDisks = [
8 "ata-ST33000650NS_Z29540DM"
9 "ata-ST33000650NS_Z296JGJ4"
10 "ata-Micron_5200_MTFDDAK480TDC_18011BEE03B3"
11 ];
12
7 config.myServices.monitoring.activatedPlugins = [ "memory" "command" "bandwidth" "emails" "mdadm" "postfix" "postgresql" "zfs" "notify-secondary" "smartctl" ]; 13 config.myServices.monitoring.activatedPlugins = [ "memory" "command" "bandwidth" "emails" "mdadm" "postfix" "postgresql" "zfs" "notify-secondary" "smartctl" ];
8 config.myServices.monitoring.pluginsArgs.postgresql.package = config.myServices.databases.postgresql.package; 14 config.myServices.monitoring.pluginsArgs.postgresql.package = config.myServices.databases.postgresql.package;
9 config.myServices.monitoring.objects = lib.mkMerge [ 15 config.myServices.monitoring.objects = lib.mkMerge [
@@ -19,38 +25,6 @@ in
19 { 25 {
20 service = [ 26 service = [
21 { 27 {
22 service_description = "Disk /dev/disk/by-id/ata-ST33000650NS_Z29540DM is sane";
23 use = "local-service";
24 check_command = [ "check_smartctl" "/dev/disk/by-id/ata-ST33000650NS_Z29540DM" ];
25 __passive_servicegroups = "webstatus-resources";
26
27 check_interval = 60;
28 }
29 {
30 service_description = "Disk /dev/disk/by-id/ata-ST33000650NS_Z296JGJ4 is sane";
31 use = "local-service";
32 check_command = [ "check_smartctl" "/dev/disk/by-id/ata-ST33000650NS_Z296JGJ4" ];
33 __passive_servicegroups = "webstatus-resources";
34
35 check_interval = 60;
36 }
37 {
38 service_description = "Disk /dev/disk/by-id/ata-SAMSUNG_MZ7LM480HMHQ-00005_S2UJNX0HA05895 is sane";
39 use = "local-service";
40 check_command = [ "check_smartctl" "/dev/disk/by-id/ata-SAMSUNG_MZ7LM480HMHQ-00005_S2UJNX0HA05895" ];
41 __passive_servicegroups = "webstatus-resources";
42
43 check_interval = 60;
44 }
45 {
46 service_description = "Disk /dev/disk/by-id/ata-Micron_5200_MTFDDAK480TDC_18011BEE03B3 is sane";
47 use = "local-service";
48 check_command = [ "check_smartctl" "/dev/disk/by-id/ata-Micron_5200_MTFDDAK480TDC_18011BEE03B3" ];
49 __passive_servicegroups = "webstatus-resources";
50
51 check_interval = 60;
52 }
53 {
54 service_description = "No mdadm array is degraded"; 28 service_description = "No mdadm array is degraded";
55 use = "local-service"; 29 use = "local-service";
56 check_command = ["check_mdadm"]; 30 check_command = ["check_mdadm"];
diff --git a/systems/monitoring-1/flake.lock b/systems/monitoring-1/flake.lock
index 643683a..c69d09a 100644
--- a/systems/monitoring-1/flake.lock
+++ b/systems/monitoring-1/flake.lock
@@ -277,7 +277,7 @@
277 }, 277 },
278 "locked": { 278 "locked": {
279 "lastModified": 1, 279 "lastModified": 1,
280 "narHash": "sha256-A50vXg0qfzUhyQZKToEseYsLgtaYke41KE/4uuyj+PY=", 280 "narHash": "sha256-Lpe56lKWhlMQiQoCgvMJuqJtJ8+szDldjqMAGyt2U3U=",
281 "path": "../../flakes/private/monitoring", 281 "path": "../../flakes/private/monitoring",
282 "type": "path" 282 "type": "path"
283 }, 283 },
diff --git a/systems/quatresaisons/flake.lock b/systems/quatresaisons/flake.lock
index afb007b..4cb49da 100644
--- a/systems/quatresaisons/flake.lock
+++ b/systems/quatresaisons/flake.lock
@@ -239,7 +239,7 @@
239 }, 239 },
240 "locked": { 240 "locked": {
241 "lastModified": 1, 241 "lastModified": 1,
242 "narHash": "sha256-A50vXg0qfzUhyQZKToEseYsLgtaYke41KE/4uuyj+PY=", 242 "narHash": "sha256-Lpe56lKWhlMQiQoCgvMJuqJtJ8+szDldjqMAGyt2U3U=",
243 "path": "../../flakes/private/monitoring", 243 "path": "../../flakes/private/monitoring",
244 "type": "path" 244 "type": "path"
245 }, 245 },