> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/documentation/zh/zhang-hu-yu-ji-fei/audit-logs.md).

# 审计日志

查看 GitBook 组织中谁更改了什么、筛选事件，并将其导出为 CSV。

{% hint style="info" %}
审计日志仅适用于 [Enterprise 计划](https://www.gitbook.com/pricing)。只有组织 [管理员](https://gitbook.com/docs/documentation/zh/collaborate/member-management/roles.md) 才能查看。
{% endhint %}

审计日志会记录组织中的各项变更：谁进行了变更、何时进行、执行了什么操作，以及影响了哪些内容。您可以使用审计日志回答安全与合规方面的问题，将配置变更追溯到相关人员或工作流，或确认事件发生期间的情况。

## 打开审计日志

前往 **设置 → 审计日志**.

表格中的每一行代表一个事件，按时间从新到旧排列，包含以下列：

* **时间：** 事件发生的时间。
* **操作：** 变更内容，例如 **已更新站点集成** 或 **已启动 Git Sync**.
* **目标：** 此操作影响的站点、空间、成员或其他资源。
* **执行者：** 进行变更的成员、集成或自动化工作流。如果 GitBook 支持代表某位成员执行操作，事件会显示 **模拟身份** 标记。
* **来源：** 变更的来源，例如应用、集成或工作流。

## 审计日志记录的内容

审计日志涵盖管理和配置变更，包括：

* **组织管理：** 组织设置、合并规则、SAML 和 SCIM 配置、SSO 强制要求、邀请链接、团队、账单和计划变更、翻译设置以及自定义字体。
* **成员：** 加入组织的记录（包括通过首次 SAML 登录添加的成员）、角色变更、SSO 分配和移除。接受电子邮件邀请会记录为成员加入。
* **站点：** 结构、设置、自定义、发布、AI 和 MCP 服务器设置，以及用户和团队权限。
* **空间：** 创建、复制、删除、恢复、设置和默认访问权限。
* **集合：** 创建、设置、移动、所有权转移和删除。
* **访问和路由：** 站点共享链接、关联到站点的自定义域名、重定向以及已验证的组织域名。
* **集成和工作流：** 连接到站点的集成、站点的 Git Sync、OpenAPI 处理和上下文同步，包括这些工作流在后台执行的变更。

随着 GitBook 增加更多操作，日志覆盖范围可能会扩大。有关审计日志可记录的所有操作，请参阅 [审计日志操作](https://gitbook.com/docs/documentation/zh/zhang-hu-yu-ji-fei/audit-logs/actions.md).

审计日志不会记录页面内容变更、页面浏览或文件下载。如需查看内容编辑记录，请使用 [版本控制](https://gitbook.com/docs/documentation/zh/chuang-jian-nei-rong/version-control.md).

## 筛选事件

“ **时间**, **操作**”和 **操作者** 每列的标题中都有一个筛选器。

* **时间：** 显示过去 24 小时、7 天或 30 天的事件，也可以选择自定义日期范围。
* **操作：** 搜索并选择一个或多个操作。
* **操作者：** 选择成员，或选择自动化操作者，例如 Git Sync、OpenAPI 处理、上下文同步、自定义域名验证和 GitBook Agent。

点击 **清除筛选条件** 即可再次显示所有事件。

## 查看事件详情

点击某一行，在侧边面板中打开该事件。面板会显示：

* 更改前后的值，格式为“更改前 → 更改后”。对于未记录值的设置，面板会列出设置名称。
* 事件、操作者、目标和相关工作流的技术 ID，位于 **事件信息**下方。使用复制按钮与 GitBook 支持团队分享这些信息。

使用向上和向下按钮在当前页面的事件之间切换。按 <kbd>Esc</kbd> 关闭面板。

每个事件都有自己的 URL。打开事件时，从浏览器地址栏复制 URL，即可与其他管理员分享该事件的链接。

## 将事件导出为 CSV

1. 应用所需的筛选条件。导出文件仅包含符合条件的事件。
2. 点击 **导出为 CSV**.

每次最多可导出 10,000 个事件。如需导出更多事件，请缩小 **时间** 筛选范围，然后分批导出历史记录。

CSV 文件包含每个事件的时间、操作、操作者、模拟操作者、来源、目标和事件 ID。

## 使用 API 访问审计日志

若要将审计事件导入自己的工具（例如 SIEM），请使用 GitBook API 中的 [列出组织审计事件](https://gitbook.com/docs/developers/gitbook-api/api-reference/organizations/list-organization-audit-events) 端点。

## 保留期限

GitBook 会保留审计事件 1 年。

## 更改套餐时

组织退出 Enterprise 套餐后，GitBook 仍会继续记录审计事件。组织重新加入 Enterprise 套餐之前，管理员无法查看或导出这些事件。重新加入后，过去一年的事件会再次开放查看。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://gitbook.com/docs/documentation/zh/zhang-hu-yu-ji-fei/audit-logs.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
