- Deleted individual alert files for host down, inode usage, and RAM usage. - Merged service down alerts into a new structure with separate files for each service (Gitea, Postfix, Dovecot, OpenLDAP, WireGuard). - Introduced a new system alert structure consolidating CPU, disk, host down, inode, and RAM usage alerts. - Updated alert conditions to use 'D' for thresholds and adjusted expressions accordingly. - Improved annotations and labels for clarity and consistency across alerts.
26 lines
1.2 KiB
Nix
26 lines
1.2 KiB
Nix
{ lib, pkgs, config, ... }:
|
|
let
|
|
giteaDownAlertRules = (import ./gitea_down.nix { inherit lib pkgs config; }).grafanaAlertRuleDefinitions;
|
|
giteaRunnerDownAlertRules = (import ./gitea_runner_down.nix { inherit lib pkgs config; }).grafanaAlertRuleDefinitions;
|
|
postfixDownAlertRules = (import ./postfix_down.nix { inherit lib pkgs config; }).grafanaAlertRuleDefinitions;
|
|
dovecotDownAlertRules = (import ./dovecot_down.nix { inherit lib pkgs config; }).grafanaAlertRuleDefinitions;
|
|
openldapDownAlertRules = (import ./openldap_down.nix { inherit lib pkgs config; }).grafanaAlertRuleDefinitions;
|
|
wireguardDownAlertRules = (import ./wireguard_down.nix { inherit lib pkgs config; }).grafanaAlertRuleDefinitions;
|
|
|
|
allServiceRules = giteaDownAlertRules
|
|
++ giteaRunnerDownAlertRules
|
|
++ postfixDownAlertRules
|
|
++ dovecotDownAlertRules
|
|
++ openldapDownAlertRules
|
|
++ wireguardDownAlertRules;
|
|
in
|
|
{
|
|
services.grafana.provision.alerting.rules.settings.groups = [
|
|
{
|
|
name = "Service Alerts";
|
|
folder = "Service Monitoring";
|
|
interval = "1m";
|
|
rules = allServiceRules;
|
|
}
|
|
];
|
|
} |