diff options
Diffstat (limited to 'modules/private/monitoring/myplugins.nix')
-rw-r--r-- | modules/private/monitoring/myplugins.nix | 6 |
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: { |