Checks API
시스템 상태 확인을 위한 API입니다.
개요
Checks API를 통해 D.Hub 시스템의 상태와 연결된 서비스들의 헬스 체크를 수행할 수 있습니다.
엔드포인트
GET /api/v1/checks/health
시스템 헬스 체크를 수행합니다.
Response
200 OK
{
"status": "healthy",
"timestamp": "2024-01-20T10:30:00Z"
}
GET /api/v1/checks/prefect
Prefect 워크플로우 엔진 상태를 확인합니다.
Response
200 OK
{
"connected": true,
"version": "3.x.x",
"api_url": "http://prefect-server:4200/api"
}
GET /api/v1/checks/storage
객체 저장소(S3/MinIO) 상태를 확인합니다.
Response
200 OK
{
"connected": true,
"endpoint": "http://minio:9000",
"buckets": ["manifests", "tables", "objects"]
}
GET /api/v1/checks/clickhouse
ClickHouse 데이터베이스 상태를 확인합니다.
Response
200 OK
{
"connected": true,
"version": "24.x.x",
"host": "clickhouse:8123"
}
GET /api/v1/checks/neo4j
Neo4j 그래프 데이터베이스 상태를 확인합니다.
Response
200 OK
{
"connected": true,
"version": "5.x.x",
"database": "neo4j"
}
사용 예시
# 전체 헬스 체크
curl https://api.dhub.io/api/v1/checks/health \
-H "Authorization: Bearer <access_token>"
# Prefect 상태 확인
curl https://api.dhub.io/api/v1/checks/prefect \
-H "Authorization: Bearer <access_token>"
모니터링 통합
헬스 체크 엔드포인트를 Kubernetes liveness/readiness probe나 외부 모니터링 시스템과 통합하여 시스템 상태를 지속적으로 모니터링할 수 있습니다.