> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aiveth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Log streams

> Send your organization's activity log, as it is written, into your own security tool: an HTTPS address, Splunk, Datadog, Microsoft Sentinel or Amazon S3.

A log stream sends every entry of your organization's [activity log](https://docs.aiveth.com/privacy/activity-log-and-reports.md) to your own security tool, in order, within seconds of it being written. Use it to keep sign-ins and changes next to the rest of your security data, alert on them, or keep them longer.

> [!NOTE]
>
> Log streams are available on the Business plan and above.

## Add a log stream

**1. Open Log streams**

In the console, go to **Activity log** and choose **Log streams**. Changing streams needs both **Manage sign-in security** and **See sign-in history**, because a stream sends every sign-in and where it came from.

**2. Choose where it goes**

Choose **Add log stream**, give it a **Name**, and pick a destination under **Where it goes**. The form shows the fields and setup steps for that destination.

**3. Choose what to send**

Under **What to send**, tick activity groups to send only those. Choose nothing to send everything.

**4. Test and save**

Choose **Send a test event**, then **Add stream**.

An organization can have up to 5 log streams. A new stream starts from now; older entries are not replayed.

Secrets are kept encrypted and shown again only as their last 4 characters. When you change a stream, leaving a secret empty keeps the saved one. If you change where a stream goes, you must type its secrets again.

## Destinations

### HTTPS address

Any tool that accepts a `POST`, such as Sumo Logic, Elastic, Rapid7 or your own service.

| Field | Notes |
| - | - |
| **Address** | An `https` address on the public internet. |
| **Format** | **A JSON array of entries**, or **One JSON entry per line (NDJSON)**. |
| **Header name** | Optional, like `Authorization`. |
| **Header value** | Optional, like `Bearer ...`. Kept encrypted. |

Each post is signed the same way as [webhooks](https://docs.aiveth.com/events/webhooks.md#verify-the-signature), with the `webhook-id`, `webhook-timestamp` and `webhook-signature` headers. The signing secret is shown once, after you save. Choose **New signing secret** to replace it.

> [!NOTE]
>
> A test sent before you save is signed with a throwaway secret, so a tool that checks signatures refuses it. Save first to test with the real secret.

### Splunk

Splunk Cloud or Splunk Enterprise, through the HTTP Event Collector.

| Field | Notes |
| - | - |
| **HTTP Event Collector address** | Splunk Cloud: `https://http-inputs-yourstack.splunkcloud.com`. Your own Splunk: its address with port 8088. |
| **HEC token** | Kept encrypted. |

In Splunk, open **Settings** → **Data inputs** → **HTTP Event Collector**, make a new token for Aiveth, and choose its index. Each entry arrives as a JSON event with source `aiveth`.

### Datadog

Datadog Logs, through its HTTP log intake.

| Field | Notes |
| - | - |
| **Datadog site** | US1, US3, US5, EU, AP1, AP2, UK1, US1-FED or US2-FED: the one in your Datadog address. |
| **API key** | Kept encrypted. |

In Datadog, open **Organization settings** → **API keys** and make a key for Aiveth. Entries arrive in Logs with source `aiveth` and service `aiveth`.

> [!WARNING]
>
> Datadog accepts entries from the last 18 hours only. After a long stop, Datadog drops older entries.

### Microsoft Sentinel

A Log Analytics workspace, through the Azure Monitor Logs Ingestion API.

| Field | Notes |
| - | - |
| **Directory (tenant) ID** | Your Microsoft Entra tenant. |
| **Application (client) ID** | The app you register for Aiveth. |
| **Client secret** | Kept encrypted. |
| **Logs ingestion endpoint** | The rule's own endpoint, or a data collection endpoint (`https://....ingest.monitor.azure.com`). |
| **Data collection rule immutable ID** | Like `dcr-...`. |
| **Stream name** | A custom stream, like `Custom-AivethActivity_CL`. |

**1. Register an app**

In Microsoft Entra ID, register an app for Aiveth and make a client secret for it.

**2. Make a custom table**

In your Log Analytics workspace, make a custom table with a data collection rule, with these columns: `TimeGenerated` (datetime), `event_id` (long), `at` (datetime), `action`, `outcome`, `who`, `summary`, `worked` (boolean), `actor`, `actor_user_id`, `target`, `target_type`, `target_id`, `ip`, `device`, `user_agent`, `request_id`, `detail` (dynamic), `organization_id`, `environment`, `source`.

**3. Grant the role**

On the data collection rule, give the app the **Monitoring Metrics Publisher** role.

**4. Copy the values into Aiveth**

Copy the tenant ID, the app's ID and secret, the logs ingestion endpoint, the rule's immutable ID and the stream name.

### Amazon S3

One file per batch in your own bucket. Aiveth never holds an AWS key: it takes on a role in your account.

| Field | Notes |
| - | - |
| **AWS account ID** | 12 digits. |
| **Role name** | The role Aiveth takes on, like `aiveth-logs`. |
| **Bucket** | Your bucket's name. |
| **Bucket's region** | Like `ap-south-1`. |
| **Folder** | Optional. Where in the bucket. Empty means the top. |

In AWS IAM, make a role with the **Trust policy** the console shows. It names **Your external ID**, which is unique to your organization. Give the role `s3:PutObject` on the bucket (and folder), and nothing else. Aiveth writes one file per batch at `folder/YYYY/MM/DD/time_firstid.ndjson`.

> [!NOTE]
>
> If Amazon S3 isn't available as a destination yet, the console says so.

## What an entry looks like

Each entry is one activity log row, in the activity log's own shape, plus where it came from:

```json theme={null}
{
  "id": 48213,
  "at": "2026-11-24T10:15:00+00:00",
  "action": "sign_in",
  "outcome": "success",
  "worked": true,
  "who": "Asha Rao",
  "summary": "signed in",
  "actor": "Asha Rao",
  "actor_user_id": "...",
  "target": null,
  "target_type": null,
  "target_id": null,
  "ip": "203.0.113.10",
  "device": "...",
  "user_agent": "...",
  "request_id": "...",
  "detail": {},
  "organization_id": "...",
  "environment": "...",
  "source": "aiveth"
}
```

An entry can arrive twice. Drop repeats by `id`.

## Batching, retries and stopping

* Aiveth checks for new entries every 5 seconds and sends up to 100 at a time, oldest first.
* A stream moves on only after your tool answers with a `2xx` (for S3, after the file is written). Newer entries wait behind a failed batch, so order is always kept.
* A failed batch is retried on the webhook schedule: after about 5 seconds, 5 minutes, 30 minutes, 2 hours and so on, about 3 days in all. A busy tool's `Retry-After` is respected.
* After 3 days of nothing but failures, the stream stops with an error, your Owners are emailed, and the activity log records it.
* Fix the stream and save it, or choose **Resume**. It carries on from where it stopped, so nothing is lost while the entries are still inside the activity log's one year.
* **Pause** stops sending until you resume.
* A suspended organization, or a plan without log streams, leaves entries waiting.

Each stream shows **Last delivered**. **Remove stream** deletes it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.