Skip to content
DashboardWebsite

Audit Log Streaming

Just want to do it in the dashboard? See the guide: Stream the audit log to your SIEM or Find who changed what.

An audit sink sends audit log events to a receiver you run, such as Splunk, Elastic, Datadog, or an HTTPS endpoint. Organization admins manage organization sinks in the dashboard. Platform admins manage platform sinks and control which transports are available.

SinkSet up byReceives
Organization sinkAn org admin, in Audit log → StreamingThe organization’s audit events, including platform admin actions recorded against that org
Platform sinkA platform admin, in Platform Admin → Connections → Audit StreamingEvery event, including events that belong to no organization, such as superadmin.grant and settings.update

An organization can have up to audit_push.max_sinks_per_org sinks (3 by default). The auditor role can see an organization’s sinks but cannot change them.

A sink can filter events by action prefixes, such as api_key. or sso.. An empty list sends every event.

  • At least once. An event can arrive twice, for example after a timeout on a request that the receiver accepted. Deduplicate events by event_id.
  • About a minute behind. The task scheduler starts a delivery run every minute. Each run sends only events stored more than 30 seconds earlier.
  • Retries back off. After a failed send, the sink waits 1, 2, 4 … up to 60 minutes before trying again from the same event. After three failures in a row, the dashboard marks the sink as failing.
  • A disabled sink keeps its place. When enabled again, it sends events stored since it was disabled.
  • A new sink starts now. It receives events stored after it was created, not the existing log. To load past events, use the audit export (GET /v1/metrics/audit/export).
  • Retention still applies. If a receiver stays down, undelivered events expire when they reach the audit retention limit, retention.audit_days. The dashboard warns when undelivered events are within seven days of expiring.

Creating, changing, testing, and deleting a sink are recorded as audit events and can reach the stream.

Test sends one synthetic audit_sink.test event to the receiver and shows the result. The synthetic payload is not added to the audit log and does not move the sink’s delivery cursor. The test action itself is recorded as an audit event.

Each batch is sent in one POST. Only a 2xx response counts as delivered; a redirect does not.

FieldDescription
urlAn https:// URL. Write-only: the API returns only its host and first path segment.
formatjson (default) or splunk_hec
secretOptional. Signs the body as X-Signature-256: sha256=<hex HMAC-SHA256>, like notification webhooks. Write-only.
auth_header_name / auth_header_valueOptional. Sent as <name>: <value>. The name defaults to Authorization. The value is write-only.

The json body:

{
"sink_id": "as_3f2a…",
"batch_id": "6b1e…",
"events": [
{
"event_id": "0c9d…",
"org_id": "org_…",
"action": "api_key.create",
"target_type": "api_key",
"target_id": "key_…",
"actor_user_id": "usr_…",
"actor_email": "[email protected]",
"timestamp": "2026-10-20T09:14:03.120Z",
"…": "the same fields as the JSON audit export"
}
]
}

splunk_hec sends one HEC event object per audit event, one per line: {"time": <epoch seconds>, "source": "opentremor", "sourcetype": "opentremor:audit", "event": {…}}.

Syslog uses RFC 5424 messages over TCP with TLS and octet-counted framing (RFC 5425). It does not use UDP or plain TCP.

FieldDefaultDescription
host / port— / 6514The receiver
ca_pemSystem CAsThe CA that signed the receiver’s certificate, in PEM
facility1313 is log audit

Each event is one message: APP-NAME is opentremor, MSGID is the action, severity is notice, and the message body is the event as one line of JSON. TCP does not provide a receipt, so an event counts as delivered once it is written and the connection closes without error.

In the dashboard: Platform Admin → Connections → Audit Streaming. A platform admin controls:

KeyDefaultEffect
https_enabledtrueWhether HTTPS sinks can be created and run
syslog_enabledfalseWhether syslog sinks can be created and run. Off by default because it opens TCP connections to hosts an admin chooses.
egressPrivate networks disallowedWhere a sink may point. Checked when a sink is saved and before each send. Link-local addresses, including cloud metadata addresses, are always refused.
max_sinks_per_org3Maximum sinks per org. Platform sinks are not counted.
batch_size500Maximum events per send

Turning a transport off pauses its sinks. They keep their place in the log and resume when the transport is turned on again.

Create an HEC token, then create a sink with:

  • url: https://splunk.example.com:8088/services/collector/event
  • format: splunk_hec
  • auth_header_value: Splunk <hec-token>

Logstash receives the batch, splits it into events, and indexes each one by event_id. A resent event overwrites the existing event:

input {
http {
port => 8443
ssl_enabled => true
ssl_certificate => "/etc/logstash/tls/cert.pem"
ssl_key => "/etc/logstash/tls/key.pem"
}
}
filter { split { field => "events" } }
output {
elasticsearch {
hosts => ["https://elasticsearch:9200"]
index => "opentremor-audit"
document_id => "%{[events][event_id]}"
}
}
[sources.opentremor]
type = "http_server"
address = "0.0.0.0:8443"
decoding.codec = "json"
tls.enabled = true
tls.crt_file = "/etc/vector/tls/cert.pem"
tls.key_file = "/etc/vector/tls/key.pem"
[transforms.events]
type = "remap"
inputs = ["opentremor"]
source = ". = .events" # one Vector event per audit event
[sinks.datadog]
type = "datadog_logs"
inputs = ["events"]
default_api_key = "${DD_API_KEY}"
global(
DefaultNetstreamDriver="gtls"
DefaultNetstreamDriverCAFile="/etc/rsyslog.d/tls/ca.pem"
DefaultNetstreamDriverCertFile="/etc/rsyslog.d/tls/cert.pem"
DefaultNetstreamDriverKeyFile="/etc/rsyslog.d/tls/key.pem"
)
module(load="imtcp" StreamDriver.Name="gtls" StreamDriver.Mode="1" StreamDriver.AuthMode="anon")
input(type="imtcp" port="6514")
if $app-name == "opentremor" then /var/log/opentremor-audit.log

Put the CA that signed cert.pem in the sink’s ca_pem.

In the dashboard, org admins manage sinks in Audit log → Streaming. Platform admins manage them in Platform Admin → Connections → Audit Streaming.

RouteWho
GET / POST /v1/orgs/{org_id}/audit-sinksList: audit:read. Create: audit_sinks:manage
GET / PATCH / DELETE /v1/orgs/{org_id}/audit-sinks/{sink_id}Read: audit:read. Change: audit_sinks:manage
POST /v1/orgs/{org_id}/audit-sinks/{sink_id}/testaudit_sinks:manage
The same routes under /v1/admin/audit-sinksPlatform admins
POST /v1/admin/audit-sinks/drainPlatform admins; the task scheduler calls it every minute

GET /v1/capabilities reports audit_push: {https, syslog} to show which transports a new sink may use.

A sink response never contains its URL, secret, or auth header value. It includes delivery state: last_delivery, consecutive_failures, next_attempt_at, lag_events (events not yet delivered, capped at 100,000), delivered_through, failing, expiry_risk, and transport_enabled.