From e64a496820b90607cba3762db3ce77847aaac22d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Sun, 2 May 2021 15:14:43 +0200 Subject: Add monitoring for quatresaisons --- modules/private/monitoring/myplugins.nix | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules/private/monitoring/myplugins.nix') 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: { -- cgit v1.2.3