Added a questionable ping and changed HTTP head to get

This commit is contained in:
2025-08-29 23:18:36 +02:00
parent 8e794ec7f5
commit 877fce9b7a
2 changed files with 22 additions and 4 deletions

View File

@@ -7,6 +7,7 @@ class service:
online: bool
public: bool
error: Optional[str]
ping: Optional[int]
def __init__(self, url: str = "", public: bool = True):
self.url = url
@@ -15,6 +16,7 @@ class service:
self.online = False
self.status = None
self.error = None
self.ping = None
def to_dict(self) -> dict[str, Any]:
return {
@@ -23,6 +25,7 @@ class service:
"public": self.public,
"online": self.online,
"error": self.error,
"ping": self.ping,
}
def set_status(self, status: Optional[int]):
@@ -34,9 +37,19 @@ class service:
def set_error(self, s: Optional[str]):
self.error = s
def set_ping(self, n: Optional[int]):
self.ping = n
services: list[service] = [
service("https://git.ihatemen.uk"),
service("https://plex.ihatemen.uk"),
service("https://truenas.local", False),
service("https://git.ihatemen.uk/"),
service("https://plex.ihatemen.uk/"),
service("https://truenas.local/", False),
service("https://cloud.ihatemen.uk/"),
service("https://request.ihatemen.uk/"),
service("https://id.ihatemen.uk/"),
service("http://tautulli.local", False),
service("https://transmission.local", False),
service("https://vault.ihatemen.uk"),
service("https://nginx.local", False),
]