defiant: add uptime-kuma, rename metrics->monitoring

main
Felix Albrigtsen 2024-03-10 15:06:33 +01:00
parent 028c3ccbe0
commit 1eed30d7d5
11 changed files with 22 additions and 4 deletions

View File

@ -40,9 +40,10 @@ Other installed packages and tools are described in the config files (like ./hos
## Monitoring
- Prometheus ([source](./hosts/defiant/services/metrics/prometheus.nix)) - Pull-based metrics system that fetches metrics over HTTP from a range of exporters and stores them in a time-series database
- Loki ([source](./hosts/defiant/services/metrics/loki.nix)) - Central logging for all my hosts
- Grafana ([source](./hosts/defiant/services/metrics/grafana.nix)) - Visualization and alerting for all my metrics and logs
- Prometheus ([source](./hosts/defiant/services/monitoring/prometheus.nix)) - Pull-based metrics system that fetches metrics over HTTP from a range of exporters and stores them in a time-series database
- Loki ([source](./hosts/defiant/services/monitoring/loki.nix)) - Central logging for all my hosts
- Grafana ([source](./hosts/defiant/services/monitoring/grafana.nix)) - Visualization and alerting for all my metrics and logs
- Uptime-Kuma ([source](./hosts/defiant/services/monitoring/uptime-kuma.nix)) - Uptime / health check with alerting
## Dotfiles and user tools

View File

@ -21,7 +21,7 @@
./services/hedgedoc.nix
./services/home-assistant.nix
./services/matrix
./services/metrics
./services/monitoring
./services/microbin.nix
./services/minecraft.nix
./services/vaultwarden.nix

View File

@ -6,5 +6,6 @@
./grafana.nix
./loki.nix
./snmp-exporter.nix
./uptime-kuma.nix
];
}

View File

@ -0,0 +1,16 @@
{ config, pkgs, lib, ... }:
let
cfg = config.services.uptime-kuma;
in {
services.uptime-kuma = {
enable = true;
settings = {
PORT = "5059";
HOST = "127.0.1.2";
};
};
services.nginx.virtualHosts."uptime.home.feal.no" = {
locations."/".proxyPass = "http://${cfg.settings.HOST}:${cfg.settings.PORT}";
};
}