Add alerttonotify to monitoring host
Some checks failed
Run nix flake check / flake-check (push) Has been cancelled

This commit is contained in:
2025-02-11 22:25:54 +01:00
parent fb3d810089
commit abb4cf58ea
8 changed files with 61 additions and 27 deletions

View File

@@ -0,0 +1,21 @@
{ pkgs, config, ... }:
{
sops.secrets."nats_nkey" = { };
systemd.services."alerttonotify" = {
wants = [ "network-online.target" ];
after = [
"network-online.target"
"sops-nix.service"
];
environment = {
NATS_URL = "nats://nats1.home.2rjus.net:4222";
NATS_NKEY_FILE = "${config.sops.secrets.nats_nkey.path}";
};
serviceConfig = {
Type = "exec";
ExecStart = "${pkgs.alerttonotify}/bin/alerttonotify";
};
};
}

View File

@@ -5,5 +5,6 @@
./grafana.nix
./prometheus.nix
./pve.nix
./alerttonotify.nix
];
}

View File

@@ -8,7 +8,7 @@
global = {
};
route = {
receiver = "webhook_gunter";
receiver = "webhook_natstonotify";
group_wait = "30s";
group_interval = "5m";
repeat_interval = "12h";
@@ -16,10 +16,10 @@
};
receivers = [
{
name = "webhook_gunter";
name = "webhook_natstonotify";
webhook_configs = [
{
url = "http://gunter.home.2rjus.net:5001/alert";
url = "http://localhost:5001/alert";
}
];
}