aboutsummaryrefslogtreecommitdiff
path: root/modules/private/monitoring/myplugins.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2021-05-02 15:14:43 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2021-05-02 15:14:43 +0200
commite64a496820b90607cba3762db3ce77847aaac22d (patch)
treec7cb1c0e536ff75e3b523de7759c13e7b7a8a381 /modules/private/monitoring/myplugins.nix
parentacab8301f6a0a76d97b36d009a60d4172bf62981 (diff)
downloadNix-e64a496820b90607cba3762db3ce77847aaac22d.tar.gz
Nix-e64a496820b90607cba3762db3ce77847aaac22d.tar.zst
Nix-e64a496820b90607cba3762db3ce77847aaac22d.zip
Add monitoring for quatresaisons
Diffstat (limited to 'modules/private/monitoring/myplugins.nix')
-rw-r--r--modules/private/monitoring/myplugins.nix6
1 files changed, 6 insertions, 0 deletions
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
310 postgresql = { 310 postgresql = {
311 commands = { 311 commands = {
312 check_postgresql_replication = "${sudo} -u postgres $USER2$/check_postgres_replication \"$ARG1$\" \"$ARG2$\" \"$ARG3$\""; 312 check_postgresql_replication = "${sudo} -u postgres $USER2$/check_postgres_replication \"$ARG1$\" \"$ARG2$\" \"$ARG3$\"";
313 check_postgresql_database_count = "$USER2$/check_postgres_database_count \"$ARG1$\" \"$ARG2$\" \"$ARG3$\"";
313 }; 314 };
314 chunk = let 315 chunk = let
315 postgresqlBinary = if config.myServices.databasesReplication.postgresql.enable 316 postgresqlBinary = if config.myServices.databasesReplication.postgresql.enable
@@ -323,6 +324,11 @@ in
323 wrapProgram $out/check_postgres_replication --prefix PATH : ${lib.makeBinPath [ 324 wrapProgram $out/check_postgres_replication --prefix PATH : ${lib.makeBinPath [
324 postgresqlBinary 325 postgresqlBinary
325 ]} 326 ]}
327 cp ${./plugins}/check_postgres_database_count $out/
328 patchShebangs $out/check_postgres_database_count
329 wrapProgram $out/check_postgres_database_count --prefix PATH : ${lib.makeBinPath [
330 postgresqlBinary
331 ]}
326 ''; 332 '';
327 333
328 sudo = myplugins: { 334 sudo = myplugins: {