feat: enhance Blackbox Exporter configuration with domain blacklist and update Grafana alerting rules
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
{ lib, pkgs, config, ... }:
|
||||
|
||||
let
|
||||
cfg = config.services.blackbox-exporter;
|
||||
nginxVHosts = config.services.nginx.virtualHosts or {};
|
||||
allDomains = lib.attrNames nginxVHosts;
|
||||
httpsDomains = lib.map (d: "https://${d}") allDomains;
|
||||
filteredDomains = builtins.filter (d: !builtins.elem d cfg.blacklistDomains) allDomains;
|
||||
httpsDomains = lib.map (d: "https://${d}") filteredDomains;
|
||||
websiteAlertRules = lib.map (target:
|
||||
let
|
||||
domain = lib.replaceStrings ["://" "." "-" "/" ] ["-" "-" "_" "_"] target + "-down-alert";
|
||||
|
||||
@@ -67,9 +67,7 @@ in
|
||||
use_pkce = true;
|
||||
};
|
||||
|
||||
"auth.anonymous".enabled = true;
|
||||
"auth.anonymous".org_name = "Cloonar e.U.";
|
||||
"auth.anonymous".org_role = "Viewer";
|
||||
"auth.anonymous".enabled = false;
|
||||
|
||||
server = {
|
||||
root_url = "https://grafana.cloonar.com";
|
||||
|
||||
Reference in New Issue
Block a user