Usage & Metrics
Query usage totals, health checks, and Prometheus metrics for your organization.
Usage stats
GET /usage
Authorization: Bearer <token>Response 200
{
"total": 1240,
"pending": 12,
"processing": 3,
"done": 1200,
"failed": 25,
"success_rate": 97.97,
"jobs_today": 87,
"jobs_week": 540
}| Field | Description |
|---|---|
total | Total jobs created in the org |
pending | Jobs waiting in the queue |
processing | Jobs currently executing |
done | Successfully completed jobs |
failed | Jobs that exhausted retries |
success_rate | Completion percentage |
jobs_today | Jobs in the last 24 hours |
jobs_week | Jobs in the last 7 days |
Prometheus metrics
GET /metricsThis endpoint exposes Prometheus text data for monitoring jobs, workers, CPU, memory, and bandwidth.
Common metrics
| Metric | Type | Description |
|---|---|---|
jobs_queued_total | Counter | Jobs queued for processing |
jobs_completed_total | Counter | Jobs successfully completed |
jobs_failed_total | Counter | Jobs failed after retries |
worker_pool_size | Gauge | Active worker pool size |
cpu_seconds_total | Counter | CPU usage per org or node |
memory_mb_total | Gauge | Memory consumption |
Example scrape config
scrape_configs:
- job_name: savannah_cloud
static_configs:
- targets: ['localhost:8080']Health check
GET /healthResponse 200
{ "status": "ok" }This endpoint is useful for load balancers and uptime monitoring.
Quick examples
# Usage stats
curl http://localhost:8080/usage \
-H "Authorization: Bearer YOUR_JWT"
# Prometheus metrics
curl http://localhost:8080/metrics
# Health check
curl http://localhost:8080/health