2023-07-30 16:24:46 +02:00
|
|
|
{ pkgs, ... }:
|
|
|
|
{
|
|
|
|
services.prometheus = {
|
|
|
|
enable = true;
|
|
|
|
exporters = {
|
|
|
|
node = {
|
|
|
|
enable = true;
|
2023-08-05 18:46:25 +02:00
|
|
|
enabledCollectors = [ "systemd" "processes" ];
|
2023-07-30 16:24:46 +02:00
|
|
|
};
|
2023-08-05 18:46:25 +02:00
|
|
|
nginx = {
|
|
|
|
enable = true;
|
|
|
|
};
|
2023-07-30 16:24:46 +02:00
|
|
|
};
|
|
|
|
scrapeConfigs = [
|
|
|
|
{
|
|
|
|
job_name = "katzencafe";
|
|
|
|
static_configs = [{
|
2023-08-05 18:46:25 +02:00
|
|
|
targets = [ "127.0.0.1:9100" "127.0.0.1:9113"];
|
2023-07-30 16:24:46 +02:00
|
|
|
}];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
services.grafana = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
server = {
|
|
|
|
domain = "grafana.katzen.cafe";
|
|
|
|
http_port = 2343;
|
|
|
|
http_addr = "127.0.0.1";
|
|
|
|
};
|
2023-08-05 18:46:25 +02:00
|
|
|
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";
|
|
|
|
};
|
2023-07-30 16:24:46 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|