Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

dd-audit-ai-activity

БесплатноБез исполняемых скриптовНе проверен

Audit Datadog MCP calls and changes made through MCP, plus Datadog AI agent activity, from Audit Trail. MCP calls and Bits SRE investigations are different…

datadog-labsот datadog-labs★ 188 звёзд на GitHub

Об этом скилле

Audit Trail: AI Activity Audit

MCP calls are recorded under the MCP Server category: @evt.name:"MCP Server" @asset.type:mcp @action:executed. A connection, tool call, resource read, or prompt read on the Datadog MCP server uses that event.

Changes the MCP server makes to another resource are recorded on that resource's own category with is_mcp_call:true. They are not MCP Server events, and their action is not executed.

Bits AI SRE is a separate category for Bits SRE investigations and Bits SRE tool calls (@asset.type:tool_call @action:created). Do not use it for MCP.

Datadog-managed AI agent attribution (@evt.actor.mode, Bits agent fields) is not available on GovCloud. On other sites, onboarded Datadog AI agent actions are @evt.actor.mode:*. That query is not complete. Bits SRE is tracked for most actions. Bits Chat is tracked from the full Bits Chat page, not the inline panel. Bits Security Analyst runs as autonomous and has no delegator. Bits Agent Builder is not tracked yet. Third-party agents are not distinguished from API keys, application keys, personal access tokens, or service account tokens. Some action types on a tracked agent still omit these fields.

A user's own actions are @usr.id:<USER_ID>. Actions an agent took for that user are @delegator.id:<USER_ID>, and @usr.* on those events is the agent. @delegator.name is the full name, not the email. A user's complete activity is (@usr.id:<USER_ID> OR @delegator.id:<USER_ID>).

Prerequisites

pup auth login   # OAuth2 (recommended)
# or set DD_API_KEY + DD_APP_KEY with audit_logs_read scope

Queries

All MCP tool activity in a time window

pup audit-logs search --query "@evt.name:\"MCP Server\"" --from 7d --limit 500 -o json \
  | jq '[.data[] | {
      timestamp: .attributes.timestamp,
      user: .attributes.attributes.usr.email,
      actor_type: .attributes.attributes.evt.actor.type,
      action: .attributes.attributes.action,
      resource_type: .attributes.attributes.asset.type,
      resource_id: .attributes.attributes.asset.id,
      ip: .attributes.attributes.network.client.ip,
      country: .attributes.attributes.network.client.geoip.country.name
    }]'

Activity by user (who is using the AI assistant most?)

pup audit-logs search --query "@evt.name:\"MCP Server\"" --from 30d --limit 1000 -o json \
  | jq '[.data[] | .attributes.attributes.usr.email]
    | group_by(.)
    | map({user: .[0], tool_calls: length})
    | sort_by(-.tool_calls)'

Resources modified by AI tool calls

pup audit-logs search \
  --query "is_mcp_call:true @action:(created OR modified OR deleted)" \
  --from 7d --limit 500 -o json \
  | jq '[.data[] | {
      timestamp: .attributes.timestamp,
      user: .attributes.attributes.usr.email,
      action: .attributes.attributes.action,
      resource_type: .attributes.attributes.asset.type,
      resource_id: .attributes.attributes.asset.id
    }]'

AI activity for a specific user

pup audit-logs search \
  --query "@evt.name:\"MCP Server\" @usr.email:[email protected]" \
  --from 30d --limit 500 -o json \
  | jq '[.data[] | {
      timestamp: .attributes.timestamp,
      action: .attributes.attributes.action,
      resource_type: .attributes.attributes.asset.type,
      resource_id: .attributes.attributes.asset.id
    }]'

Onboarded Datadog AI agent actions

pup audit-logs search --query "@evt.actor.mode:*" --from 7d --limit 500 -o json \
  | jq '[.data[] | {
      timestamp: .attributes.timestamp,
      mode: .attributes.attributes.evt.actor.mode,
      actor: .attributes.attributes.usr.email,
      delegator_id: .attributes.attributes.delegator.id,
      action: .attributes.attributes.action,
      event: .attributes.attributes.evt.name,
      resource_type: .attributes.attributes.asset.type
    }]'

One user's actions, including agent-delegated actions

pup audit-logs search \
  --query "(@usr.id:USER_ID OR @delegator.id:USER_ID)" \
  --from 30d --limit 500 -o json \
  | jq '[.data[] | {
      timestamp: .attributes.timestamp,
      actor: .attributes.attributes.usr.email,
      delegator_id: .attributes.attributes.delegator.id,
      mode: .attributes.attributes.evt.actor.mode,
      action: .attributes.attributes.action,
      event: .attributes.attributes.evt.name,
      resource_type: .attributes.attributes.asset.type
    }]'

MCP call volume

Audit Trail search is capped by --limit. These metrics count every call. datadog.mcp.tool.usage is a distribution, so count it with .as_count(). Both metrics are tagged with user_email, client, and tool_name.

pup metrics query \
  --query "count:datadog.mcp.tool.usage{*} by {user_email,client,tool_name}.as_count()" \
  --from 7d

pup metrics query \
  --query "count:datadog.mcp.session.starts{*} by {client}.as_count()" \
  --from 7d

Weekly summary report

pup audit-logs search --query
Полный SKILL.md на GitHub

Установить dd-audit-ai-activity в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл dd-audit-ai-activity?

Audit Datadog MCP calls and changes made through MCP, plus Datadog AI agent activity, from Audit Trail. MCP calls and Bits SRE investigations are different event categories.

Как установить скилл dd-audit-ai-activity?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл dd-audit-ai-activity запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить dd-audit-ai-activity с