X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fmonitoring%2Fdefault.nix;h=b3f8cbee734cf53f3c672e88171a2f036282fc4d;hb=6015a3b52c3b155ac444aeb39950c38a5e653101;hp=0259cbfbc7623d1ee6cad9c5b0acaf7553999780;hpb=eb071dd42518cb40d629e5bde29c6aed72e4d4df;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/monitoring/default.nix b/modules/private/monitoring/default.nix index 0259cbf..b3f8cbe 100644 --- a/modules/private/monitoring/default.nix +++ b/modules/private/monitoring/default.nix @@ -16,6 +16,12 @@ let wrapProgram $out/check_postgres_replication --prefix PATH : ${lib.makeBinPath [ pkgs.postgresql ]} + wrapProgram $out/check_redis_replication --prefix PATH : ${lib.makeBinPath [ + pkgs.gnugrep pkgs.coreutils pkgs.redis + ]} + wrapProgram $out/check_mysql_replication --prefix PATH : ${lib.makeBinPath [ + pkgs.gnugrep pkgs.gnused pkgs.coreutils pkgs.mariadb + ]} ''; toObjects = pkgs.callPackage ./to_objects.nix {}; commonConfig = { @@ -72,6 +78,22 @@ in users = [ "naemon" ]; runAs = "postgres"; } + { + commands = [ + { command = "${myplugins}/check_mysql_replication *"; options = [ "NOPASSWD" ]; } + { command = "${myplugins}/check_last_file_date /backup2/*"; options = [ "NOPASSWD" ]; } + ]; + users = [ "naemon" ]; + runAs = "mysql"; + } + { + commands = [ + { command = "${myplugins}/check_redis_replication *"; options = [ "NOPASSWD" ]; } + { command = "${myplugins}/check_last_file_date /backup2/*"; options = [ "NOPASSWD" ]; } + ]; + users = [ "naemon" ]; + runAs = "redis"; + } { commands = [ { command = "${myplugins}/check_last_file_date /backup2/*"; options = [ "NOPASSWD" ]; }