aboutsummaryrefslogtreecommitdiff
path: root/systems/dilion
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2024-04-13 12:39:31 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2024-04-13 12:44:20 +0200
commit408ce9363bf574796487fedfe59a4a2ff0cbb4cb (patch)
tree6085dd71a94e760d665be2a721a53302350c8e11 /systems/dilion
parentd1527470d38cfbd439c4da83c73ef68b02e9de9a (diff)
downloadNix-master.tar.gz
Nix-master.tar.zst
Nix-master.zip
Add monitoring script with smartctlHEADmaster
Diffstat (limited to 'systems/dilion')
-rw-r--r--systems/dilion/flake.lock2
-rw-r--r--systems/dilion/monitoring.nix34
2 files changed, 34 insertions, 2 deletions
diff --git a/systems/dilion/flake.lock b/systems/dilion/flake.lock
index 3096384..a690504 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-PicwNqwQaCKtN5zPpTfpSDRXbyn9xh8aHqoPnm9cFz8=", 210 "narHash": "sha256-A50vXg0qfzUhyQZKToEseYsLgtaYke41KE/4uuyj+PY=",
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 af7f224..5c4e5b0 100644
--- a/systems/dilion/monitoring.nix
+++ b/systems/dilion/monitoring.nix
@@ -9,7 +9,7 @@ let
9 }; 9 };
10in 10in
11{ 11{
12 config.myServices.monitoring.activatedPlugins = [ "memory" "command" "bandwidth" "mdadm" "zfs" "notify-secondary"]; 12 config.myServices.monitoring.activatedPlugins = [ "memory" "command" "bandwidth" "mdadm" "zfs" "notify-secondary" "smartctl" ];
13 config.myServices.monitoring.objects = lib.mkMerge [ 13 config.myServices.monitoring.objects = lib.mkMerge [
14 (monitoring.lib.objectsCommon { 14 (monitoring.lib.objectsCommon {
15 inherit hostFQDN; 15 inherit hostFQDN;
@@ -23,6 +23,38 @@ in
23 { 23 {
24 service = [ 24 service = [
25 { 25 {
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 {
26 service_description = "No mdadm array is degraded"; 58 service_description = "No mdadm array is degraded";
27 use = "local-service"; 59 use = "local-service";
28 check_command = ["check_mdadm"]; 60 check_command = ["check_mdadm"];