feat: uptime-kuma
This commit is contained in:
parent
e2e7ffb75e
commit
5893fd4a52
2 changed files with 28 additions and 5 deletions
|
|
@ -28,8 +28,10 @@
|
||||||
192.168.0.100 unifi
|
192.168.0.100 unifi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 3000 ];
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
3000 # grafana
|
||||||
|
3001 # uptime-kuma
|
||||||
|
];
|
||||||
services.grafana = {
|
services.grafana = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
@ -153,6 +155,13 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.uptime-kuma = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
HOST = "0.0.0.0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
services.borgbackup.jobs.grafana = {
|
services.borgbackup.jobs.grafana = {
|
||||||
paths = [ "/var/lib/grafana/data/grafana.db" ];
|
paths = [ "/var/lib/grafana/data/grafana.db" ];
|
||||||
archiveBaseName = null;
|
archiveBaseName = null;
|
||||||
|
|
@ -161,6 +170,11 @@
|
||||||
repo = "ssh://backup@xalicas/./grafana";
|
repo = "ssh://backup@xalicas/./grafana";
|
||||||
compression = "auto,zstd";
|
compression = "auto,zstd";
|
||||||
startAt = "daily";
|
startAt = "daily";
|
||||||
|
postHook = ''
|
||||||
|
if [ $exitStatus -eq 0 ]; then
|
||||||
|
curl -sSL http://metrics01:3001/api/push/LmyyAawLzw?status=up&msg=OK&ping=
|
||||||
|
fi
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,9 @@ in
|
||||||
ip4 = "192.168.0.5";
|
ip4 = "192.168.0.5";
|
||||||
};
|
};
|
||||||
|
|
||||||
# environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
#
|
curl
|
||||||
# ];
|
];
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [
|
networking.firewall.allowedTCPPorts = [
|
||||||
80
|
80
|
||||||
|
|
@ -47,6 +47,9 @@ in
|
||||||
"metrics.dukeceph.xyz".extraConfig = ''
|
"metrics.dukeceph.xyz".extraConfig = ''
|
||||||
reverse_proxy http://192.168.0.6:3000
|
reverse_proxy http://192.168.0.6:3000
|
||||||
'';
|
'';
|
||||||
|
"uptime.rperce.net".extraConfig = ''
|
||||||
|
reverse_proxy 192.168.0.6:3001
|
||||||
|
'';
|
||||||
"jellyfin.rperce.net".extraConfig = ''
|
"jellyfin.rperce.net".extraConfig = ''
|
||||||
reverse_proxy http://192.168.0.2:8096
|
reverse_proxy http://192.168.0.2:8096
|
||||||
'';
|
'';
|
||||||
|
|
@ -99,6 +102,12 @@ in
|
||||||
repo = "ssh://backup@xalicas/./miniflux";
|
repo = "ssh://backup@xalicas/./miniflux";
|
||||||
compression = "auto,zstd";
|
compression = "auto,zstd";
|
||||||
startAt = "daily";
|
startAt = "daily";
|
||||||
|
postHook = ''
|
||||||
|
echo "exit $exitStatus"
|
||||||
|
if [ $exitStatus -eq 0 ]; then
|
||||||
|
/run/current-system/sw/bin/curl -sSL http://192.168.0.6:3001/api/push/yTBTVZF8Bz?status=up&msg=OK&ping=
|
||||||
|
fi
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue