Skip to content

Audit streaming to a SIEM ​

Enterprise only. The server sends every audit event to your SIEM as it is written, so the trail also lives outside PostgreSQL. What an event holds is on Auditing.

Turn it on ​

In Settings → Audit streaming set the address and the token; they apply within seconds, on every instance.

SettingValue
JOOBQUI_SIEM_URLAn https address, without a query string or fragment. The token has its own field.
JOOBQUI_SIEM_TOKENSent as Authorization: Bearer <token>. Write-only: never shown again.
JOOBQUI_SIEM_MAX_BACKLOGUnsent events kept while the SIEM is away: 100000 by default, 1000 to 10 million. Applies at restart.

Saving them without an Enterprise licence is refused (403 enterprise_required); with a licence that is no longer Enterprise, streaming stops until it is.

What is sent ​

Batches of up to 500 events or 1 MiB, as POST with Content-Type: application/x-ndjson: one JSON object per line, the audit event (id, at, actor, role, client, action, target, detail, outcome, request_id) plus time (RFC 3339) and source (joobqui). Any 2xx answer counts as delivered.

  • Where it starts. At the newest event: history is not replayed. Changing the URL starts again from the newest event.
  • At least once. After a crash, or when another instance takes over, the last batch can arrive again. Dedupe on id.
  • One sender. With several instances, the one holding the Redis lease joobqui:lease:siem sends; a stopped holder is replaced within 30 seconds.
  • Settling. A row that follows a gap in the ids waits until it is 10 seconds old, because a lower id may still commit. Clock skew between instances can delay a row, not lose it.

When the SIEM does not answer ​

The server retries after 1 second, doubling to 5 minutes. A 4xx other than 408 and 429, an untrusted certificate or a refused address waits the full 5 minutes. HGETALL joobqui:siem:stats in Redis shows last_success_at, last_error (an error class and an HTTP status, never the URL or token) and last_error_at.

Above JOOBQUI_SIEM_MAX_BACKLOG unsent events the oldest are dropped, the log says SIEM backlog over the limit and joobqui:siem:dropped counts them.

Limits ​

  • Retention. A row purged by retention before it was sent is never sent. Rows trimmed from the Redis-only audit store (10,000 rows) are not counted as dropped either.
  • Erasure. Erasing an account does not recall events already sent.
  • Addresses. As for webhooks: https only, no redirects, and addresses inside your network (private, loopback, link-local) are refused. JOOBQUI_ALLOW_PRIVATE_WEBHOOKS=true allows both, for development.
  • Personal data. Events carry actor emails and client addresses to a third party: cover it in your own agreements.

Symptoms: Audit streaming does not deliver.