feat: add cleanup for grafana alerting rules
This commit is contained in:
parent
819bfc1531
commit
db25b2bfbb
3 changed files with 102 additions and 2 deletions
|
|
@ -11,8 +11,7 @@ let
|
|||
httpsDomains = lib.map (d: "https://${d}") filteredDomains;
|
||||
websiteAlertRules = lib.map (target:
|
||||
let
|
||||
domain = lib.replaceStrings ["://" "." "-" "/" ] ["-" "-" "_" "_"] target + "-down-alert";
|
||||
uid = builtins.hashString "sha1" domain;
|
||||
uid = "website-" + (builtins.replaceStrings ["https://" "http://" "." "/"] ["" "" "-" "-"] target);
|
||||
in {
|
||||
uid = uid;
|
||||
title = "Website " + target + " Down";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue