Audit export
The `spl audit export` CLI emits security-relevant records as JSON Lines for SIEM ingestion, compliance archives, and retention workflows.
What it does
spl audit export writes security-relevant records to stdout as JSON Lines
(one record per line). Use it to feed your existing SIEM, compliance archive
or log-aggregation pipeline.
Four categories are emitted; filter any subset with --categories:
| Category | What it captures |
|---|---|
system | Records authored by did:sync:system:* actors: startup, AI proposals, trust feedback, recovery events |
decision | Decision records: request and answer (body.verdict accept/reject): reviewer approvals, dispatch verdicts |
dispatch | KNOW records with body.topic == "dispatch_complete": the outcome and metrics of every adapter run |
governance | Records authored by did:sync:system:governance: policy decisions when permissions are enabled |
Quickstart
# Last hour, all categories
spl audit export --since 1h
# Last 24 hours, decisions and dispatch only, piped to jq
spl audit export --since 24h --categories decision,dispatch | jq '.'
# Single actor, single thread: useful for incident scoping
spl audit export --actor did:sync:agent:dev --thread th_abc123...
# Retained forever. Pipe to your shipper
spl audit export --since 24h | /usr/local/bin/fluent-bit-stdin-pluginOutput shape
Each line is a self-contained JSON object:
{
"category": "decision",
"thread": "th_03f822528448c2a0439a7292df96518dd8c899436f7386d2ba88c45113fc0e6c",
"record": {
"id": "151439fe29726ddc8958a70b2ce003f78d8a2a024fb0317f555376927b1ec437",
"act": "KNOW",
"actor": "did:sync:agent:reviewer",
"thread": "th_03f822528448c2a0439a7292df96518dd8c899436f7386d2ba88c45113fc0e6c",
"clock": 12,
"data_type": "SCALAR",
"body": {
"verdict": "accept",
"review_notes": "All gates pass.",
"fulfills": "d403d0c24f03b2f0d18c8725b83804cce3b83786eca0cba607533d15bdfd4c0b"
}
}
}Top-level category makes filtering trivial. The complete record is
nested under record, so you have every field required to reconstruct
the event downstream (the record id, all 8 fields, and so on).
Time filters
--since accepts:
- Relative:
1h,24h,7d,30d - Absolute RFC3339:
--since 2026-04-01T00:00:00Z
No time filter → full record log. Be careful on long-running instances: the output can be large.
Retention patterns
spl audit export reads your records and never changes them. Three common patterns:
Daily rotation to object storage
# /etc/cron.daily/syncropel-audit
#!/bin/bash
set -euo pipefail
DATE=$(date -u +%Y-%m-%d)
spl audit export --since 24h \
| gzip -9 \
> /var/log/syncropel/audit-${DATE}.jsonl.gz
aws s3 mv /var/log/syncropel/audit-${DATE}.jsonl.gz \
s3://my-compliance-archive/syncropel/${DATE}/Continuous shipping
# /etc/systemd/system/syncropel-audit.service
[Service]
ExecStart=/bin/sh -c 'spl audit export --since 5m | /usr/local/bin/fluentbit -i tail ...'
Restart=always
RestartSec=300Run it every 5 minutes via .timer; the 5m overlap guarantees no
missed events.
Category-specific pipelines
# decision records only → review dashboard
spl audit export --since 24h --categories decision \
| jq -c 'select(.record.body.verdict == "reject")' \
| /usr/local/bin/review-alerts-webhookPairs with
- SIEM integration guide: concrete pipeline recipes for Splunk, Elastic, Loki, and Datadog
- Debug replay (
spl debug replay): step through individual threads when an audit event surfaces something interesting
Operational notes
- The command reaches the instance over its local Unix socket, or at
SPL_SERVE_URLwhen that is set. It needs no direct database access. - JSON Lines are newline-delimited; if your SIEM expects JSON arrays,
wrap with
jq -s. - Record IDs are stable across federation, so the same audit event has the same ID on every peer that received the record.
- Retention is a function of the underlying store backend (SQLite by
default).
spl audit exportnever deletes anything. For deletion / GDPR, usespl debug replayto verify nothing depends on the target record, then issue a dedicatedcore.erasurerecord.
Running an async-federation relay
Install, configure, monitor, and troubleshoot a Syncropel async-federation relay. Covers Docker and systemd deployment, Prometheus metrics, bearer-token auth for receivers, and the failure modes you'll hit in practice.
Audit threads
Which thread holds the audit trail for each governance area (consent, federation, secrets, tokens and more), what each record looks like, and how to read it.