Commit Graph
6 Commits
Author SHA1 Message Date
nutcas3 47c57c9b48 feat: Add timeout handling to health check execution with goroutine-based result channel
- Add resultChan channel to receive health check results asynchronously
- Execute checker.CheckHealth in goroutine to enable timeout detection
- Add select statement to handle both successful completion and timeout cases
- Return StatusUnhealthy with "Health check timed out" message on context timeout
- Set ResponseTime to 10 seconds when timeout occurs
2026-04-25 06:34:12 +03:00
nutcas3 79f217ff1b feat: Fix formatting, type conversion, and test assertions in middleware and monitoring modules
- Add fmt import and fix X-RateLimit-Limit header conversion from rune to string in ratelimit middleware
- Fix whitespace alignment for rate limiter variable declarations and JSON error responses
- Update mock expectations in redis_ratelimit_test to use explicit argument type matchers
- Add severity validation check in alerting_test rule validation
- Fix health_test assertions for degraded/unhealthy counts
2026-04-25 01:07:52 +03:00
nutcas3 e2e39d8b37 feat: Add comprehensive API integration tests with authentication, RBAC, and endpoint coverage for all platform handlers
- Add TestSetup struct with DB/Router/AuthService/test users/JWT tokens for test environment initialization
- Add setupTest function with SQLite in-memory database, user/plugin/automation/config/auth session migrations, and test user creation with admin/operator/viewer/user roles
- Add makeRequest helper for authenticated HTTP requests with Bearer token and JSON body support
2026-04-23 02:58:34 +03:00
nutcas3 bda6c5931c feat: Add comprehensive alerting system with rule evaluation, multi-channel notifications, and health-based alert triggers
- Add AlertSeverity enum with info/warning/critical levels and AlertStatus enum with firing/resolved/silenced states
- Add Alert struct with id/name/description/severity/status/timestamp/labels/annotations/last_evaluated fields
- Add AlertRule struct with id/name/description/severity/query/threshold/duration/labels/enabled fields for rule definitions
- Add AlertManager struct with rules
2026-04-23 02:57:44 +03:00
nutcas3 dd7ff85da6 feat: Add comprehensive health monitoring system with component checks, system metrics, and HTTP handlers
- Add HealthStatus enum with healthy/degraded/unhealthy states and HealthCheck struct with name/status/message/last_checked/response_time/metadata fields
- Add SystemHealth struct with status/timestamp/uptime/version/environment/checks/summary fields and HealthSummary with total/healthy/degraded/unhealthy counts
- Add HealthMonitor struct with checks map, mutex, startTime, version, env fields
2026-04-23 02:57:31 +03:00
nutcas3 a6ec720df3 feat: Add Prometheus service client with instant query execution, alert retrieval, and health checking
- Add PrometheusService struct with baseURL/http.Client (10s timeout) and PROMETHEUS_URL env config (default: http://prometheus:9090)
- Add Available method with /-/ready endpoint health check
- Add Query method with instant PromQL execution via /api/v1/query, URL escaping, error handling
- Add promResponse/promVectorData/PromVectorSample structs for query result parsing with metric/value fields
2026-04-20 18:10:36 +03:00