Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Cluster Monitoring & Observability

Prometheus Metrics

Lattice exposes Prometheus-compatible metrics at GET /metrics on the REST port (default 8080).

Key Metrics

MetricTypeDescription
lattice_allocations_totalCounterTotal allocations by state
lattice_allocations_activeGaugeCurrently running allocations
lattice_scheduling_cycle_duration_secondsHistogramScheduling cycle latency
lattice_scheduling_placements_totalCounterSuccessful placements
lattice_scheduling_preemptions_totalCounterPreemption events
lattice_raft_commit_latency_secondsHistogramRaft commit latency
lattice_raft_sensitive_audit_entries_totalCounterSensitive audit log entries
lattice_api_request_duration_secondsHistogramAPI request latency
lattice_api_requests_totalCounterAPI requests by method and status
lattice_nodes_totalGaugeNodes by state
lattice_checkpoint_duration_secondsHistogramCheckpoint operation latency

Allocation Dispatch Metrics

These cover the Dispatcher → agent bridge (RunAllocation, rollback, completion-report flow). Most have labels; see below for typical label values.

MetricTypeLabelsDescription
lattice_dispatch_attempt_totalCounternode_id, resultOne increment per RunAllocation RPC attempt. result ∈ accepted / accepted_already_running / transient_failure / refusal_busy / refusal_unsupported / refusal_malformed.
lattice_dispatch_rollback_totalCounterreasonRollbackDispatch commits. reason ∈ retry_exhausted / partial_accept / unsupported_capability / malformed_request / silent_sweep.
lattice_dispatch_rollback_stop_sent_totalCounterresultBest-effort StopAllocation RPCs issued after a rollback. result ∈ success / failure.
lattice_dispatch_skipped_unschedulable_totalCounternode_id, node_stateDispatcher skipped an allocation because an assigned node was not Ready. Sustained non-zero rate suggests the scheduler is placing onto Draining / Degraded / Down nodes.
lattice_completion_report_cross_node_totalCounternode_idReports rejected because the source node is not in allocation.assigned_nodes (INV-D12). Non-zero indicates a buggy agent or spoofing attempt.
lattice_completion_report_phase_regression_totalCountercurrent_phase, reported_phaseReports rejected for phase regression (INV-D7).
lattice_dispatch_unknown_refusal_reason_totalCounterreason_codeUnknown refusal_reason values received — indicates rolling-upgrade skew between agent and lattice-api versions.
lattice_node_degraded_by_dispatch_totalCounternode_idNodes transitioned to Degraded via the max_node_dispatch_failures cap.
lattice_cancel_stop_sent_totalCounterresultStopAllocation fan-out triggered by a user cancel (INT-1).

Scrape Configuration

# prometheus.yml
scrape_configs:
  - job_name: 'lattice'
    static_configs:
      - targets:
        - 'lattice-01:8080'
        - 'lattice-02:8080'
        - 'lattice-03:8080'

Grafana Dashboards

Pre-built dashboards are in infra/grafana/dashboards/:

  • Cluster Overview — node states, allocation throughput, queue depth
  • Scheduling Performance — cycle latency, placement rate, preemption rate
  • Raft Health — commit latency, leader elections, log compaction
  • Per-Tenant Usage — resource consumption, fair-share deficit

Import via Grafana UI or provision from infra/grafana/provisioning/.

Alerting Rules

Pre-configured alerting rules in infra/alerting/:

AlertCondition
LatticeRaftNoLeaderNo Raft leader for > 30s
LatticeNodeDownNode heartbeat lost for > 5m
LatticeSchedulingStalledNo placements for > 10m with pending jobs
LatticeHighPreemptionRate> 10 preemptions/minute
LatticeCheckpointFailureCheckpoint success rate < 90%
LatticeDiskSpaceLowRaft data directory > 80% full
LatticeDispatchRollbackRaterate(lattice_dispatch_rollback_total[5m]) > 0.1 for 10m
LatticeDispatchSkippedUnschedulableNon-zero lattice_dispatch_skipped_unschedulable_total sustained > 5m (scheduler placing on non-Ready nodes)
LatticeCrossNodeCompletionReportsAny lattice_completion_report_cross_node_total increment (possible spoofing or buggy agent)
LatticeDispatchRefusalSkewAny lattice_dispatch_unknown_refusal_reason_total increment (agent/control-plane version skew)

TSDB Integration

Lattice pushes per-node telemetry to VictoriaMetrics (or any Prometheus-compatible remote write endpoint).

telemetry:
  tsdb_endpoint: "http://victoriametrics:8428"
  prod_interval_seconds: 30

Telemetry includes CPU, memory, GPU utilization, network I/O, and disk I/O per node.

Audit Log

Sensitive workload operations are recorded in the Raft-committed audit log:

# Query audit log
curl "http://lattice-01:8080/api/v1/audit?tenant=sensitive-team&from=2026-03-01"

Audit entries include: node claims/releases, allocation lifecycle events, and access log entries. Retention: 7 years (configurable).

Health Check

curl http://lattice-01:8080/healthz
# {"status": "ok"}

Used by Docker/Kubernetes health probes and load balancers.