Skip to main content

GET health

A monitoring endpoint that checks Frappe and ClickHouse connectivity. Does not require authentication.

Endpoint

GET /api/method/konsol.api.health

Authentication: None required (allow_guest=True)

Response

{
"message": {
"status": "ok",
"app": "konsol",
"clickhouse": {
"status": "healthy",
"clickhouse_reachable": true,
"recent_sync_failures": [],
"message": "All systems operational"
}
}
}

The top-level status is derived from ClickHouse health:

statusMeaning
okFrappe is up and ClickHouse is healthy (reachable, no recent sync failures)
degradedClickHouse is reachable but one or more tables have recent sync failures (see clickhouse.recent_sync_failures)
downClickHouse is unreachable

The nested clickhouse object carries the detail: status (healthy | degraded | down), clickhouse_reachable, recent_sync_failures (list of {table, ...}), and a human-readable message.

Example

curl http://localhost:8069/api/method/konsol.api.health

Usage

Monitoring / Uptime Checks

Point your monitoring system (UptimeRobot, Pingdom, etc.) at this endpoint. A 200 response with "status": "ok" confirms Frappe, the Konsol app, and ClickHouse are healthy. Treat "degraded" as a warning (data may be stale) and "down" as critical (ClickHouse unreachable).

Docker Health Check

healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8069/api/method/konsol.api.health"]
interval: 30s
timeout: 5s
retries: 3

VBA Debug

The EPM_Debug macro calls this endpoint as its first connectivity test. If it fails, the Frappe server is unreachable.

Notes

  • This endpoint verifies ClickHouse connectivity (SELECT 1) and reports recent ingestion sync failures in addition to confirming the Frappe web server and Konsol app are loaded.
  • Because it issues a ClickHouse query, it is slightly heavier than a pure web-server ping — fine for 30s-interval checks, but avoid hammering it at sub-second intervals.
  • For broader stack monitoring guidance, see Monitoring.