2023-11-09 09:30:43 +10:00
|
|
|
{ config, inputs, ... }:
|
2023-07-21 20:18:58 +10:00
|
|
|
{
|
|
|
|
imports = [
|
2023-11-09 09:30:43 +10:00
|
|
|
inputs.srvos.nixosModules.roles-prometheus
|
|
|
|
./alert-rules.nix
|
2024-09-28 10:02:27 +10:00
|
|
|
./grafana.nix
|
2023-08-16 08:01:08 +10:00
|
|
|
./matrix-hook.nix
|
2023-07-21 20:18:58 +10:00
|
|
|
./prometheus.nix
|
|
|
|
./telegraf.nix
|
|
|
|
];
|
2023-09-05 15:42:49 +10:00
|
|
|
|
2024-10-24 14:54:16 +10:00
|
|
|
age.secrets.nginx-basic-auth-file = {
|
|
|
|
file = "${inputs.self}/secrets/nginx-basic-auth-file.age";
|
|
|
|
owner = "nginx";
|
|
|
|
};
|
2023-09-20 12:37:37 +10:00
|
|
|
|
2023-09-05 15:42:49 +10:00
|
|
|
services.nginx.virtualHosts."monitoring.nix-community.org" = {
|
|
|
|
locations."/".return = "302 https://nix-community.org/monitoring";
|
2023-09-20 12:37:37 +10:00
|
|
|
locations."/alertmanager/" = {
|
2024-10-24 14:54:16 +10:00
|
|
|
basicAuthFile = config.age.secrets.nginx-basic-auth-file.path;
|
2023-09-20 12:37:37 +10:00
|
|
|
proxyPass = "http://localhost:9093/";
|
|
|
|
};
|
2024-09-28 10:02:27 +10:00
|
|
|
locations."/grafana/" = {
|
|
|
|
proxyPass = "http://localhost:3000/";
|
|
|
|
proxyWebsockets = true;
|
|
|
|
};
|
2023-09-05 15:42:49 +10:00
|
|
|
locations."/prometheus/".proxyPass = "http://localhost:9090/";
|
|
|
|
};
|
2023-07-21 20:18:58 +10:00
|
|
|
}
|