Skip to content

Ingest inbox

Argavon writes every alert payload it accepts to the ingest inbox before it answers the sender. If the server stops between accepting an alert and putting it in an incident, the alert is still in the inbox and is processed when the server comes back. This is on every plan.

It covers:

  • the webhook endpoints /api/v1/ingest/prometheus, /api/v1/ingest/grafana and /api/v1/ingest/zabbix: every payload;
  • OpenTelemetry (/api/v1/otel/logs, /metrics, /traces): payloads with something that opens an incident (an error log, a failing request). Plain telemetry (INFO logs, ordinary metric points, spans) opens nothing and is stored as before, without the inbox;
  • the Argavon agent (/api/v1/ingest/agent): batches with an error log. Metric batches are stored as before; a metric only opens an incident through the anomaly check, which the next sample, seconds later, repeats.

What the sender sees

Answer Meaning
200 The payload is in the inbox and its alerts are in incidents. (OTLP answers 202, its usual success.)
202 {"status":"queued"} The payload is in the inbox, but some alerts could not be stored yet (for example the database was busy). The inbox retries them. Do not send it again.
400 The payload was rejected (bad JSON, no alerts). It is not in the inbox; it is kept in the dead-letter queue (GET /api/v1/ingest/dlq). Fix the sender.
503 The inbox could not be written. Nothing was kept. Prometheus Alertmanager, Grafana and Zabbix all retry on a 5xx.

How a payload is processed

  1. The request writes the payload to the inbox (pending).
  2. The same request turns its alerts into incidents, as before.
  3. When that finishes the row is done.

If step 2 fails, the row stays pending and is retried after 30 seconds, then 1, 2 and 4 minutes. After 5 failed tries it is failed: a dead letter. It stays until someone replays it.

If the server stops in the middle, the row is still pending. Every server re-runs pending rows when it starts and then every 15 seconds. A row is only picked up a minute after it arrived, so a request still working on it is never raced. With more than one server, each row is run by one server at a time.

A replay never opens a second incident or counts an alert twice: an alert that is already on an incident is skipped. Alerts without their own ID (an Alertmanager or Grafana alert with no fingerprint, a Grafana test alert, an OTel log with no trace, an agent error log) get an ID from the inbox row, so a replay gives them the same ID. A replayed Zabbix acknowledgement or comment adds its note to the incident once.

Retention

Pending and failed rows are kept until they are done or replayed. Done rows are deleted by the hourly retention job:

Plan Done rows kept
Free, Pro, self-hosted without a durable-ingest license 24 hours
Enterprise, or a license with durable ingest 30 days

Dead letters and replay (Enterprise)

On the Enterprise plan (or with a license that includes durable ingest), admins see the inbox under Integrations → Alert inbox: how many alerts are waiting, how many failed, and each failed one with its last error. Replay runs one again; Replay all runs every failed one (up to 500 at a time). Fix the cause first: a replay that fails again goes back to retrying and becomes a dead letter again after 5 more tries.

Route What it does
GET /api/v1/ingest/inbox {"pending": n, "retrying": n, "failed": n, "dead_letters": [...]} (retrying: the pending rows that failed at least once), dead letters newest first, up to 100. Each dead letter has id, endpoint, source_id, source_type, attempts, last_error, received_at and the first 4 KiB of payload.
POST /api/v1/ingest/inbox/replay {"id": 7} replays one dead letter, {} all of them. Answers {"replayed": n, "done": n, "failed": n}. Rows that are not dead letters are left alone, so replaying a done row does nothing.

Both are admin only. On Free and Pro they answer 402 with plan_required.

Monitoring

/metrics shows neuroops_ingest_inbox{status="pending"} and neuroops_ingest_inbox{status="failed"} across all workspaces. A pending count that keeps growing means alerts are being accepted but not processed: check the server log for ingest inbox and failed to save lines and the database. A failed count above zero means some alerts need a replay.

- alert: ArgavonInboxBacklog
  expr: neuroops_ingest_inbox{status="pending"} > 100
  for: 10m
- alert: ArgavonInboxDeadLetters
  expr: neuroops_ingest_inbox{status="failed"} > 0
  for: 5m