aboutsummaryrefslogtreecommitdiff
path: root/flakes
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2024-12-28 15:18:44 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2025-03-14 00:57:49 +0100
commitee99bd561bcb5cb0d8f18c5290840280018c35db (patch)
treefda41fcf2628d41d9e51e52efdbaebaba2baca9b /flakes
parent31e6906d71fb5e2133dd91d55196048fcc387ea0 (diff)
downloadNix-ee99bd561bcb5cb0d8f18c5290840280018c35db.tar.gz
Nix-ee99bd561bcb5cb0d8f18c5290840280018c35db.tar.zst
Nix-ee99bd561bcb5cb0d8f18c5290840280018c35db.zip
Add docker monitoring
Diffstat (limited to 'flakes')
-rw-r--r--flakes/flake.lock22
-rw-r--r--flakes/private/monitoring/myplugins.nix9
2 files changed, 20 insertions, 11 deletions
diff --git a/flakes/flake.lock b/flakes/flake.lock
index f4ef8ce..8bb078a 100644
--- a/flakes/flake.lock
+++ b/flakes/flake.lock
@@ -2879,7 +2879,7 @@
2879 }, 2879 },
2880 "locked": { 2880 "locked": {
2881 "lastModified": 1, 2881 "lastModified": 1,
2882 "narHash": "sha256-hkZiW8Nyd9pNIXhV/AQaJZQ1peOvTBMD8zjEtSAkh3E=", 2882 "narHash": "sha256-d2Qc6vQHwjxXQqM76iLVNMFFux1HUZcpGZ8A8hPkYlE=",
2883 "path": "../../flakes/private/monitoring", 2883 "path": "../../flakes/private/monitoring",
2884 "type": "path" 2884 "type": "path"
2885 }, 2885 },
@@ -2897,7 +2897,7 @@
2897 }, 2897 },
2898 "locked": { 2898 "locked": {
2899 "lastModified": 1, 2899 "lastModified": 1,
2900 "narHash": "sha256-hkZiW8Nyd9pNIXhV/AQaJZQ1peOvTBMD8zjEtSAkh3E=", 2900 "narHash": "sha256-d2Qc6vQHwjxXQqM76iLVNMFFux1HUZcpGZ8A8hPkYlE=",
2901 "path": "../../flakes/private/monitoring", 2901 "path": "../../flakes/private/monitoring",
2902 "type": "path" 2902 "type": "path"
2903 }, 2903 },
@@ -2915,7 +2915,7 @@
2915 }, 2915 },
2916 "locked": { 2916 "locked": {
2917 "lastModified": 1, 2917 "lastModified": 1,
2918 "narHash": "sha256-hkZiW8Nyd9pNIXhV/AQaJZQ1peOvTBMD8zjEtSAkh3E=", 2918 "narHash": "sha256-d2Qc6vQHwjxXQqM76iLVNMFFux1HUZcpGZ8A8hPkYlE=",
2919 "path": "../../flakes/private/monitoring", 2919 "path": "../../flakes/private/monitoring",
2920 "type": "path" 2920 "type": "path"
2921 }, 2921 },
@@ -2933,7 +2933,7 @@
2933 }, 2933 },
2934 "locked": { 2934 "locked": {
2935 "lastModified": 1, 2935 "lastModified": 1,
2936 "narHash": "sha256-hkZiW8Nyd9pNIXhV/AQaJZQ1peOvTBMD8zjEtSAkh3E=", 2936 "narHash": "sha256-d2Qc6vQHwjxXQqM76iLVNMFFux1HUZcpGZ8A8hPkYlE=",
2937 "path": "../../flakes/private/monitoring", 2937 "path": "../../flakes/private/monitoring",
2938 "type": "path" 2938 "type": "path"
2939 }, 2939 },
@@ -3818,7 +3818,7 @@
3818 }, 3818 },
3819 "locked": { 3819 "locked": {
3820 "lastModified": 1, 3820 "lastModified": 1,
3821 "narHash": "sha256-0vnHkdR8S1iOAjNl4pQx/Tehv43IfkTw30momDbDWyE=", 3821 "narHash": "sha256-aax6Z1sVT/lrE2m8m3jBqARvTeWIAYH/uREB4rsG8DE=",
3822 "path": "../systems/backup-2", 3822 "path": "../systems/backup-2",
3823 "type": "path" 3823 "type": "path"
3824 }, 3824 },
@@ -3841,7 +3841,7 @@
3841 }, 3841 },
3842 "locked": { 3842 "locked": {
3843 "lastModified": 1, 3843 "lastModified": 1,
3844 "narHash": "sha256-yvKk12foLp674+D3Px375wKXwNLzyDZACcFKGfuXbyA=", 3844 "narHash": "sha256-6wAjFkH4EorMqgc191UHi229tVyBYC12rgMZycl7z+I=",
3845 "path": "../systems/dilion", 3845 "path": "../systems/dilion",
3846 "type": "path" 3846 "type": "path"
3847 }, 3847 },
@@ -3890,7 +3890,7 @@
3890 }, 3890 },
3891 "locked": { 3891 "locked": {
3892 "lastModified": 1, 3892 "lastModified": 1,
3893 "narHash": "sha256-wSzIBw/JAmFJZbbwgTFblmQA/ih9V76fBNA3W1BXJWY=", 3893 "narHash": "sha256-YKt1XSuZA8YlbwmjMXxxaDLFrTRIg59n27zTfL6PaYI=",
3894 "path": "../systems/eldiron", 3894 "path": "../systems/eldiron",
3895 "type": "path" 3895 "type": "path"
3896 }, 3896 },
@@ -3916,7 +3916,7 @@
3916 }, 3916 },
3917 "locked": { 3917 "locked": {
3918 "lastModified": 1, 3918 "lastModified": 1,
3919 "narHash": "sha256-lkrE2Y9Ya5oP8SLmmmljozrO+0pEfByhGVbQ4XalfjM=", 3919 "narHash": "sha256-198sk6NzIod5HiYb7TR7yn8g3DY7hkh6c+IDn+U58AA=",
3920 "path": "../systems/monitoring-1", 3920 "path": "../systems/monitoring-1",
3921 "type": "path" 3921 "type": "path"
3922 }, 3922 },
@@ -3941,7 +3941,7 @@
3941 }, 3941 },
3942 "locked": { 3942 "locked": {
3943 "lastModified": 1, 3943 "lastModified": 1,
3944 "narHash": "sha256-lxvsI72fuXV7Br9GU0FmP0L9AG9R7MFSEQJFRK8lwMk=", 3944 "narHash": "sha256-LFk9TW3iRxWsxtITf7PqlqeJ9S5JkBB41R46eVydnN8=",
3945 "path": "../systems/quatresaisons", 3945 "path": "../systems/quatresaisons",
3946 "type": "path" 3946 "type": "path"
3947 }, 3947 },
@@ -7483,7 +7483,7 @@
7483 }, 7483 },
7484 "locked": { 7484 "locked": {
7485 "lastModified": 1, 7485 "lastModified": 1,
7486 "narHash": "sha256-hkZiW8Nyd9pNIXhV/AQaJZQ1peOvTBMD8zjEtSAkh3E=", 7486 "narHash": "sha256-d2Qc6vQHwjxXQqM76iLVNMFFux1HUZcpGZ8A8hPkYlE=",
7487 "path": "../../flakes/private/monitoring", 7487 "path": "../../flakes/private/monitoring",
7488 "type": "path" 7488 "type": "path"
7489 }, 7489 },
@@ -8410,7 +8410,7 @@
8410 }, 8410 },
8411 "locked": { 8411 "locked": {
8412 "lastModified": 1, 8412 "lastModified": 1,
8413 "narHash": "sha256-hkZiW8Nyd9pNIXhV/AQaJZQ1peOvTBMD8zjEtSAkh3E=", 8413 "narHash": "sha256-d2Qc6vQHwjxXQqM76iLVNMFFux1HUZcpGZ8A8hPkYlE=",
8414 "path": "./private/monitoring", 8414 "path": "./private/monitoring",
8415 "type": "path" 8415 "type": "path"
8416 }, 8416 },
diff --git a/flakes/private/monitoring/myplugins.nix b/flakes/private/monitoring/myplugins.nix
index bb3a383..eb2fbd1 100644
--- a/flakes/private/monitoring/myplugins.nix
+++ b/flakes/private/monitoring/myplugins.nix
@@ -3,6 +3,9 @@ let
3 cfg = config.myServices.monitoring; 3 cfg = config.myServices.monitoring;
4in 4in
5{ 5{
6 base = {
7 debianPackages = [ "perl" "naemon-core" ];
8 };
6 notify-secondary = { 9 notify-secondary = {
7 resources = { 10 resources = {
8 USER200 = config.myEnv.monitoring.status_url; 11 USER200 = config.myEnv.monitoring.status_url;
@@ -18,6 +21,8 @@ in
18 pkgs.curl pkgs.jq 21 pkgs.curl pkgs.jq
19 ]} 22 ]}
20 ''; 23 '';
24 debianScript = "${./plugins}/send_nrdp.sh";
25 debianPackages = [ "curl" "jq" ];
21 }; 26 };
22 notify-primary = { 27 notify-primary = {
23 resources = { 28 resources = {
@@ -53,6 +58,8 @@ in
53 pkgs.iproute pkgs.bc 58 pkgs.iproute pkgs.bc
54 ]} 59 ]}
55 ''; 60 '';
61 debianScript = "${./plugins}/check_bandwidth";
62 debianPackages = [ "bc" "iproute2" ];
56 }; 63 };
57 command = { 64 command = {
58 commands = { 65 commands = {
@@ -283,6 +290,8 @@ in
283 pkgs.gnugrep pkgs.gawk pkgs.procps 290 pkgs.gnugrep pkgs.gawk pkgs.procps
284 ]} 291 ]}
285 ''; 292 '';
293 debianScript = "${./plugins}/check_mem.sh";
294 debianPackages = [ "grep" "mawk" "procps" ];
286 }; 295 };
287 smartctl = { 296 smartctl = {
288 commands = { 297 commands = {