Skip to content

Commit 2006f76

Browse files
authored
add health check endpoint for service status monitoring (#1248)
feat: add health check endpoint for service status monitoring
1 parent f354acf commit 2006f76

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/memos/api/server_api.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@
2929
# Include routers
3030
app.include_router(server_router)
3131

32+
33+
@app.get("/health")
34+
def health_check():
35+
"""Container and load balancer health endpoint."""
36+
return {
37+
"status": "healthy",
38+
"service": "memos",
39+
"version": app.version,
40+
}
41+
3242
# Request validation failed
3343
app.exception_handler(RequestValidationError)(APIExceptionHandler.validation_error_handler)
3444
# Invalid business code parameters

0 commit comments

Comments
 (0)