From b4ea4daa0699d4e95eb6f70be740203d7f4d6058 Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Thu, 16 Mar 2023 03:35:21 +0300 Subject: 2023-03-16 --- modules/nixos/monitoring/default.nix | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'modules/nixos/monitoring') diff --git a/modules/nixos/monitoring/default.nix b/modules/nixos/monitoring/default.nix index a48701e..1108be6 100644 --- a/modules/nixos/monitoring/default.nix +++ b/modules/nixos/monitoring/default.nix @@ -70,6 +70,40 @@ in { options.path = ./dashboards/postgresql.json; } ]; + + alerting = { + contactPoints.settings.contactPoints = [ + { + name = "Alertmanager"; + receivers = [ + { + uid = 1; + type = "prometheus-alertmanager"; + settings.url = "https://${config.nixfiles.modules.alertmanager.domain}"; + } + ]; + } + ]; + muteTimings.settings.muteTimes = [ + { + name = "Sleep"; + time_intervals = [ + { + times = [ + { + start_time = "23:00"; + end_time = "24:00"; + } + { + start_time = "00:00"; + end_time = "09:00"; + } + ]; + } + ]; + } + ]; + }; }; loki.configuration.ruler.alertmanager_url = "https://${config.nixfiles.modules.alertmanager.domain}"; -- cgit v1.2.3