configuration
flake
hosts
_iso
aluminium
astatine
backup-4
beryllium
carbon
clerie-backup
dn42-il-gw1
dn42-il-gw5
dn42-il-gw6
dn42-ildix-clerie
dn42-ildix-service
gatekeeper
hydra-1
hydra-2
krypton
mail-2
monitoring-3
dashboards
alertmanager.nix
berlinerbaeder-exporter.nix
blackbox.nix
configuration.nix
grafana.nix
hardware-configuration.nix
nixos-validator.nix
prometheus.nix
rules.yml
secrets.json
ssh.pub
uptimestatus.nix
nonat
osmium
palladium
porter
storage-2
tungsten
web-2
zinc
lib
modules
pkgs
profiles
users
.gitignore
README.md
flake.lock
flake.nix
83 lines
1.8 KiB
Nix
83 lines
1.8 KiB
Nix
{ config, pkgs, ... }:
|
|
{
|
|
sops.secrets.xmpp-password = {
|
|
owner = "solid-xmpp-alarm";
|
|
group = "solid-xmpp-alarm";
|
|
};
|
|
|
|
services.solid-xmpp-alarm = {
|
|
enable = true;
|
|
jid = "feuer@fem-net.de";
|
|
passwordFile = config.sops.secrets.xmpp-password.path;
|
|
receiver = "clerie@fem-net.de";
|
|
};
|
|
|
|
services.prometheus.alertmanager = {
|
|
enable = true;
|
|
listenAddress = "[::1]";
|
|
port = 9093;
|
|
configuration = {
|
|
route = {
|
|
receiver = "xmpp-receiver";
|
|
repeat_interval = "4h";
|
|
group_by = [ "instance" ];
|
|
routes = [
|
|
{
|
|
matchers = [
|
|
''severity = "muted"''
|
|
];
|
|
receiver = "muted";
|
|
}
|
|
{
|
|
receiver = "xmpp-receiver";
|
|
matchers = [
|
|
''severity = "warning"''
|
|
];
|
|
repeat_interval = "70h";
|
|
}
|
|
];
|
|
};
|
|
receivers = [
|
|
{
|
|
name = "muted";
|
|
}
|
|
{
|
|
name = "xmpp-receiver";
|
|
webhook_configs = [
|
|
{
|
|
url = "http://[::1]:9199/alert";
|
|
}
|
|
];
|
|
}
|
|
];
|
|
inhibit_rules = [
|
|
{
|
|
# Mute all alerts for an instance which also has an alert starting with MuteInstanceOn
|
|
target_matchers = [
|
|
''alertname =~ ".+"''
|
|
];
|
|
source_matchers = [
|
|
''mute = "instance"''
|
|
];
|
|
equal = [
|
|
"instance"
|
|
];
|
|
}
|
|
{
|
|
target_matchers = [
|
|
''alertname = "StorageAlmostFull"''
|
|
];
|
|
source_matchers = [
|
|
''alertname = "StorageFull"''
|
|
];
|
|
equal = [
|
|
"instance"
|
|
"mountpoint"
|
|
];
|
|
}
|
|
];
|
|
};
|
|
};
|
|
|
|
}
|