diff options
author | Azat Bahawi <azat@bahawi.net> | 2023-03-16 03:35:21 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2023-03-16 03:35:21 +0300 |
commit | b4ea4daa0699d4e95eb6f70be740203d7f4d6058 (patch) | |
tree | 432c3101153ae3bb98df4627f32339ef209acb1e /modules/nixos/monitoring/default.nix | |
parent | 2023-03-16 (diff) |
2023-03-16
Diffstat (limited to '')
-rw-r--r-- | modules/nixos/monitoring/default.nix | 34 |
1 files changed, 34 insertions, 0 deletions
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}"; |