katzen-cafe/modules/monitoring.nix
Schrottkatze 4353c90e2b miau
2023-08-05 18:46:25 +02:00

42 lines
865 B
Nix

{ pkgs, ... }:
{
services.prometheus = {
enable = true;
exporters = {
node = {
enable = true;
enabledCollectors = [ "systemd" "processes" ];
};
nginx = {
enable = true;
};
};
scrapeConfigs = [
{
job_name = "katzencafe";
static_configs = [{
targets = [ "127.0.0.1:9100" "127.0.0.1:9113"];
}];
}
];
};
services.grafana = {
enable = true;
settings = {
server = {
domain = "grafana.katzen.cafe";
http_port = 2343;
http_addr = "127.0.0.1";
};
smtp = {
enabled = true;
user = "noreply@katzen.cafe";
password = "$__file{/var/lib/secrets/noreply-mail-pw-plain}";
host = "mail.katzen.cafe:465";
from_address = "noreply@katzen.cafe";
};
};
};
}