# kosa8 cloud siem add

Add a SIEM destination

--kind webhook     --url https://…  (a signing secret is printed once)
--kind splunk_hec  --url https://splunk…:8088/services/collector/event --token …
--kind datadog     --site datadoghq.com --api-key …
--kind s3          --bucket B --region us-east-1 [--endpoint https://…] --access-key-id … [--prefix kosa8-audit/]
--kind r2          --bucket B --account-id <32 hex> [--jurisdiction eu|fedramp] --access-key-id … [--prefix …]

An s3 or r2 destination gets one NDJSON object per batch (one OCSF event a line) at
<prefix><org_id>/YYYY/MM/DD/<first>-<last seq>.ndjson.

The token, API key or secret access key may come from KOSA8_SIEM_TOKEN instead of a flag, to keep
it out of shell history. It is stored encrypted and never shown again.

## Flags

| Flag | Type | What it does | Default |
|---|---|---|---|
| `--access-key-id` | string | access key ID that may write to the bucket (s3, r2) |  |
| `--account-id` | string | your Cloudflare account ID (r2) |  |
| `--api-key` | string | Datadog API key (or KOSA8_SIEM_TOKEN) |  |
| `--bucket` | string | bucket name (s3, r2) |  |
| `--endpoint` | string | https endpoint of an S3-compatible store (s3) |  |
| `--index` | string | Splunk index |  |
| `--jurisdiction` | string | R2 jurisdiction: eu or fedramp (r2) |  |
| `--kind` | string | webhook, splunk_hec, datadog, s3 or r2 | `webhook` |
| `--name` | string | a name for this destination |  |
| `--prefix` | string | object key prefix (s3, r2; default kosa8-audit/) |  |
| `--region` | string | AWS region (s3; default us-east-1) |  |
| `--secret-access-key` | string | its secret access key (or KOSA8_SIEM_TOKEN) |  |
| `--site` | string | Datadog site, e.g. datadoghq.com or datadoghq.eu |  |
| `--sourcetype` | string | Splunk sourcetype (default ocsf:api_activity) |  |
| `--start` | string | beginning (send the whole log first, the default) or now |  |
| `--token` | string | Splunk HEC token (or KOSA8_SIEM_TOKEN) |  |
| `--url` | string | https address (webhook, splunk_hec) |  |

## Example

```
  kosa8 cloud siem add --kind splunk_hec --url https://splunk.acme.com:8088/services/collector/event --index security
  kosa8 cloud siem add --kind datadog --site datadoghq.eu --start now
  KOSA8_SIEM_TOKEN=… kosa8 cloud siem add --kind r2 --bucket audit --account-id 0123…cdef --access-key-id …
```

---
Source: https://docs.kosa8.com/reference/cloud-siem-add/
