Overview
Add performance monitoring metrics and health check API endpoints for OceanBase, following the existing ES/Infinity health check implementation.
Technical Details
Location
api/utils/health_utils.py (lines 71-91)
api/apps/system_app.py (add new health check endpoint)
Implementation Plan
-
Health Check Function
async def check_oceanbase_health():
"""Check OceanBase health status"""
return {
"status": "healthy",
"details": {
"connection": "connected",
"latency_ms": 5.2,
"storage_used": "1.2GB",
"storage_total": "100GB",
"query_per_second": 150
}
}
-
Monitoring Metrics
- Connection status (connected/disconnected)
- Query latency (ms)
- Storage space usage
- Query throughput (QPS)
- Slow query statistics
-
API Endpoint
- Add to
/system/health response
- Provide OceanBase-specific health status
Reference Implementation
api/utils/health_utils.py:71-91 - ES/Infinity health check
Estimated Effort
- Code size: ~80 lines
- Difficulty: ⭐⭐ Low
- Priority: 🟡 Medium
Related Files
api/utils/health_utils.py - Health check utilities
api/apps/system_app.py - System API
rag/utils/ob_conn.py - OceanBase connection
Acceptance Criteria
/system/health API returns OceanBase health status
- Monitoring metrics accurately reflect OceanBase running status
- Clear error messages when health checks fail
- Response time within 100ms
Background
This is part of the RAGFlow + OceanBase Hackathon to enable users and operations teams to monitor OceanBase health status and performance metrics for troubleshooting and system maintenance.
Overview
Add performance monitoring metrics and health check API endpoints for OceanBase, following the existing ES/Infinity health check implementation.
Technical Details
Location
api/utils/health_utils.py(lines 71-91)api/apps/system_app.py(add new health check endpoint)Implementation Plan
Health Check Function
Monitoring Metrics
API Endpoint
/system/healthresponseReference Implementation
api/utils/health_utils.py:71-91- ES/Infinity health checkEstimated Effort
Related Files
api/utils/health_utils.py- Health check utilitiesapi/apps/system_app.py- System APIrag/utils/ob_conn.py- OceanBase connectionAcceptance Criteria
/system/healthAPI returns OceanBase health statusBackground
This is part of the RAGFlow + OceanBase Hackathon to enable users and operations teams to monitor OceanBase health status and performance metrics for troubleshooting and system maintenance.