aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--deploy/flake.lock32
-rw-r--r--flake.lock24
-rw-r--r--flakes/flake.lock22
-rw-r--r--flakes/private/monitoring/flake.nix55
-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
11 files changed, 111 insertions, 108 deletions
diff --git a/deploy/flake.lock b/deploy/flake.lock
index d1eba4c..6242197 100644
--- a/deploy/flake.lock
+++ b/deploy/flake.lock
@@ -2783,7 +2783,7 @@
2783 }, 2783 },
2784 "locked": { 2784 "locked": {
2785 "lastModified": 1, 2785 "lastModified": 1,
2786 "narHash": "sha256-W4TIMgSVOiYTGt6hXrMNVxrJ9QZaQrL+awvGLk2UXjU=", 2786 "narHash": "sha256-bmglD7CvrNkfOtMTTLlDAGhmY4YPcZD3Qrxv0CBk5B8=",
2787 "path": "../flakes", 2787 "path": "../flakes",
2788 "type": "path" 2788 "type": "path"
2789 }, 2789 },
@@ -2894,7 +2894,7 @@
2894 }, 2894 },
2895 "locked": { 2895 "locked": {
2896 "lastModified": 1, 2896 "lastModified": 1,
2897 "narHash": "sha256-A50vXg0qfzUhyQZKToEseYsLgtaYke41KE/4uuyj+PY=", 2897 "narHash": "sha256-Lpe56lKWhlMQiQoCgvMJuqJtJ8+szDldjqMAGyt2U3U=",
2898 "path": "../../flakes/private/monitoring", 2898 "path": "../../flakes/private/monitoring",
2899 "type": "path" 2899 "type": "path"
2900 }, 2900 },
@@ -2912,7 +2912,7 @@
2912 }, 2912 },
2913 "locked": { 2913 "locked": {
2914 "lastModified": 1, 2914 "lastModified": 1,
2915 "narHash": "sha256-A50vXg0qfzUhyQZKToEseYsLgtaYke41KE/4uuyj+PY=", 2915 "narHash": "sha256-Lpe56lKWhlMQiQoCgvMJuqJtJ8+szDldjqMAGyt2U3U=",
2916 "path": "../../flakes/private/monitoring", 2916 "path": "../../flakes/private/monitoring",
2917 "type": "path" 2917 "type": "path"
2918 }, 2918 },
@@ -2930,7 +2930,7 @@
2930 }, 2930 },
2931 "locked": { 2931 "locked": {
2932 "lastModified": 1, 2932 "lastModified": 1,
2933 "narHash": "sha256-A50vXg0qfzUhyQZKToEseYsLgtaYke41KE/4uuyj+PY=", 2933 "narHash": "sha256-Lpe56lKWhlMQiQoCgvMJuqJtJ8+szDldjqMAGyt2U3U=",
2934 "path": "../../flakes/private/monitoring", 2934 "path": "../../flakes/private/monitoring",
2935 "type": "path" 2935 "type": "path"
2936 }, 2936 },
@@ -2948,7 +2948,7 @@
2948 }, 2948 },
2949 "locked": { 2949 "locked": {
2950 "lastModified": 1, 2950 "lastModified": 1,
2951 "narHash": "sha256-A50vXg0qfzUhyQZKToEseYsLgtaYke41KE/4uuyj+PY=", 2951 "narHash": "sha256-Lpe56lKWhlMQiQoCgvMJuqJtJ8+szDldjqMAGyt2U3U=",
2952 "path": "../../flakes/private/monitoring", 2952 "path": "../../flakes/private/monitoring",
2953 "type": "path" 2953 "type": "path"
2954 }, 2954 },
@@ -3832,7 +3832,7 @@
3832 }, 3832 },
3833 "locked": { 3833 "locked": {
3834 "lastModified": 1, 3834 "lastModified": 1,
3835 "narHash": "sha256-KL5aC6l/mM+ucHadjCtlSY6iBZ9/VKRf2Rgw2tjwfqo=", 3835 "narHash": "sha256-90nIfmXTv1DCJThIjtlNtnkMxefYJMHLp0CHmIekgDc=",
3836 "path": "../systems/backup-2", 3836 "path": "../systems/backup-2",
3837 "type": "path" 3837 "type": "path"
3838 }, 3838 },
@@ -3855,7 +3855,7 @@
3855 }, 3855 },
3856 "locked": { 3856 "locked": {
3857 "lastModified": 1, 3857 "lastModified": 1,
3858 "narHash": "sha256-VliQ62boc8jNgPCBX6JjVS/pA6YoikZVkvE1xxHAITk=", 3858 "narHash": "sha256-kUhSjG2OtbZMeIEykJGKUC2RovZ1prxXc8aIckE0auI=",
3859 "path": "../systems/dilion", 3859 "path": "../systems/dilion",
3860 "type": "path" 3860 "type": "path"
3861 }, 3861 },
@@ -3903,7 +3903,7 @@
3903 }, 3903 },
3904 "locked": { 3904 "locked": {
3905 "lastModified": 1, 3905 "lastModified": 1,
3906 "narHash": "sha256-YVJi4KPT8rsGNzZshYfUyz9l27QGAEsb8Iyu3O0/bMA=", 3906 "narHash": "sha256-20vFVAd2/24Q0Lewy0eNXf94eTY96cFE8mPeKtvT5jY=",
3907 "path": "../systems/eldiron", 3907 "path": "../systems/eldiron",
3908 "type": "path" 3908 "type": "path"
3909 }, 3909 },
@@ -3929,7 +3929,7 @@
3929 }, 3929 },
3930 "locked": { 3930 "locked": {
3931 "lastModified": 1, 3931 "lastModified": 1,
3932 "narHash": "sha256-HiDwzScPHp084MwtWET+17WbrWf3zs9qJzv/EqNaSqM=", 3932 "narHash": "sha256-BHpsgdt0NuJHTVvfTrsnNlOZdSBtPy/cTidd8sEIhx4=",
3933 "path": "../systems/monitoring-1", 3933 "path": "../systems/monitoring-1",
3934 "type": "path" 3934 "type": "path"
3935 }, 3935 },
@@ -3954,7 +3954,7 @@
3954 }, 3954 },
3955 "locked": { 3955 "locked": {
3956 "lastModified": 1, 3956 "lastModified": 1,
3957 "narHash": "sha256-YWEuXALLICHE+WsMtMuiCm6b2IRQyJrFpfMgH6ZLD0A=", 3957 "narHash": "sha256-lT2cXjUGDFOzRtqF4p0oyFCR4gv+VEjthk4FMbOzrL0=",
3958 "path": "../systems/quatresaisons", 3958 "path": "../systems/quatresaisons",
3959 "type": "path" 3959 "type": "path"
3960 }, 3960 },
@@ -7541,7 +7541,7 @@
7541 }, 7541 },
7542 "locked": { 7542 "locked": {
7543 "lastModified": 1, 7543 "lastModified": 1,
7544 "narHash": "sha256-A50vXg0qfzUhyQZKToEseYsLgtaYke41KE/4uuyj+PY=", 7544 "narHash": "sha256-Lpe56lKWhlMQiQoCgvMJuqJtJ8+szDldjqMAGyt2U3U=",
7545 "path": "../../flakes/private/monitoring", 7545 "path": "../../flakes/private/monitoring",
7546 "type": "path" 7546 "type": "path"
7547 }, 7547 },
@@ -8412,7 +8412,7 @@
8412 }, 8412 },
8413 "locked": { 8413 "locked": {
8414 "lastModified": 1, 8414 "lastModified": 1,
8415 "narHash": "sha256-A50vXg0qfzUhyQZKToEseYsLgtaYke41KE/4uuyj+PY=", 8415 "narHash": "sha256-Lpe56lKWhlMQiQoCgvMJuqJtJ8+szDldjqMAGyt2U3U=",
8416 "path": "./private/monitoring", 8416 "path": "./private/monitoring",
8417 "type": "path" 8417 "type": "path"
8418 }, 8418 },
@@ -8888,11 +8888,11 @@
8888 "nixpkgs": "nixpkgs_106" 8888 "nixpkgs": "nixpkgs_106"
8889 }, 8889 },
8890 "locked": { 8890 "locked": {
8891 "lastModified": 1713004475, 8891 "lastModified": 1718015850,
8892 "narHash": "sha256-zXj5DiaeAiLGIFcgMyQTtICXg4kgIiiYcTbnDIocY38=", 8892 "narHash": "sha256-svUAfD+aIaS9T9UtepEGlIdxcZyu3YJcrGOmjuwgplE=",
8893 "ref": "master", 8893 "ref": "master",
8894 "rev": "8fd3e35df106a494e3195708e8cba076f2c94acb", 8894 "rev": "71fbb32c4b3195982c0f03c90714c959b5ce2251",
8895 "revCount": 728, 8895 "revCount": 735,
8896 "type": "git", 8896 "type": "git",
8897 "url": "git+ssh://gitolite@git.immae.eu/perso/Immae/Config/Nix/Nixops/Secrets" 8897 "url": "git+ssh://gitolite@git.immae.eu/perso/Immae/Config/Nix/Nixops/Secrets"
8898 }, 8898 },
diff --git a/flake.lock b/flake.lock
index 5485356..260f1e4 100644
--- a/flake.lock
+++ b/flake.lock
@@ -2664,7 +2664,7 @@
2664 }, 2664 },
2665 "locked": { 2665 "locked": {
2666 "lastModified": 1, 2666 "lastModified": 1,
2667 "narHash": "sha256-W4TIMgSVOiYTGt6hXrMNVxrJ9QZaQrL+awvGLk2UXjU=", 2667 "narHash": "sha256-bmglD7CvrNkfOtMTTLlDAGhmY4YPcZD3Qrxv0CBk5B8=",
2668 "path": "./flakes", 2668 "path": "./flakes",
2669 "type": "path" 2669 "type": "path"
2670 }, 2670 },
@@ -2910,7 +2910,7 @@
2910 }, 2910 },
2911 "locked": { 2911 "locked": {
2912 "lastModified": 1, 2912 "lastModified": 1,
2913 "narHash": "sha256-A50vXg0qfzUhyQZKToEseYsLgtaYke41KE/4uuyj+PY=", 2913 "narHash": "sha256-Lpe56lKWhlMQiQoCgvMJuqJtJ8+szDldjqMAGyt2U3U=",
2914 "path": "../../flakes/private/monitoring", 2914 "path": "../../flakes/private/monitoring",
2915 "type": "path" 2915 "type": "path"
2916 }, 2916 },
@@ -2928,7 +2928,7 @@
2928 }, 2928 },
2929 "locked": { 2929 "locked": {
2930 "lastModified": 1, 2930 "lastModified": 1,
2931 "narHash": "sha256-A50vXg0qfzUhyQZKToEseYsLgtaYke41KE/4uuyj+PY=", 2931 "narHash": "sha256-Lpe56lKWhlMQiQoCgvMJuqJtJ8+szDldjqMAGyt2U3U=",
2932 "path": "../../flakes/private/monitoring", 2932 "path": "../../flakes/private/monitoring",
2933 "type": "path" 2933 "type": "path"
2934 }, 2934 },
@@ -2946,7 +2946,7 @@
2946 }, 2946 },
2947 "locked": { 2947 "locked": {
2948 "lastModified": 1, 2948 "lastModified": 1,
2949 "narHash": "sha256-A50vXg0qfzUhyQZKToEseYsLgtaYke41KE/4uuyj+PY=", 2949 "narHash": "sha256-Lpe56lKWhlMQiQoCgvMJuqJtJ8+szDldjqMAGyt2U3U=",
2950 "path": "../../flakes/private/monitoring", 2950 "path": "../../flakes/private/monitoring",
2951 "type": "path" 2951 "type": "path"
2952 }, 2952 },
@@ -2964,7 +2964,7 @@
2964 }, 2964 },
2965 "locked": { 2965 "locked": {
2966 "lastModified": 1, 2966 "lastModified": 1,
2967 "narHash": "sha256-A50vXg0qfzUhyQZKToEseYsLgtaYke41KE/4uuyj+PY=", 2967 "narHash": "sha256-Lpe56lKWhlMQiQoCgvMJuqJtJ8+szDldjqMAGyt2U3U=",
2968 "path": "../../flakes/private/monitoring", 2968 "path": "../../flakes/private/monitoring",
2969 "type": "path" 2969 "type": "path"
2970 }, 2970 },
@@ -3848,7 +3848,7 @@
3848 }, 3848 },
3849 "locked": { 3849 "locked": {
3850 "lastModified": 1, 3850 "lastModified": 1,
3851 "narHash": "sha256-KL5aC6l/mM+ucHadjCtlSY6iBZ9/VKRf2Rgw2tjwfqo=", 3851 "narHash": "sha256-90nIfmXTv1DCJThIjtlNtnkMxefYJMHLp0CHmIekgDc=",
3852 "path": "../systems/backup-2", 3852 "path": "../systems/backup-2",
3853 "type": "path" 3853 "type": "path"
3854 }, 3854 },
@@ -3871,7 +3871,7 @@
3871 }, 3871 },
3872 "locked": { 3872 "locked": {
3873 "lastModified": 1, 3873 "lastModified": 1,
3874 "narHash": "sha256-VliQ62boc8jNgPCBX6JjVS/pA6YoikZVkvE1xxHAITk=", 3874 "narHash": "sha256-kUhSjG2OtbZMeIEykJGKUC2RovZ1prxXc8aIckE0auI=",
3875 "path": "../systems/dilion", 3875 "path": "../systems/dilion",
3876 "type": "path" 3876 "type": "path"
3877 }, 3877 },
@@ -3919,7 +3919,7 @@
3919 }, 3919 },
3920 "locked": { 3920 "locked": {
3921 "lastModified": 1, 3921 "lastModified": 1,
3922 "narHash": "sha256-YVJi4KPT8rsGNzZshYfUyz9l27QGAEsb8Iyu3O0/bMA=", 3922 "narHash": "sha256-20vFVAd2/24Q0Lewy0eNXf94eTY96cFE8mPeKtvT5jY=",
3923 "path": "../systems/eldiron", 3923 "path": "../systems/eldiron",
3924 "type": "path" 3924 "type": "path"
3925 }, 3925 },
@@ -3945,7 +3945,7 @@
3945 }, 3945 },
3946 "locked": { 3946 "locked": {
3947 "lastModified": 1, 3947 "lastModified": 1,
3948 "narHash": "sha256-HiDwzScPHp084MwtWET+17WbrWf3zs9qJzv/EqNaSqM=", 3948 "narHash": "sha256-BHpsgdt0NuJHTVvfTrsnNlOZdSBtPy/cTidd8sEIhx4=",
3949 "path": "../systems/monitoring-1", 3949 "path": "../systems/monitoring-1",
3950 "type": "path" 3950 "type": "path"
3951 }, 3951 },
@@ -3970,7 +3970,7 @@
3970 }, 3970 },
3971 "locked": { 3971 "locked": {
3972 "lastModified": 1, 3972 "lastModified": 1,
3973 "narHash": "sha256-YWEuXALLICHE+WsMtMuiCm6b2IRQyJrFpfMgH6ZLD0A=", 3973 "narHash": "sha256-lT2cXjUGDFOzRtqF4p0oyFCR4gv+VEjthk4FMbOzrL0=",
3974 "path": "../systems/quatresaisons", 3974 "path": "../systems/quatresaisons",
3975 "type": "path" 3975 "type": "path"
3976 }, 3976 },
@@ -7557,7 +7557,7 @@
7557 }, 7557 },
7558 "locked": { 7558 "locked": {
7559 "lastModified": 1, 7559 "lastModified": 1,
7560 "narHash": "sha256-A50vXg0qfzUhyQZKToEseYsLgtaYke41KE/4uuyj+PY=", 7560 "narHash": "sha256-Lpe56lKWhlMQiQoCgvMJuqJtJ8+szDldjqMAGyt2U3U=",
7561 "path": "../../flakes/private/monitoring", 7561 "path": "../../flakes/private/monitoring",
7562 "type": "path" 7562 "type": "path"
7563 }, 7563 },
@@ -8428,7 +8428,7 @@
8428 }, 8428 },
8429 "locked": { 8429 "locked": {
8430 "lastModified": 1, 8430 "lastModified": 1,
8431 "narHash": "sha256-A50vXg0qfzUhyQZKToEseYsLgtaYke41KE/4uuyj+PY=", 8431 "narHash": "sha256-Lpe56lKWhlMQiQoCgvMJuqJtJ8+szDldjqMAGyt2U3U=",
8432 "path": "./private/monitoring", 8432 "path": "./private/monitoring",
8433 "type": "path" 8433 "type": "path"
8434 }, 8434 },
diff --git a/flakes/flake.lock b/flakes/flake.lock
index 85690fa..991a73b 100644
--- a/flakes/flake.lock
+++ b/flakes/flake.lock
@@ -2815,7 +2815,7 @@
2815 }, 2815 },
2816 "locked": { 2816 "locked": {
2817 "lastModified": 1, 2817 "lastModified": 1,
2818 "narHash": "sha256-A50vXg0qfzUhyQZKToEseYsLgtaYke41KE/4uuyj+PY=", 2818 "narHash": "sha256-Lpe56lKWhlMQiQoCgvMJuqJtJ8+szDldjqMAGyt2U3U=",
2819 "path": "../../flakes/private/monitoring", 2819 "path": "../../flakes/private/monitoring",
2820 "type": "path" 2820 "type": "path"
2821 }, 2821 },
@@ -2833,7 +2833,7 @@
2833 }, 2833 },
2834 "locked": { 2834 "locked": {
2835 "lastModified": 1, 2835 "lastModified": 1,
2836 "narHash": "sha256-A50vXg0qfzUhyQZKToEseYsLgtaYke41KE/4uuyj+PY=", 2836 "narHash": "sha256-Lpe56lKWhlMQiQoCgvMJuqJtJ8+szDldjqMAGyt2U3U=",
2837 "path": "../../flakes/private/monitoring", 2837 "path": "../../flakes/private/monitoring",
2838 "type": "path" 2838 "type": "path"
2839 }, 2839 },
@@ -2851,7 +2851,7 @@
2851 }, 2851 },
2852 "locked": { 2852 "locked": {
2853 "lastModified": 1, 2853 "lastModified": 1,
2854 "narHash": "sha256-A50vXg0qfzUhyQZKToEseYsLgtaYke41KE/4uuyj+PY=", 2854 "narHash": "sha256-Lpe56lKWhlMQiQoCgvMJuqJtJ8+szDldjqMAGyt2U3U=",
2855 "path": "../../flakes/private/monitoring", 2855 "path": "../../flakes/private/monitoring",
2856 "type": "path" 2856 "type": "path"
2857 }, 2857 },
@@ -2869,7 +2869,7 @@
2869 }, 2869 },
2870 "locked": { 2870 "locked": {
2871 "lastModified": 1, 2871 "lastModified": 1,
2872 "narHash": "sha256-A50vXg0qfzUhyQZKToEseYsLgtaYke41KE/4uuyj+PY=", 2872 "narHash": "sha256-Lpe56lKWhlMQiQoCgvMJuqJtJ8+szDldjqMAGyt2U3U=",
2873 "path": "../../flakes/private/monitoring", 2873 "path": "../../flakes/private/monitoring",
2874 "type": "path" 2874 "type": "path"
2875 }, 2875 },
@@ -3753,7 +3753,7 @@
3753 }, 3753 },
3754 "locked": { 3754 "locked": {
3755 "lastModified": 1, 3755 "lastModified": 1,
3756 "narHash": "sha256-KL5aC6l/mM+ucHadjCtlSY6iBZ9/VKRf2Rgw2tjwfqo=", 3756 "narHash": "sha256-90nIfmXTv1DCJThIjtlNtnkMxefYJMHLp0CHmIekgDc=",
3757 "path": "../systems/backup-2", 3757 "path": "../systems/backup-2",
3758 "type": "path" 3758 "type": "path"
3759 }, 3759 },
@@ -3776,7 +3776,7 @@
3776 }, 3776 },
3777 "locked": { 3777 "locked": {
3778 "lastModified": 1, 3778 "lastModified": 1,
3779 "narHash": "sha256-VliQ62boc8jNgPCBX6JjVS/pA6YoikZVkvE1xxHAITk=", 3779 "narHash": "sha256-kUhSjG2OtbZMeIEykJGKUC2RovZ1prxXc8aIckE0auI=",
3780 "path": "../systems/dilion", 3780 "path": "../systems/dilion",
3781 "type": "path" 3781 "type": "path"
3782 }, 3782 },
@@ -3824,7 +3824,7 @@
3824 }, 3824 },
3825 "locked": { 3825 "locked": {
3826 "lastModified": 1, 3826 "lastModified": 1,
3827 "narHash": "sha256-YVJi4KPT8rsGNzZshYfUyz9l27QGAEsb8Iyu3O0/bMA=", 3827 "narHash": "sha256-20vFVAd2/24Q0Lewy0eNXf94eTY96cFE8mPeKtvT5jY=",
3828 "path": "../systems/eldiron", 3828 "path": "../systems/eldiron",
3829 "type": "path" 3829 "type": "path"
3830 }, 3830 },
@@ -3850,7 +3850,7 @@
3850 }, 3850 },
3851 "locked": { 3851 "locked": {
3852 "lastModified": 1, 3852 "lastModified": 1,
3853 "narHash": "sha256-HiDwzScPHp084MwtWET+17WbrWf3zs9qJzv/EqNaSqM=", 3853 "narHash": "sha256-BHpsgdt0NuJHTVvfTrsnNlOZdSBtPy/cTidd8sEIhx4=",
3854 "path": "../systems/monitoring-1", 3854 "path": "../systems/monitoring-1",
3855 "type": "path" 3855 "type": "path"
3856 }, 3856 },
@@ -3875,7 +3875,7 @@
3875 }, 3875 },
3876 "locked": { 3876 "locked": {
3877 "lastModified": 1, 3877 "lastModified": 1,
3878 "narHash": "sha256-YWEuXALLICHE+WsMtMuiCm6b2IRQyJrFpfMgH6ZLD0A=", 3878 "narHash": "sha256-lT2cXjUGDFOzRtqF4p0oyFCR4gv+VEjthk4FMbOzrL0=",
3879 "path": "../systems/quatresaisons", 3879 "path": "../systems/quatresaisons",
3880 "type": "path" 3880 "type": "path"
3881 }, 3881 },
@@ -7384,7 +7384,7 @@
7384 }, 7384 },
7385 "locked": { 7385 "locked": {
7386 "lastModified": 1, 7386 "lastModified": 1,
7387 "narHash": "sha256-A50vXg0qfzUhyQZKToEseYsLgtaYke41KE/4uuyj+PY=", 7387 "narHash": "sha256-Lpe56lKWhlMQiQoCgvMJuqJtJ8+szDldjqMAGyt2U3U=",
7388 "path": "../../flakes/private/monitoring", 7388 "path": "../../flakes/private/monitoring",
7389 "type": "path" 7389 "type": "path"
7390 }, 7390 },
@@ -8294,7 +8294,7 @@
8294 }, 8294 },
8295 "locked": { 8295 "locked": {
8296 "lastModified": 1, 8296 "lastModified": 1,
8297 "narHash": "sha256-A50vXg0qfzUhyQZKToEseYsLgtaYke41KE/4uuyj+PY=", 8297 "narHash": "sha256-Lpe56lKWhlMQiQoCgvMJuqJtJ8+szDldjqMAGyt2U3U=",
8298 "path": "./private/monitoring", 8298 "path": "./private/monitoring",
8299 "type": "path" 8299 "type": "path"
8300 }, 8300 },
diff --git a/flakes/private/monitoring/flake.nix b/flakes/private/monitoring/flake.nix
index b7c3997..5610d67 100644
--- a/flakes/private/monitoring/flake.nix
+++ b/flakes/private/monitoring/flake.nix
@@ -164,6 +164,13 @@
164 Whether to enable monitoring. 164 Whether to enable monitoring.
165 ''; 165 '';
166 }; 166 };
167 smartdDisks = lib.mkOption {
168 type = lib.types.listOf lib.types.str;
169 default = [];
170 description = ''
171 List of smartd disks ids (symlinks in /dev/disk/by-id/) to monitor
172 '';
173 };
167 master = lib.mkOption { 174 master = lib.mkOption {
168 type = lib.types.bool; 175 type = lib.types.bool;
169 default = false; 176 default = false;
@@ -261,6 +268,54 @@
261 objectDefs = 268 objectDefs =
262 self.lib.toObjects cfg.objects; 269 self.lib.toObjects cfg.objects;
263 }; 270 };
271
272 myServices.monitoring.objects.service = builtins.map (d: {
273 service_description = "Disk /dev/disk/by-id/${d} is sane";
274 use = "local-service";
275 check_command = [ "check_smartctl" "/dev/disk/by-id/${d}" ];
276 __passive_servicegroups = "webstatus-resources";
277
278 check_interval = 60;
279 }) cfg.smartdDisks;
280
281 systemd = let
282 checkShortTimer = {
283 timerConfig = {
284 OnCalendar = "monthly";
285 RandomizedDelaySec = "3 weeks";
286 FixedRandomDelay = true;
287 };
288 wantedBy = [ "timers.target" ];
289 };
290 checkLongTimer = {
291 timerConfig = {
292 OnCalendar = "monthly";
293 RandomizedDelaySec = "3 weeks";
294 FixedRandomDelay = true;
295 };
296 wantedBy = [ "timers.target" ];
297 };
298 toSDTimers = id: {
299 "check-smartd-long-${id}" = checkLongTimer;
300 "check-smartd-short-${id}" = checkShortTimer;
301 };
302 toCheckService = id: type: {
303 description = "Run ${type} smartctl test for /dev/disk/by-id/${id}";
304 after = [ "multi-user.target" ];
305 serviceConfig = {
306 Type = "oneshot";
307 ExecStart = "${pkgs.smartmontools}/bin/smartctl -t ${type} /dev/disk/by-id/${id}";
308 };
309 };
310 toSDServices = id: {
311 "check-smartd-long-${id}" = toCheckService id "long";
312 "check-smartd-short-${id}" = toCheckService id "short";
313 };
314
315 in {
316 services = lib.attrsets.mergeAttrsList (builtins.map toSDServices cfg.smartdDisks);
317 timers = lib.attrsets.mergeAttrsList (builtins.map toSDTimers cfg.smartdDisks);
318 };
264 }; 319 };
265 }; 320 };
266 }; 321 };
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 },