diff --git a/main.go b/main.go index db98663..fc45da4 100644 --- a/main.go +++ b/main.go @@ -283,11 +283,22 @@ func adminHandler(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "text/html; charset=utf-8") + // Check service statuses autheliaUp := false if resp, err := http.Get("http://127.0.0.1:9091/api/health"); err == nil { autheliaUp = resp.StatusCode == 200 resp.Body.Close() } + caddyUp := false + if resp, err := http.Get("http://127.0.0.1:80/"); err == nil { + caddyUp = true + resp.Body.Close() + } + launcherUp := false + if resp, err := http.Get("http://127.0.0.1:9000/health"); err == nil { + launcherUp = resp.StatusCode == 200 + resp.Body.Close() + } userLang := os.Getenv("LANG") if userLang == "" { @@ -302,6 +313,8 @@ func adminHandler(w http.ResponseWriter, r *http.Request) { "Domain": domain, "AdminEmail": adminEmail, "AutheliaUp": autheliaUp, + "CaddyUp": caddyUp, + "LauncherUp": launcherUp, "Lang": userLang, }) @@ -943,7 +956,9 @@ const adminHTML = `
Domain
{{.Domain}}
Admin Email
{{.AdminEmail}}
-
Authelia
{{if .AutheliaUp}}Running{{else}}Unreachable{{end}}
+
Caddy
{{if .CaddyUp}}Running{{else}}Down{{end}}
+
Authelia
{{if .AutheliaUp}}Running{{else}}Down{{end}}
+
Launcher
{{if .LauncherUp}}Running{{else}}Down{{end}}