Skip to main content

Exporting audit log activity for your enterprise

You can export audit and Git events data to a file for offline analysis.

Enterprise owners can export the audit log.

About exports of audit log and Git events data

You can export the audit log by downloading a JSON or CSV file from your enterprise on GitHub Enterprise Cloud. When you export audit log events, you can query by one or more of these supported qualifiers to filter for specific log events to export. For more information about search qualifiers, see "Search based on the action performed."

You can export Git events data by downloading a JSON file from your enterprise audit log. Unlike audit log data, you cannot query for specific Git events to filter and export in the audit log user interface.

Note: When you export Git events, events that were initiated via the web browser or the REST or GraphQL APIs are not included. For example, when a user merges a pull request in the web browser, changes are pushed to the base branch, but the Git event for that push is not included in the export.

After you export the log, you'll see the following keys and values in the resulting file.

キー値の例
actionteam.create
actoroctocat
ユーザcodertocat
actor_location.country_codeUS
orgocto-org
repoocto-org/documentation
created_at1429548104000 (タイムスタンプは Epoch からの経過時間をミリ秒で示します。)
data.emailoctocat@nowhere.com
data.hook_id245
data.events["issues", "issue_comment", "pull_request", "pull_request_review_comment"]
data.events_were["push", "pull_request", "issues"]
data.target_loginoctocat
data.old_userhubot
data.teamocto-org/engineering

As an alternative to exporting log events, you can use the API to retrieve audit log events, or set up GitHub Enterprise Cloud to stream audit data as events are logged. For more information, see "Using the audit log API for your enterprise" and "Streaming the audit log for your enterprise."

Exporting audit log data

  1. GitHub.comの右上で、自分のプロフィール写真をクリックし、続いてYour enterprises(自分のEnterprise)をクリックしてください。 GitHub Enterprise Cloudのプロフィール写真のドロップダウンメニュー内の"Your enterprises"

  2. Enterpriseのリストで、表示したいEnterpriseをクリックしてください。 Enterpriseのリスト中のEnterpriseの名前

  3. Enterpriseアカウントのサイドバーで、 Settings(設定)をクリックしてください。 Enterpriseアカウントサイドバー内の設定タブ

  4. Settings(設定)"の下で、Audit logをクリックしてください。 Enterpriseアカウントのサイドバー内のAudit logタブ

  5. Optionally, to only export filtered results, search by one or more supported qualifiers or log filters.

  6. Select the Export dropdown menu, and choose the file format (JSON or CSV) to export log events in.

    エクスポートボタン

Exporting Git events data

You can also export Git events data by date range.

  1. GitHub.comの右上で、自分のプロフィール写真をクリックし、続いてYour enterprises(自分のEnterprise)をクリックしてください。 GitHub Enterprise Cloudのプロフィール写真のドロップダウンメニュー内の"Your enterprises"

  2. Enterpriseのリストで、表示したいEnterpriseをクリックしてください。 Enterpriseのリスト中のEnterpriseの名前

  3. Enterpriseアカウントのサイドバーで、 Settings(設定)をクリックしてください。 Enterpriseアカウントサイドバー内の設定タブ

  4. Settings(設定)"の下で、Audit logをクリックしてください。 Enterpriseアカウントのサイドバー内のAudit logタブ

  5. Select the Export Git Events dropdown menu and choose a date range to export log events for.

    Export Git events button

  6. Click Download Results to download the file.

  7. The data is exported as a compressed JSON file. To extract the JSON data, uncompress the file using an archive utility client or command. 例:

    gunzip export-avocado-corp-1642896556.json.gz