From c28a1f6e2e3bb567b79159e757a2d0cc3a6f86ce Mon Sep 17 00:00:00 2001 From: stuebinm Date: Sun, 28 Jan 2024 22:56:33 +0100 Subject: [PATCH] monit: check for onlyoffice status --- parsons/mail.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/parsons/mail.nix b/parsons/mail.nix index f03af06..1645885 100644 --- a/parsons/mail.nix +++ b/parsons/mail.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, sources, ... }: +{ config, options, pkgs, lib, sources, ... }: { imports = [ sources.nixos-mailserver.outPath ]; @@ -20,6 +20,14 @@ monitoring = { enable = true; alertAddress = "admin@hacc.space"; + config = (lib.replaceStrings ["port 22"] ["port ${toString (lib.head config.services.openssh.ports)}"] options.mailserver.monitoring.config.default) + '' + check host onlyoffice with address onlyoffice.infra4future.de + if failed + port 443 + protocol https + status = 302 + then alert + ''; }; domains = [ "hacc.space"