Merge pull request 'feat(forgejo): add gatus monitoring for ssh connection' (#136) from 127 into 100
Reviewed-on: #136
This commit is contained in:
commit
6bac995f02
1 changed files with 28 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ let
|
||||||
certloc = "/var/lib/acme/fi33.buzz";
|
certloc = "/var/lib/acme/fi33.buzz";
|
||||||
hostname = "git.fi33.buzz";
|
hostname = "git.fi33.buzz";
|
||||||
url = "https://git.fi33.buzz";
|
url = "https://git.fi33.buzz";
|
||||||
|
sshPort = lib.head config.services.openssh.ports;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services = {
|
services = {
|
||||||
|
|
@ -24,7 +25,7 @@ in
|
||||||
DOMAIN = hostname;
|
DOMAIN = hostname;
|
||||||
HTTP_PORT = port;
|
HTTP_PORT = port;
|
||||||
ROOT_URL = url;
|
ROOT_URL = url;
|
||||||
SSH_PORT = lib.head config.services.openssh.ports;
|
SSH_PORT = sshPort;
|
||||||
# keep-sorted end
|
# keep-sorted end
|
||||||
};
|
};
|
||||||
service.DISABLE_REGISTRATION = true;
|
service.DISABLE_REGISTRATION = true;
|
||||||
|
|
@ -35,6 +36,32 @@ in
|
||||||
|
|
||||||
openssh.settings.AllowUsers = [ "git" ];
|
openssh.settings.AllowUsers = [ "git" ];
|
||||||
|
|
||||||
|
gatus.settings.endpoints = [
|
||||||
|
{
|
||||||
|
name = "Forgejo";
|
||||||
|
group = "Private Services";
|
||||||
|
inherit url;
|
||||||
|
interval = "5m";
|
||||||
|
conditions = [
|
||||||
|
"[STATUS] == 200"
|
||||||
|
"[CONNECTED] == true"
|
||||||
|
"[RESPONSE_TIME] < 500"
|
||||||
|
];
|
||||||
|
alerts = [ { type = "ntfy"; } ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "Forgejo SSH";
|
||||||
|
group = "Private Services";
|
||||||
|
url = "ssh://${hostname}:${toString sshPort}";
|
||||||
|
interval = "5m";
|
||||||
|
conditions = [
|
||||||
|
"[CONNECTED] == true"
|
||||||
|
"[RESPONSE_TIME] < 500"
|
||||||
|
];
|
||||||
|
alerts = [ { type = "ntfy"; } ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
borgbackup.jobs = {
|
borgbackup.jobs = {
|
||||||
onsite.paths = [ "/var/lib/forgejo" ];
|
onsite.paths = [ "/var/lib/forgejo" ];
|
||||||
offsite.paths = [ "/var/lib/forgejo" ];
|
offsite.paths = [ "/var/lib/forgejo" ];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue