feat: uptime-kuma

This commit is contained in:
Robert Perce 2025-08-25 23:55:51 -05:00
parent e2e7ffb75e
commit 5893fd4a52
2 changed files with 28 additions and 5 deletions

View file

@ -28,8 +28,10 @@
192.168.0.100 unifi
'';
networking.firewall.allowedTCPPorts = [ 3000 ];
networking.firewall.allowedTCPPorts = [
3000 # grafana
3001 # uptime-kuma
];
services.grafana = {
enable = true;
settings = {
@ -153,6 +155,13 @@
];
};
services.uptime-kuma = {
enable = true;
settings = {
HOST = "0.0.0.0";
};
};
services.borgbackup.jobs.grafana = {
paths = [ "/var/lib/grafana/data/grafana.db" ];
archiveBaseName = null;
@ -161,6 +170,11 @@
repo = "ssh://backup@xalicas/./grafana";
compression = "auto,zstd";
startAt = "daily";
postHook = ''
if [ $exitStatus -eq 0 ]; then
curl -sSL http://metrics01:3001/api/push/LmyyAawLzw?status=up&msg=OK&ping=
fi
'';
};
};
}