18 lines
562 B
Nix
18 lines
562 B
Nix
{ lib, pkgs, config, ... }:
|
|
let
|
|
smartAlertRules = (import ./smart_alerts.nix { inherit lib pkgs config; }).grafanaAlertRuleDefinitions;
|
|
raidAlertRules = (import ./raid_alerts.nix { inherit lib pkgs config; }).grafanaAlertRuleDefinitions;
|
|
|
|
allStorageRules = smartAlertRules ++ raidAlertRules;
|
|
in
|
|
{
|
|
services.grafana.provision.alerting.rules.settings.groups = [
|
|
{
|
|
name = "Storage Alerts";
|
|
folder = "Storage Alerts";
|
|
interval = "5m"; # Check every 5 minutes (metrics collected every 20 min)
|
|
rules = allStorageRules;
|
|
}
|
|
];
|
|
}
|