Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions pages/audit-trail/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ meta:
/>
</Grid>

## Tutorials

<Grid>
<DefaultCard
title="Exporting Audit Trail events to DataDog"
url="/tutorials/export-audit-trail-to-datadog/"
label="Read more"
/>

<ClickableBanner
productLogo="cli"
title="Audit Trail API"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 17 additions & 15 deletions tutorials/export-audit-trail-to-datadog/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ This tutorial shows you how to export your Audit Trail events to [DataDog](https
name: otelcol-audit-trail
description: OpenTelemetry Collector for Audit Trail
output_path: ./otelcol-audit-trail

exporters:
- gomod:
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/datadogexporter v0.118.0

processors:
- gomod:
go.opentelemetry.io/collector/processor/batchprocessor v0.118.0

receivers:
- gomod:
github.com/scaleway/opentelemetry-collector-scaleway/receiver/scwaudittrail v0.1.0

providers:
- gomod: go.opentelemetry.io/collector/confmap/provider/envprovider v1.24.0
- gomod: go.opentelemetry.io/collector/confmap/provider/fileprovider v1.24.0
Expand Down Expand Up @@ -83,9 +83,9 @@ You now have a new folder named `otelcol-audit-trail/` with the binary `otelcol-
ssh root@<INSTANCE_IP_ADDRESS>
```

## Configure the Collector
## Configuring the Collector

Create a file named `/etc/opentelemetry-collector/config.yaml` and paste the following content into it. This file is the configuration our custom Collector will run.
Create a file named `/etc/opentelemetry-collector/config.yaml` and paste the following content into it. This file is the configuration our custom Collector will run.

```yaml
receivers:
Expand All @@ -94,20 +94,20 @@ Create a file named `/etc/opentelemetry-collector/config.yaml` and paste the fol
secret_key: <SCW_SECRET_KEY>
organization_id: <SCW_DEFAULT_ORGANIZATION_ID>
region: <SCW_DEFAULT_REGION>

processors:
batch:
send_batch_max_size: 1000
send_batch_size: 100
timeout: 10s

exporters:
datadog:
idle_conn_timeout: 10s
api:
key: <DD_API_KEY>
site: <DD_SITE>

service:
pipelines:
logs:
Expand All @@ -133,11 +133,11 @@ Make sure that you replace:
[Unit]
Description=OpenTelemetry Collector
After=multi-user.target

[Service]
ExecStart=/usr/local/bin/otelcol-audit-trail --config /etc/opentelemetry-collector/config.yaml
Type=simple

[Install]
WantedBy=multi-user.target
```
Expand Down Expand Up @@ -167,8 +167,10 @@ Make sure that you replace:
journalctl -fu opentelemetry-collector.service
```

An output similar to the following should display to confirm that the Collector is polling Audit Trail events:
An output similar to the following should display to confirm that the Collector is polling Audit Trail events:

```
Feb 07 15:34:30 scw-beautiful-zhukovsky otelcol-audit-trail[1723]: 2025-02-07T15:34:30.687Z info scwaudittrail@v0.1.0/receiver.go:80 Polling Audit Trail logs {"kind": "receiver", "name": "scwaudittrail", "data_type": "logs"}
```
```
Feb 07 15:34:30 scw-beautiful-zhukovsky otelcol-audit-trail[1723]: 2025-02-07T15:34:30.687Z info scwaudittrail@v0.1.0/receiver.go:80 Polling Audit Trail logs {"kind": "receiver", "name": "scwaudittrail", "data_type": "logs"}
```
6. Optionally, log in to your Datadog account and click **Logs** in the left hand side menu. Your logs should display.
<Lightbox src="scaleway-adt-logs-datadog.webp" alt="Scaleway Secret Manager logs from the display on the Datadog interface" />