Savannah Cloud

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
}
FieldDescription
totalTotal jobs created in the org
pendingJobs waiting in the queue
processingJobs currently executing
doneSuccessfully completed jobs
failedJobs that exhausted retries
success_rateCompletion percentage
jobs_todayJobs in the last 24 hours
jobs_weekJobs in the last 7 days

Prometheus metrics

GET /metrics

This endpoint exposes Prometheus text data for monitoring jobs, workers, CPU, memory, and bandwidth.

Common metrics

MetricTypeDescription
jobs_queued_totalCounterJobs queued for processing
jobs_completed_totalCounterJobs successfully completed
jobs_failed_totalCounterJobs failed after retries
worker_pool_sizeGaugeActive worker pool size
cpu_seconds_totalCounterCPU usage per org or node
memory_mb_totalGaugeMemory consumption

Example scrape config

scrape_configs:
  - job_name: savannah_cloud
    static_configs:
      - targets: ['localhost:8080']

Health check

GET /health

Response 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

On this page