← Docs · 日本語

Datadog Integration (Audit Log Export)

Stream your account's audit log (the history of Console / API operations) to Logs in your own Datadog organization. Analyze, monitor, and retain your agents' activity alongside your application logs and metrics, in one place.


1. Setup

On the Datadog side (2 min)

  1. Issue an API key under Organization Settings → API Keys
  2. Copy the secret string from the "Key" column
    • ⚠️ This is not the "Key ID" (UUID format). Authentication uses the key itself (a 32-character alphanumeric string)
    • No Application Key is required
  3. Check your organization's site (region). Japanese organizations are usually AP1

On the AgenTrux side (2 min)

  1. Sign in to the Console → AccountIntegrations (Experimental)Datadog Audit Export
  2. Fill in:
    Field Value
    Datadog site Your organization's region (AP1 for Japan)
    API Key The Key (secret) from the step above
    Service / Source The service / ddsource attributes in Datadog (default agentrux is fine)
    Tags Optional ddtags (e.g. env:prod,team:platform)
  3. Save configurationTest connection (sends one real test event and verifies acceptance)
  4. Enable export — streaming starts here

2. What flows, and how

3. Log structure

Each audit event arrives as one log:

Attribute Content
message <activity> (<Success/Failure>)
status info / error (failed events)
timestamp When the audit event occurred
service / ddsource / ddtags Values from the settings screen
@ocsf.* The OCSF event body (below)

Main fields under @ocsf.*:

Field Content Example
@ocsf.activity_name Operation name topic.create, datadog_export.enable
@ocsf.actor.user.uid Actor ID usr_..., scr_... (an agent)
@ocsf.status / @ocsf.status_id Outcome Success / Failure
@ocsf.class_uid OCSF class 3002 (Authentication) / 6003 (API Activity)
@ocsf.src_endpoint.ip Source IP
@ocsf.resources[].uid Target resource top_..., acc_...
@ocsf.metadata.uid Unique event ID (dedup key) agentrux:audit:12345
@ocsf.unmapped.details Operation details (varies)

4. Getting ready for analysis (recommended recipes)

4-1. Create facets

In Logs Explorer, search service:agentrux, open any log, and Create facet for:

@ocsf.activity_name
@ocsf.actor.user.uid
@ocsf.status
@ocsf.class_uid
@ocsf.src_endpoint.ip

4-2. Map to standard attributes with a pipeline (optional, recommended)

Under Logs → Pipelines, create a pipeline filtered on service:agentrux and add remappers so Datadog's standard features (Cloud SIEM, etc.) work out of the box:

Remapper From To
Attribute remapper @ocsf.actor.user.uid usr.id
Attribute remapper @ocsf.src_endpoint.ip network.client.ip

(status / timestamp / message are already in their standard positions — no extra setup needed.)

4-3. Example queries

# All failed operations
service:agentrux status:error

# Authentication / credential operations
service:agentrux @ocsf.class_uid:3002

# Activity of a specific user / agent
service:agentrux @ocsf.actor.user.uid:usr_xxxx

# Grant (access right) changes
service:agentrux @ocsf.activity_name:grant.*

# State changes of the integration itself (detect auto-disable)
service:agentrux @ocsf.activity_name:*_export.auto_disable

4-4. Suggested monitors (alerts)

5. Dashboard template

A ready-to-import dashboard definition is available:

Download datadog-dashboard-agentrux-audit.json

Import: Datadog Dashboards → New Dashboard → gear icon (top right) → Import dashboard JSON.

Included widgets: events / failures in 24h, activity timeseries by type, failure timeseries, top 10 actors, top 10 activities, and a recent-failure log stream. Note: create the facets from §4-1 first.

6. Operational notes