Skip to Content
Health

Health

The Health resource provides service health monitoring and system metrics for your Glow instance. Use it to track uptime, latency, CPU, memory, and error rates over time. Health is an API-only resource with no CLI commands.

Health page showing system status indicators for database, AI providers, and services

What is Health?

Health aggregates hourly service check results and system metrics into time-series views. It answers questions like: Is the instance healthy? What was the uptime last week? Are latency or error rates trending up? Administrators use health data to monitor their university’s Glow deployment and diagnose performance issues before they affect users.

The health response includes two materialized views:

  • service_hourly — per-hour uptime, check counts, latency, and error status for each monitored service.
  • metrics_hourly — per-hour CPU, memory, request counts, and error totals.

Quick Start

API

Fetch health data for the last 7 days:

Calls below use $GLOW_INSTANCE_URL + $GLOW_TOKEN — see Authentication to export them once.

curl -X POST $GLOW_INSTANCE_URL/system/health \ -H "Authorization: Bearer $GLOW_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "date_from": "2026-03-21", "date_to": "2026-03-28", "page_limit": 100, "page_offset": 0 }'

Filter by service:

curl -X POST $GLOW_INSTANCE_URL/system/health \ -H "Authorization: Bearer $GLOW_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "service": "glow-api", "date_from": "2026-03-21", "date_to": "2026-03-28" }'

Understanding the Response

Service Hourly View

Each service_hourly entry contains:

FieldDescription
date_hourHour bucket (e.g., "2026-03-28T14:00:00Z")
serviceService name (e.g., "glow-api")
check_countTotal health checks in this hour
ok_countSuccessful checks
fail_countFailed checks
uptime_percentUptime as a percentage (0—100)
avg_latency_msAverage response latency in milliseconds
min_latency_msMinimum latency observed
max_latency_msMaximum latency observed
latest_okWhether the most recent check passed
latest_errorError message from the most recent failure (empty if healthy)

Metrics Hourly View

Each metrics_hourly entry contains:

FieldDescription
date_hourHour bucket
sample_countNumber of metric samples collected
avg_cpu_percent / min / maxCPU utilization
avg_latency_ms / min / maxRequest latency
avg_memory_bytes / min / maxMemory usage
max_requests_totalPeak total request count
max_errors_totalPeak total error count

Refreshing and Exporting

Refresh materialized views to ensure health data is current:

curl -X POST $GLOW_INSTANCE_URL/system/refresh \ -H "Authorization: Bearer $GLOW_TOKEN"

Returns success, refreshed_views, and invalidated_tags.

Export health data as a denormalized ZIP for offline analysis:

curl -X POST $GLOW_INSTANCE_URL/system/export \ -H "Authorization: Bearer $GLOW_TOKEN"

Returns content (base64-encoded), file_name, mime_type, and row_count.

Common Operations

OperationMethodEndpoint
Get health dataPOSTPOST /system/health
Refresh viewsPOSTPOST /system/refresh
Export data (ZIP)POSTPOST /system/export
Get documentationPOST/health/docs
Last updated on