Documentation

Export to Splunk

Audit events arrive in Splunk as JSON events with sourcetype modelriver:audit, timestamped when they happened.

What ModelRiver sends

A POST to your HEC URL with Authorization: Splunk <token> and one HEC event per line:

JSON
1{"time": 1795600800.123, "sourcetype": "modelriver:audit", "event": {"id": "0193a4f2-...", "action": "security.admin_key_created", "...": "..."}}
  • time is the event's inserted_at, in epoch seconds with milliseconds.
  • event is the full event object.
  • No index is set, so events go to the token's default index.

Each request also carries the signature headers. Splunk ignores them.

1. Create a HEC token

In Splunk Web:

  1. Go to Settings → Data inputs → HTTP Event Collector and choose New Token.
  2. Name it modelriver-audit. Leave Enable indexer acknowledgement off: ModelRiver doesn't send a channel, and with acknowledgement on, Splunk refuses every request with HTTP 400.
  3. Choose the index for audit events (for example a dedicated audit index) and make it the token's default index.
  4. Finish, and copy the token value.

On Splunk Enterprise, make sure HEC is enabled under Global Settings, with SSL on.

2. Find your HEC URL

DeploymentURL
Splunk Enterprisehttps://splunk.example.com:8088/services/collector/event
Splunk Cloud Platformhttps://http-inputs-<stack>.splunkcloud.com/services/collector/event (see Splunk's HEC documentation for your stack's host)

If you enter only the host and port, ModelRiver adds /services/collector/event.

The endpoint must present a certificate from a public certificate authority. Splunk Enterprise's default self-signed HEC certificate is refused: install a trusted certificate, or put a TLS-terminating load balancer in front of HEC. The host must resolve to public addresses, unless it is a self-hosted install that lists the address in ALLOWED_INTERNAL_HOSTS.

3. Configure the export

In Organization settings → Audit log export, choose Splunk HEC, enter the HEC URL and HEC token, and save. Choose Send test, then search in Splunk:

TEXT
1sourcetype="modelriver:audit" event.action="export.test"

The token is encrypted at rest and never shown again. If you change the URL, enter the token again: ModelRiver never sends a saved token to a new URL.

Searching

So that Splunk extracts the JSON fields automatically, add this to props.conf on your search heads (untested):

INI
1[modelriver:audit]
2KV_MODE = json

Then, for example:

TEXT
1sourcetype="modelriver:audit" high_risk=true | table _time actor_label action summary target_label ip_address

Without KV_MODE = json, use | spath in your searches.

Duplicates

A batch is retried with the same events after a timeout or a 5xx, so Splunk can occasionally index an event twice. Remove duplicates in searches with | dedup id.