Skip to content

Orchestrator monitoring pack

KiCI ships a starter monitoring pack for a self-hosted orchestrator: one importable Grafana dashboard and a set of Prometheus alert rules covering the signals that matter at 2am — dispatch queue depth, stale runs, the event DLQ, scaler spawn failures, and agent-vs-backlog health. Every metric the pack references is one the orchestrator already exports on its /metrics endpoint, so there is no extra instrumentation to install.

  • Grafana dashboard — a single “KiCI orchestrator health” board: fleet size, dispatch queue by status and runner label, the event DLQ and delivery outcomes, scaler CPU/memory reservation and spawn failures, consecutive job failures, declared-host reachability, database collation drift, inbound webhook rate, and org trust-policy gate decisions.
  • Alert rules — ten Prometheus alert rules with tuned thresholds and per-rule rationale.
  1. In Grafana, go to Dashboards → New → Import.
  2. Upload kici-orchestrator-dashboard.json (or paste its contents).
  3. When prompted, select your Prometheus data source for the DS_PROMETHEUS input.
  4. Save.

The dashboard prompts for the data source on import rather than hard-coding one, so it drops into any Grafana that scrapes your orchestrator.

Wire kici-orchestrator-alerts.yaml into your Prometheus rule_files: (or your Grafana / Mimir ruler) and reload. Point the alerts at your notification channel of choice. The file is a standard Prometheus rule-group document — a single kici-orchestrator group — so it needs no conversion.

Thresholds are starting points. QueueDepthSaturated and JobConsecutiveFailures in particular are workload-dependent — tune them to your fleet size and job mix.

AlertExpressionForSeverityWhy this threshold
QueueDepthSaturatedkici_orch_dispatch_queue_depth{status="pending"} > 5010mwarningPending work should drain as agents pick it up. A sustained backlog means the scaler is starved or stuck. 50 is deployment-size-dependent — tune to your fleet.
AgentsAllGoneWithBacklog(sum(kici_orch_agents_active) == 0) and (sum(kici_orch_dispatch_queue_depth{status="pending"}) > 0)10mcriticalZero agents while jobs are queued is a hard stall. It also catches a lost connection to the hosted Platform: if the relay drops and the fleet drains, queued work has nothing to run it.
StaleRunsPresentkici_orch_stale_runs_current > 015mwarningAny stale run signals an agent that stopped heartbeating. The 15-minute window avoids flapping on transient detection.
EventDLQGrowingincrease(kici_orch_event_dlq_total[1h]) > 00mwarningDLQ rows are never cleaned by TTL, so growth — not standing depth — is the pager. Any new admission means an event exhausted its retries.
EventDLQBacklogkici_orch_event_dlq_depth > 030minfoStanding DLQ depth is a todo, not a page. Informational so you triage the backlog without being paged for it.
ScalerSpawnFailingincrease(kici_orch_scaler_spawn_failures_total[15m]) > 00mwarningAny spawn failure means some jobs cannot get an agent — worth a look at the backend and resource caps.
JobConsecutiveFailureskici_orch_job_consecutive_failures > 30mwarningA scheduled job failing three-plus times in a row is stuck, not a blip. Tune the count to your job mix.
DeclaredHostUnreachablekici_orch_declared_hosts_unreachable > 010mwarningA statically-declared roster host that is unreachable cannot take work.
DbCollationDriftkici_orch_db_collation_drift > 00mwarningCollation drift can silently hide present rows from text-index lookups — reindex after aligning the collation version.
StateReplayBreakerOpenincrease(kici_orch_state_replay_breaker_trips_total[15m]) > 00mwarningThe orchestrator gave up replaying run state to the Platform after repeated rejections and connected without it, so the Platform run mirror is knowingly stale. The 15m increase keeps the alert true long enough to survive Alertmanager grouping.

The orchestrator relays webhooks and dispatch over a connection to the hosted KiCI Platform. Two pack signals reflect its health without a dedicated connectivity metric: the Webhooks received rate panel shows inbound flow drying up, and AgentsAllGoneWithBacklog fires when the fleet drains while work is still queued — the shape a dropped relay produces once existing agents finish.