Monitoring

Health Checks

Liveness: GET /health

Returns 200 if the server process is running.

{"status":"ok","uptime":123.45,"version":"0.1.0","environment":"development","demoMode":false}

Readiness: GET /health/ready

Checks all provider connections. Returns 503 if any is down.


Prometheus Metrics

GET /metrics

Counters:

MetricLabelsDescription
mcp_messages_sent_totalchannelMessages sent by channel
mcp_tool_calls_totaltoolTool invocations by name
mcp_rate_limit_hits_totallimit_typeRate limit triggers
mcp_http_rate_limit_hits_totalHTTP rate limit triggers
mcp_webhook_received_totaltypeInbound webhooks by type
mcp_auth_failures_totalAuthentication failures

Gauges:

MetricDescription
mcp_active_voice_sessionsCurrent live voice calls
mcp_active_agentsProvisioned active agents

Structured Logging

JSON logs to stdout. Compatible with ELK, Datadog, Loki.

{"level":"info","timestamp":"2026-02-15T12:00:00Z","event":"send_message_success","agentId":"agent-001","channel":"sms"}

No PII in logs. Only routing metadata (agent ID, channel, direction).


Audit Log

Immutable append-only log with SHA-256 hash chain. Each entry links to the previous via prev_hash.

FieldDescription
idUUID
timestampISO timestamp
event_typePROVISION, DEPROVISION, AUTH_FAILURE, etc.
actorAgent ID or "system"
targetWhat was affected
detailsJSON context
prev_hashHash of previous entry
row_hashSHA-256 of current entry

Any tampering breaks the hash chain.


Alert System

SeverityRouting
CRITICALWhatsApp to admin + log
HIGHWhatsApp to admin + log
MEDIUMLog only
LOWLog only

Configuration

ADMIN_WHATSAPP_NUMBER=+15551234567

ADMIN_WHATSAPP_SENDER=whatsapp:+14155238886

Alert Triggers

TriggerSeverity
Rate limit exceededMEDIUM
Auth failure / brute forceHIGH
Anomaly detectedMEDIUM-HIGH
Spending approaching limit (80%)MEDIUM
Provider errorHIGH

Dashboard

GET /admin/dashboard

Web UI: system health, provider status, active agents, usage summary, recent alerts. Auto-refreshes every 30 seconds.

GET /admin/api/dashboard

JSON API for dashboard data.

← Home