diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2024-12-28 15:18:44 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2025-03-14 00:57:49 +0100 |
commit | ee99bd561bcb5cb0d8f18c5290840280018c35db (patch) | |
tree | fda41fcf2628d41d9e51e52efdbaebaba2baca9b | |
parent | 31e6906d71fb5e2133dd91d55196048fcc387ea0 (diff) | |
download | Nix-ee99bd561bcb5cb0d8f18c5290840280018c35db.tar.gz Nix-ee99bd561bcb5cb0d8f18c5290840280018c35db.tar.zst Nix-ee99bd561bcb5cb0d8f18c5290840280018c35db.zip |
Add docker monitoring
-rw-r--r-- | deploy/flake.lock | 24 | ||||
-rw-r--r-- | flake.lock | 24 | ||||
-rw-r--r-- | flakes/flake.lock | 22 | ||||
-rw-r--r-- | flakes/private/monitoring/myplugins.nix | 9 | ||||
-rw-r--r-- | systems/backup-2/flake.lock | 2 | ||||
-rw-r--r-- | systems/dilion/flake.lock | 2 | ||||
-rw-r--r-- | systems/eldiron/flake.lock | 2 | ||||
-rw-r--r-- | systems/monitoring-1/flake.lock | 2 | ||||
-rw-r--r-- | systems/monitoring-1/monitoring-master.nix | 4 | ||||
-rw-r--r-- | systems/monitoring-1/monitoring/Dockerfile | 35 | ||||
-rw-r--r-- | systems/monitoring-1/monitoring/docker-compose.yml | 15 | ||||
-rw-r--r-- | systems/monitoring-1/monitoring/env.example | 5 | ||||
-rw-r--r-- | systems/monitoring-1/monitoring/run.sh | 47 | ||||
-rw-r--r-- | systems/quatresaisons/flake.lock | 2 |
14 files changed, 155 insertions, 40 deletions
diff --git a/deploy/flake.lock b/deploy/flake.lock index 73a5133..b7752d6 100644 --- a/deploy/flake.lock +++ b/deploy/flake.lock | |||
@@ -2848,7 +2848,7 @@ | |||
2848 | }, | 2848 | }, |
2849 | "locked": { | 2849 | "locked": { |
2850 | "lastModified": 1, | 2850 | "lastModified": 1, |
2851 | "narHash": "sha256-d1iovH1gC8LTiZn5mCbkdjHRofv6828zpPS0bcZz/Ec=", | 2851 | "narHash": "sha256-T9X0wbPED2Hk7lF7qb+3EtWcgfuzZiqHy5m2sSa4g8w=", |
2852 | "path": "../flakes", | 2852 | "path": "../flakes", |
2853 | "type": "path" | 2853 | "type": "path" |
2854 | }, | 2854 | }, |
@@ -2959,7 +2959,7 @@ | |||
2959 | }, | 2959 | }, |
2960 | "locked": { | 2960 | "locked": { |
2961 | "lastModified": 1, | 2961 | "lastModified": 1, |
2962 | "narHash": "sha256-hkZiW8Nyd9pNIXhV/AQaJZQ1peOvTBMD8zjEtSAkh3E=", | 2962 | "narHash": "sha256-d2Qc6vQHwjxXQqM76iLVNMFFux1HUZcpGZ8A8hPkYlE=", |
2963 | "path": "../../flakes/private/monitoring", | 2963 | "path": "../../flakes/private/monitoring", |
2964 | "type": "path" | 2964 | "type": "path" |
2965 | }, | 2965 | }, |
@@ -2977,7 +2977,7 @@ | |||
2977 | }, | 2977 | }, |
2978 | "locked": { | 2978 | "locked": { |
2979 | "lastModified": 1, | 2979 | "lastModified": 1, |
2980 | "narHash": "sha256-hkZiW8Nyd9pNIXhV/AQaJZQ1peOvTBMD8zjEtSAkh3E=", | 2980 | "narHash": "sha256-d2Qc6vQHwjxXQqM76iLVNMFFux1HUZcpGZ8A8hPkYlE=", |
2981 | "path": "../../flakes/private/monitoring", | 2981 | "path": "../../flakes/private/monitoring", |
2982 | "type": "path" | 2982 | "type": "path" |
2983 | }, | 2983 | }, |
@@ -2995,7 +2995,7 @@ | |||
2995 | }, | 2995 | }, |
2996 | "locked": { | 2996 | "locked": { |
2997 | "lastModified": 1, | 2997 | "lastModified": 1, |
2998 | "narHash": "sha256-hkZiW8Nyd9pNIXhV/AQaJZQ1peOvTBMD8zjEtSAkh3E=", | 2998 | "narHash": "sha256-d2Qc6vQHwjxXQqM76iLVNMFFux1HUZcpGZ8A8hPkYlE=", |
2999 | "path": "../../flakes/private/monitoring", | 2999 | "path": "../../flakes/private/monitoring", |
3000 | "type": "path" | 3000 | "type": "path" |
3001 | }, | 3001 | }, |
@@ -3013,7 +3013,7 @@ | |||
3013 | }, | 3013 | }, |
3014 | "locked": { | 3014 | "locked": { |
3015 | "lastModified": 1, | 3015 | "lastModified": 1, |
3016 | "narHash": "sha256-hkZiW8Nyd9pNIXhV/AQaJZQ1peOvTBMD8zjEtSAkh3E=", | 3016 | "narHash": "sha256-d2Qc6vQHwjxXQqM76iLVNMFFux1HUZcpGZ8A8hPkYlE=", |
3017 | "path": "../../flakes/private/monitoring", | 3017 | "path": "../../flakes/private/monitoring", |
3018 | "type": "path" | 3018 | "type": "path" |
3019 | }, | 3019 | }, |
@@ -3898,7 +3898,7 @@ | |||
3898 | }, | 3898 | }, |
3899 | "locked": { | 3899 | "locked": { |
3900 | "lastModified": 1, | 3900 | "lastModified": 1, |
3901 | "narHash": "sha256-0vnHkdR8S1iOAjNl4pQx/Tehv43IfkTw30momDbDWyE=", | 3901 | "narHash": "sha256-aax6Z1sVT/lrE2m8m3jBqARvTeWIAYH/uREB4rsG8DE=", |
3902 | "path": "../systems/backup-2", | 3902 | "path": "../systems/backup-2", |
3903 | "type": "path" | 3903 | "type": "path" |
3904 | }, | 3904 | }, |
@@ -3921,7 +3921,7 @@ | |||
3921 | }, | 3921 | }, |
3922 | "locked": { | 3922 | "locked": { |
3923 | "lastModified": 1, | 3923 | "lastModified": 1, |
3924 | "narHash": "sha256-yvKk12foLp674+D3Px375wKXwNLzyDZACcFKGfuXbyA=", | 3924 | "narHash": "sha256-6wAjFkH4EorMqgc191UHi229tVyBYC12rgMZycl7z+I=", |
3925 | "path": "../systems/dilion", | 3925 | "path": "../systems/dilion", |
3926 | "type": "path" | 3926 | "type": "path" |
3927 | }, | 3927 | }, |
@@ -3970,7 +3970,7 @@ | |||
3970 | }, | 3970 | }, |
3971 | "locked": { | 3971 | "locked": { |
3972 | "lastModified": 1, | 3972 | "lastModified": 1, |
3973 | "narHash": "sha256-wSzIBw/JAmFJZbbwgTFblmQA/ih9V76fBNA3W1BXJWY=", | 3973 | "narHash": "sha256-YKt1XSuZA8YlbwmjMXxxaDLFrTRIg59n27zTfL6PaYI=", |
3974 | "path": "../systems/eldiron", | 3974 | "path": "../systems/eldiron", |
3975 | "type": "path" | 3975 | "type": "path" |
3976 | }, | 3976 | }, |
@@ -3996,7 +3996,7 @@ | |||
3996 | }, | 3996 | }, |
3997 | "locked": { | 3997 | "locked": { |
3998 | "lastModified": 1, | 3998 | "lastModified": 1, |
3999 | "narHash": "sha256-lkrE2Y9Ya5oP8SLmmmljozrO+0pEfByhGVbQ4XalfjM=", | 3999 | "narHash": "sha256-198sk6NzIod5HiYb7TR7yn8g3DY7hkh6c+IDn+U58AA=", |
4000 | "path": "../systems/monitoring-1", | 4000 | "path": "../systems/monitoring-1", |
4001 | "type": "path" | 4001 | "type": "path" |
4002 | }, | 4002 | }, |
@@ -4021,7 +4021,7 @@ | |||
4021 | }, | 4021 | }, |
4022 | "locked": { | 4022 | "locked": { |
4023 | "lastModified": 1, | 4023 | "lastModified": 1, |
4024 | "narHash": "sha256-lxvsI72fuXV7Br9GU0FmP0L9AG9R7MFSEQJFRK8lwMk=", | 4024 | "narHash": "sha256-LFk9TW3iRxWsxtITf7PqlqeJ9S5JkBB41R46eVydnN8=", |
4025 | "path": "../systems/quatresaisons", | 4025 | "path": "../systems/quatresaisons", |
4026 | "type": "path" | 4026 | "type": "path" |
4027 | }, | 4027 | }, |
@@ -7641,7 +7641,7 @@ | |||
7641 | }, | 7641 | }, |
7642 | "locked": { | 7642 | "locked": { |
7643 | "lastModified": 1, | 7643 | "lastModified": 1, |
7644 | "narHash": "sha256-hkZiW8Nyd9pNIXhV/AQaJZQ1peOvTBMD8zjEtSAkh3E=", | 7644 | "narHash": "sha256-d2Qc6vQHwjxXQqM76iLVNMFFux1HUZcpGZ8A8hPkYlE=", |
7645 | "path": "../../flakes/private/monitoring", | 7645 | "path": "../../flakes/private/monitoring", |
7646 | "type": "path" | 7646 | "type": "path" |
7647 | }, | 7647 | }, |
@@ -8528,7 +8528,7 @@ | |||
8528 | }, | 8528 | }, |
8529 | "locked": { | 8529 | "locked": { |
8530 | "lastModified": 1, | 8530 | "lastModified": 1, |
8531 | "narHash": "sha256-hkZiW8Nyd9pNIXhV/AQaJZQ1peOvTBMD8zjEtSAkh3E=", | 8531 | "narHash": "sha256-d2Qc6vQHwjxXQqM76iLVNMFFux1HUZcpGZ8A8hPkYlE=", |
8532 | "path": "./private/monitoring", | 8532 | "path": "./private/monitoring", |
8533 | "type": "path" | 8533 | "type": "path" |
8534 | }, | 8534 | }, |
@@ -2729,7 +2729,7 @@ | |||
2729 | }, | 2729 | }, |
2730 | "locked": { | 2730 | "locked": { |
2731 | "lastModified": 1, | 2731 | "lastModified": 1, |
2732 | "narHash": "sha256-d1iovH1gC8LTiZn5mCbkdjHRofv6828zpPS0bcZz/Ec=", | 2732 | "narHash": "sha256-T9X0wbPED2Hk7lF7qb+3EtWcgfuzZiqHy5m2sSa4g8w=", |
2733 | "path": "./flakes", | 2733 | "path": "./flakes", |
2734 | "type": "path" | 2734 | "type": "path" |
2735 | }, | 2735 | }, |
@@ -2975,7 +2975,7 @@ | |||
2975 | }, | 2975 | }, |
2976 | "locked": { | 2976 | "locked": { |
2977 | "lastModified": 1, | 2977 | "lastModified": 1, |
2978 | "narHash": "sha256-hkZiW8Nyd9pNIXhV/AQaJZQ1peOvTBMD8zjEtSAkh3E=", | 2978 | "narHash": "sha256-d2Qc6vQHwjxXQqM76iLVNMFFux1HUZcpGZ8A8hPkYlE=", |
2979 | "path": "../../flakes/private/monitoring", | 2979 | "path": "../../flakes/private/monitoring", |
2980 | "type": "path" | 2980 | "type": "path" |
2981 | }, | 2981 | }, |
@@ -2993,7 +2993,7 @@ | |||
2993 | }, | 2993 | }, |
2994 | "locked": { | 2994 | "locked": { |
2995 | "lastModified": 1, | 2995 | "lastModified": 1, |
2996 | "narHash": "sha256-hkZiW8Nyd9pNIXhV/AQaJZQ1peOvTBMD8zjEtSAkh3E=", | 2996 | "narHash": "sha256-d2Qc6vQHwjxXQqM76iLVNMFFux1HUZcpGZ8A8hPkYlE=", |
2997 | "path": "../../flakes/private/monitoring", | 2997 | "path": "../../flakes/private/monitoring", |
2998 | "type": "path" | 2998 | "type": "path" |
2999 | }, | 2999 | }, |
@@ -3011,7 +3011,7 @@ | |||
3011 | }, | 3011 | }, |
3012 | "locked": { | 3012 | "locked": { |
3013 | "lastModified": 1, | 3013 | "lastModified": 1, |
3014 | "narHash": "sha256-hkZiW8Nyd9pNIXhV/AQaJZQ1peOvTBMD8zjEtSAkh3E=", | 3014 | "narHash": "sha256-d2Qc6vQHwjxXQqM76iLVNMFFux1HUZcpGZ8A8hPkYlE=", |
3015 | "path": "../../flakes/private/monitoring", | 3015 | "path": "../../flakes/private/monitoring", |
3016 | "type": "path" | 3016 | "type": "path" |
3017 | }, | 3017 | }, |
@@ -3029,7 +3029,7 @@ | |||
3029 | }, | 3029 | }, |
3030 | "locked": { | 3030 | "locked": { |
3031 | "lastModified": 1, | 3031 | "lastModified": 1, |
3032 | "narHash": "sha256-hkZiW8Nyd9pNIXhV/AQaJZQ1peOvTBMD8zjEtSAkh3E=", | 3032 | "narHash": "sha256-d2Qc6vQHwjxXQqM76iLVNMFFux1HUZcpGZ8A8hPkYlE=", |
3033 | "path": "../../flakes/private/monitoring", | 3033 | "path": "../../flakes/private/monitoring", |
3034 | "type": "path" | 3034 | "type": "path" |
3035 | }, | 3035 | }, |
@@ -3914,7 +3914,7 @@ | |||
3914 | }, | 3914 | }, |
3915 | "locked": { | 3915 | "locked": { |
3916 | "lastModified": 1, | 3916 | "lastModified": 1, |
3917 | "narHash": "sha256-0vnHkdR8S1iOAjNl4pQx/Tehv43IfkTw30momDbDWyE=", | 3917 | "narHash": "sha256-aax6Z1sVT/lrE2m8m3jBqARvTeWIAYH/uREB4rsG8DE=", |
3918 | "path": "../systems/backup-2", | 3918 | "path": "../systems/backup-2", |
3919 | "type": "path" | 3919 | "type": "path" |
3920 | }, | 3920 | }, |
@@ -3937,7 +3937,7 @@ | |||
3937 | }, | 3937 | }, |
3938 | "locked": { | 3938 | "locked": { |
3939 | "lastModified": 1, | 3939 | "lastModified": 1, |
3940 | "narHash": "sha256-yvKk12foLp674+D3Px375wKXwNLzyDZACcFKGfuXbyA=", | 3940 | "narHash": "sha256-6wAjFkH4EorMqgc191UHi229tVyBYC12rgMZycl7z+I=", |
3941 | "path": "../systems/dilion", | 3941 | "path": "../systems/dilion", |
3942 | "type": "path" | 3942 | "type": "path" |
3943 | }, | 3943 | }, |
@@ -3986,7 +3986,7 @@ | |||
3986 | }, | 3986 | }, |
3987 | "locked": { | 3987 | "locked": { |
3988 | "lastModified": 1, | 3988 | "lastModified": 1, |
3989 | "narHash": "sha256-wSzIBw/JAmFJZbbwgTFblmQA/ih9V76fBNA3W1BXJWY=", | 3989 | "narHash": "sha256-YKt1XSuZA8YlbwmjMXxxaDLFrTRIg59n27zTfL6PaYI=", |
3990 | "path": "../systems/eldiron", | 3990 | "path": "../systems/eldiron", |
3991 | "type": "path" | 3991 | "type": "path" |
3992 | }, | 3992 | }, |
@@ -4012,7 +4012,7 @@ | |||
4012 | }, | 4012 | }, |
4013 | "locked": { | 4013 | "locked": { |
4014 | "lastModified": 1, | 4014 | "lastModified": 1, |
4015 | "narHash": "sha256-lkrE2Y9Ya5oP8SLmmmljozrO+0pEfByhGVbQ4XalfjM=", | 4015 | "narHash": "sha256-198sk6NzIod5HiYb7TR7yn8g3DY7hkh6c+IDn+U58AA=", |
4016 | "path": "../systems/monitoring-1", | 4016 | "path": "../systems/monitoring-1", |
4017 | "type": "path" | 4017 | "type": "path" |
4018 | }, | 4018 | }, |
@@ -4037,7 +4037,7 @@ | |||
4037 | }, | 4037 | }, |
4038 | "locked": { | 4038 | "locked": { |
4039 | "lastModified": 1, | 4039 | "lastModified": 1, |
4040 | "narHash": "sha256-lxvsI72fuXV7Br9GU0FmP0L9AG9R7MFSEQJFRK8lwMk=", | 4040 | "narHash": "sha256-LFk9TW3iRxWsxtITf7PqlqeJ9S5JkBB41R46eVydnN8=", |
4041 | "path": "../systems/quatresaisons", | 4041 | "path": "../systems/quatresaisons", |
4042 | "type": "path" | 4042 | "type": "path" |
4043 | }, | 4043 | }, |
@@ -7657,7 +7657,7 @@ | |||
7657 | }, | 7657 | }, |
7658 | "locked": { | 7658 | "locked": { |
7659 | "lastModified": 1, | 7659 | "lastModified": 1, |
7660 | "narHash": "sha256-hkZiW8Nyd9pNIXhV/AQaJZQ1peOvTBMD8zjEtSAkh3E=", | 7660 | "narHash": "sha256-d2Qc6vQHwjxXQqM76iLVNMFFux1HUZcpGZ8A8hPkYlE=", |
7661 | "path": "../../flakes/private/monitoring", | 7661 | "path": "../../flakes/private/monitoring", |
7662 | "type": "path" | 7662 | "type": "path" |
7663 | }, | 7663 | }, |
@@ -8544,7 +8544,7 @@ | |||
8544 | }, | 8544 | }, |
8545 | "locked": { | 8545 | "locked": { |
8546 | "lastModified": 1, | 8546 | "lastModified": 1, |
8547 | "narHash": "sha256-hkZiW8Nyd9pNIXhV/AQaJZQ1peOvTBMD8zjEtSAkh3E=", | 8547 | "narHash": "sha256-d2Qc6vQHwjxXQqM76iLVNMFFux1HUZcpGZ8A8hPkYlE=", |
8548 | "path": "./private/monitoring", | 8548 | "path": "./private/monitoring", |
8549 | "type": "path" | 8549 | "type": "path" |
8550 | }, | 8550 | }, |
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; |
4 | in | 4 | in |
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 = { |
diff --git a/systems/backup-2/flake.lock b/systems/backup-2/flake.lock index c2a087b..5a21b51 100644 --- a/systems/backup-2/flake.lock +++ b/systems/backup-2/flake.lock | |||
@@ -417,7 +417,7 @@ | |||
417 | }, | 417 | }, |
418 | "locked": { | 418 | "locked": { |
419 | "lastModified": 1, | 419 | "lastModified": 1, |
420 | "narHash": "sha256-hkZiW8Nyd9pNIXhV/AQaJZQ1peOvTBMD8zjEtSAkh3E=", | 420 | "narHash": "sha256-d2Qc6vQHwjxXQqM76iLVNMFFux1HUZcpGZ8A8hPkYlE=", |
421 | "path": "../../flakes/private/monitoring", | 421 | "path": "../../flakes/private/monitoring", |
422 | "type": "path" | 422 | "type": "path" |
423 | }, | 423 | }, |
diff --git a/systems/dilion/flake.lock b/systems/dilion/flake.lock index 0156cab..c55de32 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-hkZiW8Nyd9pNIXhV/AQaJZQ1peOvTBMD8zjEtSAkh3E=", | 210 | "narHash": "sha256-d2Qc6vQHwjxXQqM76iLVNMFFux1HUZcpGZ8A8hPkYlE=", |
211 | "path": "../../flakes/private/monitoring", | 211 | "path": "../../flakes/private/monitoring", |
212 | "type": "path" | 212 | "type": "path" |
213 | }, | 213 | }, |
diff --git a/systems/eldiron/flake.lock b/systems/eldiron/flake.lock index 8392aa7..52b9d03 100644 --- a/systems/eldiron/flake.lock +++ b/systems/eldiron/flake.lock | |||
@@ -2066,7 +2066,7 @@ | |||
2066 | }, | 2066 | }, |
2067 | "locked": { | 2067 | "locked": { |
2068 | "lastModified": 1, | 2068 | "lastModified": 1, |
2069 | "narHash": "sha256-hkZiW8Nyd9pNIXhV/AQaJZQ1peOvTBMD8zjEtSAkh3E=", | 2069 | "narHash": "sha256-d2Qc6vQHwjxXQqM76iLVNMFFux1HUZcpGZ8A8hPkYlE=", |
2070 | "path": "../../flakes/private/monitoring", | 2070 | "path": "../../flakes/private/monitoring", |
2071 | "type": "path" | 2071 | "type": "path" |
2072 | }, | 2072 | }, |
diff --git a/systems/monitoring-1/flake.lock b/systems/monitoring-1/flake.lock index eb2e4a9..5685340 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-hkZiW8Nyd9pNIXhV/AQaJZQ1peOvTBMD8zjEtSAkh3E=", | 280 | "narHash": "sha256-d2Qc6vQHwjxXQqM76iLVNMFFux1HUZcpGZ8A8hPkYlE=", |
281 | "path": "../../flakes/private/monitoring", | 281 | "path": "../../flakes/private/monitoring", |
282 | "type": "path" | 282 | "type": "path" |
283 | }, | 283 | }, |
diff --git a/systems/monitoring-1/monitoring-master.nix b/systems/monitoring-1/monitoring-master.nix index e9362d9..6981672 100644 --- a/systems/monitoring-1/monitoring-master.nix +++ b/systems/monitoring-1/monitoring-master.nix | |||
@@ -66,6 +66,10 @@ in | |||
66 | $USER201$=@@TOKEN@@ | 66 | $USER201$=@@TOKEN@@ |
67 | ''; | 67 | ''; |
68 | }; | 68 | }; |
69 | "=/common/.env.example".alias = ./monitoring/env.example; | ||
70 | "=/common/docker-compose.yml".alias = ./monitoring/docker-compose.yml; | ||
71 | "=/common/Dockerfile".alias = ./monitoring/Dockerfile; | ||
72 | "=/common/run.sh".alias = ./monitoring/run.sh; | ||
69 | }; | 73 | }; |
70 | }; | 74 | }; |
71 | 75 | ||
diff --git a/systems/monitoring-1/monitoring/Dockerfile b/systems/monitoring-1/monitoring/Dockerfile new file mode 100644 index 0000000..4bbf01b --- /dev/null +++ b/systems/monitoring-1/monitoring/Dockerfile | |||
@@ -0,0 +1,35 @@ | |||
1 | FROM debian:bookworm | ||
2 | |||
3 | ARG namespace | ||
4 | |||
5 | RUN \ | ||
6 | apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
7 | curl \ | ||
8 | gnupg | ||
9 | |||
10 | RUN \ | ||
11 | curl -s "https://build.opensuse.org/projects/home:naemon/signing_keys/download?kind=gpg" | gpg --dearmor > /usr/share/keyrings/naemon.gpg \ | ||
12 | && echo "deb [signed-by=/usr/share/keyrings/naemon.gpg] https://download.opensuse.org/repositories/home:/naemon/Debian_12/ ./" >> /etc/apt/sources.list.d/naemon-stable.list | ||
13 | |||
14 | # Install the baseline packages for this image. Note, these | ||
15 | # packages are not version controlled and may change between | ||
16 | # builds. | ||
17 | RUN apt-get update && \ | ||
18 | DEBIAN_FRONTEND=noninteractive \ | ||
19 | # La liste des packages debian à installer est directement fournie par Immae | ||
20 | apt-get install -y $(curl https://status.immae.eu/$namespace/debian-packages) | ||
21 | |||
22 | # Perform the data directory initialization | ||
23 | RUN mkdir -p /data/var/log/naemon \ | ||
24 | && rm -rf /var/log/naemon \ | ||
25 | && ln -s /data/var/log/naemon /var/log/naemon \ | ||
26 | && find /etc/naemon -type f -not -name "naemon.cfg" -delete | ||
27 | |||
28 | # Add the bootstrap script | ||
29 | RUN curl https://status.immae.eu/common/run.sh > /run.sh | ||
30 | RUN chmod 755 /run.sh | ||
31 | |||
32 | # All data is stored on the root data volme | ||
33 | VOLUME ["/data"] | ||
34 | |||
35 | ENTRYPOINT ["/run.sh"] | ||
diff --git a/systems/monitoring-1/monitoring/docker-compose.yml b/systems/monitoring-1/monitoring/docker-compose.yml new file mode 100644 index 0000000..b369463 --- /dev/null +++ b/systems/monitoring-1/monitoring/docker-compose.yml | |||
@@ -0,0 +1,15 @@ | |||
1 | services: | ||
2 | naemon: | ||
3 | build: | ||
4 | context: https://status.immae.eu/common/Dockerfile | ||
5 | args: | ||
6 | - namespace=${NAMESPACE} | ||
7 | container_name: naemon | ||
8 | restart: unless-stopped | ||
9 | environment: | ||
10 | - NOTIFY_REMOTE_TOKEN=${NOTIFY_REMOTE_TOKEN} | ||
11 | - NAMESPACE=${NAMESPACE} | ||
12 | pid: host | ||
13 | network_mode: host | ||
14 | volumes: | ||
15 | - ./data/log:/data/var/log/naemon | ||
diff --git a/systems/monitoring-1/monitoring/env.example b/systems/monitoring-1/monitoring/env.example new file mode 100644 index 0000000..bace5a5 --- /dev/null +++ b/systems/monitoring-1/monitoring/env.example | |||
@@ -0,0 +1,5 @@ | |||
1 | # Les deux variables ci-dessous sont à demander à Immae | ||
2 | # Token pour notifier le serveur distant (immae) | ||
3 | NOTIFY_REMOTE_TOKEN= | ||
4 | # Namespace sur immae.eu | ||
5 | NAMESPACE= | ||
diff --git a/systems/monitoring-1/monitoring/run.sh b/systems/monitoring-1/monitoring/run.sh new file mode 100644 index 0000000..9a57990 --- /dev/null +++ b/systems/monitoring-1/monitoring/run.sh | |||
@@ -0,0 +1,47 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | function graceful_exit(){ | ||
4 | # Note, "service naemon stop" does not work in the phusion image | ||
5 | # We just kill the process rather than chase this down. | ||
6 | pkill naemon | ||
7 | exit $1 | ||
8 | } | ||
9 | |||
10 | # Recup fichiers Ismael | ||
11 | if [ -n "$NAMESPACE" ]; then | ||
12 | echo "Namespace: $NAMESPACE" | ||
13 | else | ||
14 | echo "Le namespace n'a pas été défini dans \$NAMESPACE." | ||
15 | exit 1 | ||
16 | fi | ||
17 | |||
18 | curl -o /etc/naemon/conf.d/objects.cfg "https://status.immae.eu/$NAMESPACE/objects.conf" | ||
19 | curl -o /etc/naemon/module-conf.d/immae.cfg "https://status.immae.eu/common/immae.cfg" | ||
20 | curl -o /etc/naemon/resource.cfg "https://status.immae.eu/common/resource.cfg" | ||
21 | |||
22 | curl "https://status.immae.eu/$NAMESPACE/plugins.tar" | tar -C /etc/naemon -x | ||
23 | |||
24 | sed -i -e "s|@@COMMON_PLUGINS@@|/usr/lib/naemon/plugins|" \ | ||
25 | -e "s|@@IMMAE_PLUGINS@@|/etc/naemon/immae_plugins/|" \ | ||
26 | -e "s|@@TOKEN@@|$NOTIFY_REMOTE_TOKEN|" \ | ||
27 | /etc/naemon/resource.cfg | ||
28 | |||
29 | # Ensure consistent ownership for the data volume, even if the | ||
30 | # UID/GID's changes | ||
31 | chown -R naemon:naemon /etc/naemon /data/var/log/naemon | ||
32 | |||
33 | # Start the services | ||
34 | service naemon start | ||
35 | |||
36 | # Trap exit signals and do a proper shutdown | ||
37 | trap "graceful_exit 0;" SIGINT SIGTERM | ||
38 | |||
39 | sleep 5 | ||
40 | while true | ||
41 | do | ||
42 | if ! [ -d "/proc/$(cat /var/run/naemon/naemon.pid)" ]; then | ||
43 | echo "Naemon no longer running" | ||
44 | graceful_exit 1 | ||
45 | fi | ||
46 | sleep 1 | ||
47 | done | ||
diff --git a/systems/quatresaisons/flake.lock b/systems/quatresaisons/flake.lock index 6aab914..55bb07d 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-hkZiW8Nyd9pNIXhV/AQaJZQ1peOvTBMD8zjEtSAkh3E=", | 242 | "narHash": "sha256-d2Qc6vQHwjxXQqM76iLVNMFFux1HUZcpGZ8A8hPkYlE=", |
243 | "path": "../../flakes/private/monitoring", | 243 | "path": "../../flakes/private/monitoring", |
244 | "type": "path" | 244 | "type": "path" |
245 | }, | 245 | }, |