1
0

hosts/monitoring-3: Use solid-xmpp-alarm

This commit is contained in:
clerie 2023-02-06 13:38:16 +01:00
parent 8d623692c7
commit 9849e4868d
3 changed files with 33 additions and 12 deletions

View File

@ -39,7 +39,28 @@
"root": {
"inputs": {
"nixos-exporter": "nixos-exporter",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"solid-xmpp-alarm": "solid-xmpp-alarm"
}
},
"solid-xmpp-alarm": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1675686574,
"narHash": "sha256-+Xww9mfKbUP4VRPtAJKZ6+YdBYL/0vgGoBXVC9AvmQw=",
"ref": "refs/heads/main",
"rev": "79730bd7df798d80c526c42bbd526506f0235ea3",
"revCount": 4,
"type": "git",
"url": "https://git.clerie.de/clerie/solid-xmpp-alarm.git"
},
"original": {
"type": "git",
"url": "https://git.clerie.de/clerie/solid-xmpp-alarm.git"
}
}
},

View File

@ -5,8 +5,12 @@
url = "git+https://git.clerie.de/clerie/nixos-exporter.git";
inputs.nixpkgs.follows = "nixpkgs";
};
solid-xmpp-alarm = {
url = "git+https://git.clerie.de/clerie/solid-xmpp-alarm.git";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, nixos-exporter, ... }: let
outputs = { self, nixpkgs, nixos-exporter, solid-xmpp-alarm, ... }: let
pkgs = import nixpkgs {
overlays = [
(import ./pkgs/overlay.nix)
@ -36,6 +40,7 @@
})
];
})
solid-xmpp-alarm.nixosModules.solid-xmpp-alarm
(./hosts + "/${name}/configuration.nix")
];
};

View File

@ -1,15 +1,10 @@
{ ... }:
{ pkgs, ... }:
{
services.prometheus.xmpp-alerts = {
services.solid-xmpp-alarm = {
enable = true;
settings = {
jid = "feuer@fem-net.de";
password_command = "cat /var/src/secrets/xmpp-alert/password";
listen_address = "::1";
listen_port = 9199;
to_jid = "clerie@fem-net.de";
format = "short";
};
jid = "feuer@fem-net.de";
passwordFile = "/var/src/secrets/xmpp-alert/password";
receiver = "clerie@fem-net.de";
};
services.prometheus.alertmanager = {