Skip to content

Orbit NATS JetStream SLO alerts

Covers OrbitServiceNatsJetstreamErrorSLOViolation, OrbitServiceNatsJetstreamTrafficCessation and OrbitServiceNatsJetstreamTrafficAbsent.

JetStream is the persistence layer on the NATS cluster: it stores the indexing job streams and the KV buckets (locks, indexing progress).

These alerts are severity s3 and do not page. The SLI is tagged platform_insights, which has no SLO-alert Slack routing in services/teams.yml, so these alerts go to the default alert feed rather than a team channel.

  • Orbit service overview
  • NATS runbook
  • SLI owner team: platform_insights (the Siphon/DIP platform team, also behind the NATS cluster). The Orbit indexers consuming NATS are owned by context_systems.

OrbitServiceNatsJetstreamErrorSLOViolation

Section titled “OrbitServiceNatsJetstreamErrorSLOViolation”

Message redeliveries are rising. A redelivery means a consumer took a message but did not acknowledge it in time, so JetStream handed it out again. This is how indexer failures self-heal, but a rising rate means work is failing repeatedly.

OrbitServiceNatsJetstreamTrafficCessation / TrafficAbsent

Section titled “OrbitServiceNatsJetstreamTrafficCessation / TrafficAbsent”

No JetStream messages are moving. TrafficCessation means traffic recently dropped to zero, TrafficAbsent means it has been missing for longer.

The nats_jetstream SLI in metrics-catalog/services/orbit.jsonnet uses JetStream stream and consumer metrics (total messages, redeliveries) from the Prometheus exporter.

A low background redelivery rate is normal during deploys and pod restarts. Sustained growth is not.

  • Silence via Alertmanager filtered on the alertname.
  • Redeliveries spike during indexer rollouts (in-flight messages get redelivered). A spike that lines up with a deploy and settles within minutes is expected.
  • s3, no paging. User impact is indexing delay. A redelivery loop on one subject can also starve other work on the same consumer.

The alerts fire on these recording rules in the mimir-analytics-eventsdot datasource (Grafana Explore):

# Error ratio
gitlab_component_errors:ratio_1h{type="orbit", component="nats_jetstream", monitor="global"}
# Request rate (traffic cessation fires when this drops to zero)
gitlab_component_ops:rate_1h{type="orbit", component="nats_jetstream", monitor="global"}
SymptomCauseAction
Redeliveries concentrated on one subjectPoison message: a task that fails on every attemptFind the failing handler in the logs, then purge the subject or wait for dead-lettering (code tasks)
Redeliveries across all subjectsConsumers too slow: ClickHouse insert latency or undersized poolsCheck ClickHouse first, then scale the indexer pools
Consumer stopped consuming after a config changeJetStream does not apply config changes to existing streams or buckets in placeDelete the stream or KV bucket and restart the pod so Orbit recreates it (Common signatures)
Ack pending grows, disk followsConsumers lagging, persisted messages accumulateScale indexers; disk has its own paging alert (nats_disk_space) with runbook docs/nats/operations.md

Dead letter queue procedures (inspect, replay, purge) are in the KG repo’s code indexing runbook.

  • Remove or dead-letter the poison message, then replay once the cause is fixed.
  • Scale the consuming pool or relieve ClickHouse pressure (Pause and resume indexing).
  • Consumers: indexer pools. Producers: dispatcher, Siphon. Storage: JetStream file storage on the NATS PVCs, backed up by the Velero schedule velero-nats-backup.
  • Ask in #g_analytics_platform_insights (platform_insights, owns the NATS layer) or #f_orbit_dev (context_systems, owns the Orbit consumers).
  • Generic SLO playbooks: ErrorSLOViolation, TrafficAbsent.