X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fmonitoring%2Fmyplugins.nix;h=86b5f1ec29449e5d1d5271e1dfe00368a77735b4;hb=e64a496820b90607cba3762db3ce77847aaac22d;hp=8c77ee77d3618ac8f88f076ffb9394116aa76b5a;hpb=acab8301f6a0a76d97b36d009a60d4172bf62981;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/monitoring/myplugins.nix b/modules/private/monitoring/myplugins.nix index 8c77ee7..86b5f1e 100644 --- a/modules/private/monitoring/myplugins.nix +++ b/modules/private/monitoring/myplugins.nix @@ -310,6 +310,7 @@ in postgresql = { commands = { check_postgresql_replication = "${sudo} -u postgres $USER2$/check_postgres_replication \"$ARG1$\" \"$ARG2$\" \"$ARG3$\""; + check_postgresql_database_count = "$USER2$/check_postgres_database_count \"$ARG1$\" \"$ARG2$\" \"$ARG3$\""; }; chunk = let postgresqlBinary = if config.myServices.databasesReplication.postgresql.enable @@ -323,6 +324,11 @@ in wrapProgram $out/check_postgres_replication --prefix PATH : ${lib.makeBinPath [ postgresqlBinary ]} + cp ${./plugins}/check_postgres_database_count $out/ + patchShebangs $out/check_postgres_database_count + wrapProgram $out/check_postgres_database_count --prefix PATH : ${lib.makeBinPath [ + postgresqlBinary + ]} ''; sudo = myplugins: {