# Send logs to a SIEM (/platform/enterprise/siem)

Sim sends logs to a SIEM through [data drains](/platform/enterprise/data-drains). A drain exports one source on a schedule to one destination. Organization owners and admins manage drains. Billing-enabled deployments require Enterprise.

## Choose a path \[#choose-a-path]

| SIEM | Path |
| - | - |
| Microsoft Sentinel | **Microsoft Sentinel** destination. Sim writes to a custom Log Analytics table through the Logs Ingestion API. |
| Datadog Cloud SIEM | **Datadog** destination. Sim writes to Datadog Logs. |
| Splunk | **Splunk** destination. Sim writes to the HTTP Event Collector (HEC). |
| Other SIEMs | **Amazon S3**, **Google Cloud Storage**, **Azure Blob Storage**, or **HTTPS webhook**, then your SIEM's collector for that source. |

## Choose sources \[#choose-sources]

Create one drain per source. Most security teams start with audit logs.

| Source | Use it for |
| - | - |
| **Audit logs** | Configuration and security events: who changed what, when, from which IP address and user agent. |
| **Workflow logs** | Finished workflow executions, with status, trigger, duration, and execution data. |
| **Job logs** | Finished background jobs for deployed APIs, schedules, and webhooks. |
| **Chats** | Chat conversation snapshots. |
| **Chat runs** | Finished Chat runs, with agent, model, provider, status, and error. |

Workflow logs and Chats can contain large payloads. Sentinel rejects a row whose `Data` exceeds 64,000 bytes, and Sim rejects a Splunk event over 1,000,000 bytes (Splunk Cloud Platform's HEC limit), so send those sources to object storage if rows are large.

## Set up a drain \[#set-up-a-drain]

Create, test, and run each drain as described in [Create and verify a drain](/platform/enterprise/data-drains#create-and-verify-a-drain); a new drain starts with all retained history, so the first runs deliver a backfill.

### Microsoft Sentinel \[#microsoft-sentinel]

Create a custom table, a data collection rule, and a Microsoft Entra application with **Monitoring Metrics Publisher** on the rule. Then choose **Microsoft Sentinel** and enter **Logs ingestion endpoint**, **DCR immutable ID**, **Stream name**, **Tenant ID**, **Client ID**, and **Client secret**.

Each row arrives with `TimeGenerated`, `Source`, `RecordId`, `DrainId`, `RunId`, and `Data`. `Data` holds the full source row. `TimeGenerated` is the drain run start, not the event time. Use `Data.createdAt` or the source's own timestamp for correlation.

See [Microsoft Sentinel](/platform/enterprise/data-drains#microsoft-sentinel) for the stream declaration, a sample row, and a KQL query.

### Datadog \[#datadog]

Choose **Datadog**, select your **Site**, and enter a Logs **API key**. **Service** defaults to `sim`. **Tags** are optional `key:value` pairs, separated by commas.

Each source row becomes one log. Top-level row fields become log attributes. Sim sets `ddsource` to `sim`, sets `service`, and adds the tags `sim_drain_id`, `sim_run_id`, and `sim_source`. Sim does not set a date attribute, so Datadog uses intake time. To use the event time, add a date remapper for `createdAt` in your log pipeline. Build Cloud SIEM detection rules on the `source:sim` logs.

### Splunk \[#splunk]

Create an HTTP Event Collector token, then choose **Splunk** and enter the **HEC URL** and **HEC token**. **Index** defaults to the token's default index, and **Source type** defaults to `sim:<source>`, for example `sim:audit_logs`.

Each source row becomes one HEC event. `event` holds the full source row, `time` is the row's event time (`createdAt` or `startedAt`), and the indexed fields `sim_drain_id`, `sim_run_id`, and `sim_source` identify the drain. Search with `index=<index> sourcetype="sim:audit_logs"`.

Splunk Enterprise serves HEC on port 8088 by default. Splunk Cloud Platform serves it on 443. See [Splunk](/platform/enterprise/data-drains#splunk) for batching limits, large events, and indexer acknowledgment.

### Object storage and webhooks \[#object-storage-and-webhooks]

S3, Google Cloud Storage, and Azure Blob Storage receive one NDJSON object per chunk at:

```text
{prefix}/{source}/{drainId}/{yyyy}/{mm}/{dd}/{runId}-{seq}.ndjson
```

The **HTTPS webhook** destination posts each chunk as `application/x-ndjson`, signed with HMAC-SHA256. Headers include `X-Sim-Drain-Id`, `X-Sim-Run-Id`, `X-Sim-Source`, `X-Sim-Sequence`, and `Idempotency-Key`. See [HTTPS webhook](/platform/enterprise/data-drains#https-webhook) to verify signatures.

## Record shape \[#record-shape]

Every destination receives the same source rows. Each row is one JSON object with an `id`. Timestamps are ISO 8601 strings.

| Source | Fields |
| - | - |
| Audit logs | `id`, `workspaceId`, `actorId`, `actorName`, `actorEmail`, `action`, `resourceType`, `resourceId`, `resourceName`, `description`, `metadata`, `ipAddress`, `userAgent`, `surface`, `createdAt` |
| Workflow logs | `id`, `executionId`, `workflowId`, `workspaceId`, `stateSnapshotId`, `deploymentVersionId`, `level`, `status`, `trigger`, `startedAt`, `endedAt`, `totalDurationMs`, `executionData`, `cost`, `files`, `createdAt` |
| Job logs | `id`, `executionId`, `scheduleId`, `workspaceId`, `level`, `status`, `trigger`, `startedAt`, `endedAt`, `totalDurationMs`, `executionData`, `cost`, `createdAt` |
| Chats | `id`, `userId`, `workflowId`, `workspaceId`, `type`, `title`, `messages`, `model`, `conversationId`, `previewYaml`, `config`, `resources`, `lastSeenAt`, `deletedAt`, `createdAt`, `updatedAt` |
| Chat runs | `id`, `executionId`, `parentRunId`, `chatId`, `userId`, `workflowId`, `workspaceId`, `streamId`, `agent`, `model`, `provider`, `status`, `requestContext`, `startedAt`, `completedAt`, `createdAt`, `updatedAt`, `error` |

An audit-log row:

```json
{
  "id": "audit-event-123",
  "workspaceId": "workspace-123",
  "actorId": "user-123",
  "actorName": "Ada Lovelace",
  "actorEmail": "ada@example.com",
  "action": "workflow.updated",
  "resourceType": "workflow",
  "resourceId": "workflow-123",
  "resourceName": "Invoice triage",
  "description": "Updated workflow",
  "metadata": {},
  "ipAddress": "203.0.113.10",
  "userAgent": "Mozilla/5.0",
  "surface": null,
  "createdAt": "2026-10-15T09:00:00.000Z"
}
```

Inspect real rows before building parsers or detection rules. See [audit logs](/platform/enterprise/audit-logs) for the action names.

## Cadence and latency \[#cadence-and-latency]

Drains are scheduled batch export, not real-time streaming; see [Cadence and latency](/platform/enterprise/data-drains#cadence-and-latency) for when each cadence runs and how soon rows arrive.

## Deduplicate on `id` \[#deduplicate-on-id]

Delivery is at least once. A retry, a partial acceptance, or a crash after delivery can send the same row twice. Deduplicate on the row's `id` together with the source. In Sentinel, use `Source` and `RecordId`. In Splunk, use `sim_source` and `event.id`.

## Retries and checkpoints \[#retries-and-checkpoints]

A failed run resumes after the last accepted chunk and never skips a row; see [Checkpoints, bounds, and failures](/platform/enterprise/data-drains#checkpoints-bounds-and-failures) for retry rules and limits.

## Network requirements \[#network-requirements]

Sim connects to the destination from its own servers. Allow Sim's outbound traffic through your firewall and the destination's network rules.

Note:

If your organization sends outbound traffic through a dedicated egress gateway, destinations must use HTTPS on port 443. A webhook, Splunk, or storage endpoint on another port, or over plain HTTP, fails, including Splunk Enterprise's default HEC port 8088.

Self-hosted deployments also apply their [outbound-network policy](/platform/self-hosting/security#the-ssrf-boundary).

## Related docs \[#related-docs]

- [Data drains](/platform/enterprise/data-drains)
- [Audit logs](/platform/enterprise/audit-logs)
- [Data retention](/platform/enterprise/data-retention)
