feat: add comprehensive endpoint health monitoring
- Add GitHub Action workflow that runs every 5 minutes testing: - Basic health endpoint - Database connectivity (tools API) - Collections and Agents public APIs - MCP HTTP transport (initialize + tools/list) - MCP SSE transport - MCP server info endpoint - Tool health stats - Add /api/health/report endpoint for storing health check results - Add EndpointHealthReport Prisma model for persistence - Add /health status page with: - Real-time status banner - Uptime percentage - Per-service health stats - Recent health check history - Auto-refresh every 30 seconds 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
ee6d66a98e
commit
37ac263799
5 changed files with 891 additions and 1 deletions
|
|
@ -790,3 +790,32 @@ model UserActivity {
|
|||
@@index([createdAt])
|
||||
@@map("user_activities")
|
||||
}
|
||||
|
||||
// ============================================================================
|
||||
// Endpoint Health Monitoring Models
|
||||
// ============================================================================
|
||||
|
||||
/// EndpointHealthReport - stores health check results from GitHub Actions or other monitoring
|
||||
model EndpointHealthReport {
|
||||
id String @id @default(cuid())
|
||||
|
||||
// Report metadata
|
||||
timestamp DateTime
|
||||
source String @db.VarChar(50) // 'github-actions' | 'manual' | 'uptime-robot' etc.
|
||||
runId String? @map("run_id") @db.VarChar(100) // GitHub Actions run ID
|
||||
|
||||
// Check results
|
||||
checks Json @db.JsonB // { check_name: 'pass' | 'fail' }
|
||||
passCount Int @map("pass_count")
|
||||
failCount Int @map("fail_count")
|
||||
totalChecks Int @map("total_checks")
|
||||
overallStatus String @map("overall_status") @db.VarChar(20) // 'healthy' | 'degraded' | 'down'
|
||||
|
||||
// Timestamps
|
||||
createdAt DateTime @default(now()) @map("created_at")
|
||||
|
||||
@@index([timestamp])
|
||||
@@index([overallStatus])
|
||||
@@index([source])
|
||||
@@map("endpoint_health_reports")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue