This commit is contained in:
@@ -198,6 +198,16 @@ func (a *App) handleHealthCheck(w http.ResponseWriter, r *http.Request) {
|
||||
health.Checks["iscsi"] = "healthy"
|
||||
}
|
||||
|
||||
// Check maintenance mode
|
||||
if a.maintenanceService != nil && a.maintenanceService.IsEnabled() {
|
||||
health.Checks["maintenance"] = "enabled"
|
||||
if health.Status == "healthy" {
|
||||
health.Status = "maintenance"
|
||||
}
|
||||
} else {
|
||||
health.Checks["maintenance"] = "disabled"
|
||||
}
|
||||
|
||||
// Set HTTP status based on health
|
||||
statusCode := http.StatusOK
|
||||
if health.Status == "unhealthy" {
|
||||
|
||||
Reference in New Issue
Block a user