monit: check for onlyoffice status

This commit is contained in:
stuebinm 2024-01-28 22:56:33 +01:00
parent c681bb413c
commit c28a1f6e2e

View file

@ -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"