This commit is contained in:
chris 2025-04-17 11:08:39 +02:00
parent c0241036c6
commit 305658861c
Signed by: c6ristian
SSH key fingerprint: SHA256:B3m+yzpaxGXSEcDBpPHfvza/DNC0wuX+CKMeGq8wgak
2 changed files with 24 additions and 20 deletions
systems/monitoring.noc.eh22.intern

View file

@ -51,7 +51,9 @@
url = "http://mimir.noc.eh22.intern"; url = "http://mimir.noc.eh22.intern";
basicAuth = true; basicAuth = true;
basicAuthUser = "noc"; basicAuthUser = "noc";
secureJsonData.basicAuthPassword = "$__file{${config.sops.secrets."services/mimir/basic_auth".path}}"; secureJsonData.basicAuthPassword = "$__file{${
config.sops.secrets."services/mimir/basic_auth".path
}}";
jsonData = { jsonData = {
handleGrafanaManagedAlerts = true; handleGrafanaManagedAlerts = true;
implementation = "mimir"; implementation = "mimir";

View file

@ -65,28 +65,30 @@ in
}; };
utf8_strict_mode = true; utf8_strict_mode = true;
fallback_config_file = pkgs.writers.writeYAML "alertmanager.yaml" { fallback_config_file = pkgs.writers.writeYAML "alertmanager.yaml" {
route = { route = {
group_by = ["alertname"]; group_by = [ "alertname" ];
receiver = "telegram"; receiver = "telegram";
group_wait = "30s"; group_wait = "30s";
group_interval = "1m"; group_interval = "1m";
repeat_interval = "3m"; repeat_interval = "3m";
}; };
receivers = [ receivers = [
{ {
name = "telegram"; name = "telegram";
telegram_configs = [{ telegram_configs = [
{
bot_token_file = config.sops.secrets."services/telegrambot/token".path; bot_token_file = config.sops.secrets."services/telegrambot/token".path;
chat_id = -1002579132187; chat_id = -1002579132187;
}]; }
} ];
]; }
templates = [ ];
"/etc/alertmanager/templates/*.tmpl" templates = [
]; "/etc/alertmanager/templates/*.tmpl"
}; ];
};
}; };
ruler = { ruler = {
alertmanager_url = "http://localhost/alertmanager"; alertmanager_url = "http://localhost/alertmanager";
ring = { ring = {