Skip to content

[Feature Request - RAGFlow+OceanBase] OceanBase Performance Monitoring and Health Check Integration #12772

@yuzhichang

Description

@yuzhichang

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

  1. 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
            }
        }
  2. Monitoring Metrics

    • Connection status (connected/disconnected)
    • Query latency (ms)
    • Storage space usage
    • Query throughput (QPS)
    • Slow query statistics
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions