feat: add public status page with component health monitoring and system metrics visualization
Add statuspage package with service, handler, and types for exposing platform health. Implement GET /api/v1/status endpoint returning operational status, component health (API, database, gateway runtime), and control plane summary counts. Add Service.Snapshot method querying database connectivity, user/device/gateway/service/policy counts, connected device count via handshake timestamps, and gateway runtime tel
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
"nexavpn/backend/internal/group"
|
||||
"nexavpn/backend/internal/policy"
|
||||
"nexavpn/backend/internal/servicecatalog"
|
||||
"nexavpn/backend/internal/statuspage"
|
||||
"nexavpn/backend/internal/user"
|
||||
)
|
||||
|
||||
@@ -25,6 +26,7 @@ type Handlers struct {
|
||||
Gateway *gateway.Handler
|
||||
Group *group.Handler
|
||||
Audit *audit.Handler
|
||||
Status *statuspage.Handler
|
||||
}
|
||||
|
||||
func NewRouter(jwtSecret string, handlers Handlers) http.Handler {
|
||||
@@ -36,6 +38,7 @@ func NewRouter(jwtSecret string, handlers Handlers) http.Handler {
|
||||
})
|
||||
|
||||
r.Route("/api/v1", func(r chi.Router) {
|
||||
r.Get("/status", handlers.Status.PublicStatus)
|
||||
r.Get("/auth/bootstrap/status", handlers.Auth.BootstrapStatus)
|
||||
r.Post("/auth/bootstrap", handlers.Auth.Bootstrap)
|
||||
r.Post("/auth/login", handlers.Auth.Login)
|
||||
|
||||
Reference in New Issue
Block a user