---
title: "Audit data and retention"
version: "next"
canonical: "https://docs.obot.ai/next/security/audit-data"
unreleased: true
---

# Audit data and retention

Audit records, device inventories, and product analytics have different purposes and access rules.

| Data                                  | Guidance                                                                                                                                                                             |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| MCP/LLM request metadata and payloads | [MCP audit logs](https://docs.obot.ai/next/security/audit-data.md#obot-doc-audit-logs-and-usage-mcp-audit-logs) and [LLM audit logs](https://docs.obot.ai/next/llm-gateway/audit.md) |
| One-time and scheduled exports        | [Audit Log Exports](https://docs.obot.ai/next/configuration/audit-log-export.md)                                                                                                     |
| Device scans and captured files       | [Inventory and local auditing](https://docs.obot.ai/next/device-management/inventory.md)                                                                                             |
| Aggregate telemetry and consent       | [Product Analytics](https://docs.obot.ai/next/configuration/product-analytics.md)                                                                                                    |
| Encrypted fields                      | [Encryption coverage](https://docs.obot.ai/next/security/credentials.md)                                                                                                             |

MCP audit logs, LLM audit logs, and device scans have separate retention settings in [Server Configuration](https://docs.obot.ai/next/configuration/server-configuration.md). Their documented defaults are 90 days; setting the corresponding retention value to zero disables its automatic cleanup. Export records before expiration when longer retention is required.

Admin and Owner can view audit metadata; sensitive gateway request/response payloads require the Auditor add-on role. Export permissions follow the same distinction. Device scan access and captured-file behavior are documented separately—do not assume every collected field has identical restrictions.

Captured configuration files can contain sensitive content even when structured scan fields omit secret values. Field encryption does not protect exported objects or all metadata; configure destination storage permissions and encryption separately.

<a id="obot-doc-product-analytics-and-consent"></a>

## Product analytics and consent

Product analytics shares installation-wide aggregate usage with the Obot team. Reports include installation identifiers, version and runtime information, and aggregate feature counts. They do not include prompts, messages, credentials, URLs, custom MCP configuration details, or audit-log content.

In the default `consent` mode, Owners and Admins choose whether to share usage in **Platform > Product Analytics**. Operators can force analytics on or off with `OBOT_SERVER_PRODUCT_ANALYTICS_MODE`. Update checks have a separate control and are not disabled by declining analytics.

See [Product Analytics](https://docs.obot.ai/next/configuration/product-analytics.md) for the complete field-by-field disclosure, reporting schedule, consent modes, and update-check controls.

<a id="obot-doc-audit-activity"></a>

## Audit activity

The MCP Platform provides visibility into MCP and LLM gateway activity through audit logs and usage tracking. These features help with monitoring, compliance, and understanding how MCP servers and LLM gateway models are being used.

> **INFO**
>
> Auditor Role
>
> Sensitive data (MCP request/response bodies) can **only** be viewed by users with the Auditor role. All other roles, including Owner and Admin, see only metadata for these resources. The Auditor role is an add-on permission that can be combined with any other role, granting read-only access to sensitive data across the platform. See [User Roles](https://docs.obot.ai/next/security/policy-coverage.md#obot-doc-user-roles-auditor) for details.

<a id="obot-doc-audit-logs-and-usage-mcp-audit-logs"></a>

## MCP Audit Logs

Audit logs capture all MCP interactions that flow through the gateway.

<a id="obot-doc-audit-logs-and-usage-whats-logged"></a>

### What's Logged

- **MCP Requests**: Tool calls, resource access, and other MCP operations
- **MCP Responses**: Results returned from MCP servers
- **User Information**: Who made the request
- **Timestamps**: When the request occurred
- **Server Information**: Which MCP server handled the request

<a id="obot-doc-audit-logs-and-usage-viewing-audit-logs"></a>

### Viewing Audit Logs

Navigate to **Operations > Audit Logs**, then select **MCP** in the MCP Platform.

The audit log view shows:

- Timestamp
- User
- MCP Server
- Operation type
- Status (success/failure)

<a id="obot-doc-audit-logs-and-usage-detailed-view"></a>

### Detailed View

Click on any log entry to see additional details:

- Request and response metadata
- Error details (if applicable)
- Full request/response payloads and headers (Auditor role required)

<a id="obot-doc-audit-logs-and-usage-filtering"></a>

### Filtering

Filter logs by:

- Date range
- User
- MCP Server
- Operation type
- Status

<a id="obot-doc-audit-logs-and-usage-retention"></a>

### Retention

Audit logs are automatically deleted after **90 days** by default. To preserve logs beyond this period, use the export functionality before they are deleted. See [Server Configuration](https://docs.obot.ai/next/configuration/server-configuration.md) for retention settings.

<a id="obot-doc-audit-logs-and-usage-exporting-audit-logs"></a>

### Exporting Audit Logs

MCP audit logs can be exported for external analysis, compliance requirements, or long-term retention. See [Audit Log Export](https://docs.obot.ai/next/configuration/audit-log-export.md) for configuration options.

<a id="obot-doc-audit-logs-and-usage-usage"></a>

## Usage

Usage tracking provides aggregate statistics about MCP server activity.

<a id="obot-doc-audit-logs-and-usage-metrics-available"></a>

### Metrics Available

- **Request counts**: Total requests per server
- **User activity**: Which users are using which servers
- **Tool usage**: Most frequently called tools
- **Error rates**: Success/failure ratios
- **Response times**: Performance metrics

<a id="obot-doc-audit-logs-and-usage-viewing-usage"></a>

### Viewing Usage

Navigate to **Operations > Usage** in the MCP Platform.

<a id="obot-doc-audit-logs-and-usage-use-cases"></a>

### Use Cases

- **Cost management**: Understand which servers are most used
- **Capacity planning**: Identify servers that may need scaling
- **Adoption tracking**: See which tools are popular
- **Troubleshooting**: Identify servers with high error rates

<a id="obot-doc-audit-logs-and-usage-access-by-role"></a>

## Access by Role

**Power User / Power User+**

- View audit logs and usage for their own activity
- Metadata only (no request/response content)

**Admin / Owner**

- View audit logs and usage for all users
- Export MCP and LLM audit logs
- Metadata only (no request/response content)

**Auditor (add-on)**

- View full request/response payloads and headers
- Export audit logs with full content
- Read-only access to admin views

<a id="obot-doc-audit-logs-and-usage-privacy-considerations"></a>

## Privacy Considerations

Audit logs may contain sensitive information from MCP requests/responses and LLM gateway requests/responses. Consider:

- **Data retention**: Configure how long logs are kept (see [Retention](https://docs.obot.ai/next/security/audit-data.md#obot-doc-audit-logs-and-usage-retention))
- **Access control**: Limit who can view detailed logs
- **Export security**: Secure any exported log data
- **Compliance**: Ensure logging meets regulatory requirements

<a id="obot-doc-audit-log-export-creating-exports"></a>

## Creating Exports

Configure [export storage and credentials](https://docs.obot.ai/next/configuration/audit-log-export.md#obot-doc-storage-configuration) first. MCP and LLM exports share the storage configuration.

<a id="obot-doc-audit-log-export-one-time-exports"></a>

### One-Time Exports

One-time exports allow you to export MCP or LLM audit logs for a specific time range with optional filters.

1. **Navigate to Audit Logs**:

   - For MCP audit logs, go to Operations → Audit Logs → MCP
   - For LLM audit logs, go to Operations → Audit Logs → Model
   - Apply any desired filters

2. **Create Export**:

   - Click "Create Export" → "Create One-time Export"
   - If filters are applied, you'll be asked whether to include them

3. **Configure Export**:

   - **Name**: Descriptive name for the export
   - **Bucket**: Storage bucket name where exports will be saved
   - **Key Prefix**: Path prefix within the bucket. If empty, defaults to `mcp-audit-logs/YYYY/MM/DD/` for MCP exports and `llm-audit-logs/YYYY/MM/DD/` for LLM exports, based on the current date.
   - **Time Range**: Start and end dates/times
   - **Filters**: Additional filters to apply

4. **Submit Export**:
   - Click "Create Export" to start the process
   - Monitor progress in the exports list

<a id="obot-doc-audit-log-export-scheduled-exports"></a>

### Scheduled Exports

Scheduled exports run automatically at specified intervals. The first export uses the configured **Initial Backfill** to select retained history, or all retained logs if you choose **All Logs**. Existing schedules start this way on their first run after upgrading; previous run times are not treated as proof that data was exported.

After a successful export, each window starts five seconds before the end of the last successful window and ends at the scheduled cutoff. Empty successful exports advance progress too. Failed exports retry the same window; progress advances only after upload and completion status are saved. Each schedule has at most one unfinished export. Disabling a schedule prevents new windows, and re-enabling it resumes from its saved progress. A pending export keeps its captured settings; edits apply to future windows. Changing Initial Backfill after progress has been saved does not replay history.

Scheduled selection uses server update time, falling back to server creation time for older rows without an update timestamp. Event timestamps in exported records stay unchanged. This includes delayed local-agent submissions and later MCP responses to older requests. Consumers can receive duplicates from the five-second overlap or retries, and later versions of an event retain the same event ID. Consumers should account for both duplicates and updated versions.

The overlap covers brief write and commit delays. This is best-effort delivery: a write that remains invisible to export queries for more than five seconds can be missed. After an extended outage or a long disabled period, exports can recover only logs still retained by Obot; expired data cannot be recovered.

1. **Create Schedule**:

   - Click "Create Export" → "Create Export Schedule"
   - Configure the same options as one-time exports

2. **Schedule Configuration**:

   - **Frequency**: Hourly, Daily, Weekly, or Monthly
   - **Time**: Specific time to run (for daily/weekly/monthly)
   - **Day**: Day of week (weekly) or month (monthly)
   - **Initial Backfill**: Retained history to include before incremental exports begin
   - **Bucket**: Storage bucket name where exports will be saved
   - **Key Prefix**: Path prefix within the bucket. If empty, defaults to `mcp-audit-logs/YYYY/MM/DD/` for MCP exports and `llm-audit-logs/YYYY/MM/DD/` for LLM exports, based on the scheduled cutoff date.

3. **Manage Schedules**:
   - View and manage schedules in the "Export Schedules" tab
   - Enable/disable schedules as needed
   - Edit schedule configuration
