# Überwachungsprotokoll für ein Unternehmen

Zur Unterstützung bei der Fehlerbehebung sowie der internen und externen Compliance stellt GitHub Protokolle zu protokollierten Benutzer-, Organisations- und Repository-Ereignissen bereit.

<!-- TRANSLATION_FALLBACK prop=markdown type=ParseError line=17 col=168 msg="tag {% ifversion ghes %} not closed" -->
## What are audit logs?

> \[!NOTE]
> Webhooks might be a good alternative to the audit log or API polling for certain use cases. Webhooks are a way for GitHub to notify your server when specific events occur for a repository, organization, or enterprise. Compared to the API or searching the audit log, webhooks can be more efficient if you just want to learn and possibly log when certain events occur on your enterprise, organization, or repository. See [Webhooks documentation](/en/enterprise-server@3.22/webhooks).

The audit log lists events triggered by activities that affect your enterprise. Audit logs for GitHub are retained indefinitely, unless an enterprise owner configured a different retention period. See [Configuring the audit log for your enterprise](/en/enterprise-server@3.22/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/configuring-the-audit-log-for-your-enterprise).

By default, only events from the past three months are displayed. To view older events, you must specify a date range with the `created` parameter. See [Understanding the search syntax](/en/enterprise-server@3.22/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates).

The name for each audit log entry is composed of a category of events, followed by an operation type. For example, the `repo.create` entry refers to the `create` operation on the `repo` category.

Each audit log entry shows applicable information about an event, such as:

* The enterprise or organization an action was performed in
* The user (actor) who performed the action
* The user affected by the action
* Which repository an action was performed in
* The action that was performed
* Which country the action took place in
* The date and time the action occurred
* The SAML SSO and SCIM identity of the user (actor) who performed the action
* For actions outside of the web UI, how the user (actor) authenticated

Site administrators can review the audit log for an instance, which contains a wider range of events including system administrative events. To access the instance-level audit log:

1. From an administrative account on GitHub Enterprise Server, in the upper-right corner of any page, click <svg version="1.1" width="16" height="16" viewBox="0 0 16 16" class="octicon octicon-rocket" aria-label="Site admin" role="img"><path d="M14.064 0h.186C15.216 0 16 .784 16 1.75v.186a8.752 8.752 0 0 1-2.564 6.186l-.458.459c-.314.314-.641.616-.979.904v3.207c0 .608-.315 1.172-.833 1.49l-2.774 1.707a.749.749 0 0 1-1.11-.418l-.954-3.102a1.214 1.214 0 0 1-.145-.125L3.754 9.816a1.218 1.218 0 0 1-.124-.145L.528 8.717a.749.749 0 0 1-.418-1.11l1.71-2.774A1.748 1.748 0 0 1 3.31 4h3.204c.288-.338.59-.665.904-.979l.459-.458A8.749 8.749 0 0 1 14.064 0ZM8.938 3.623h-.002l-.458.458c-.76.76-1.437 1.598-2.02 2.5l-1.5 2.317 2.143 2.143 2.317-1.5c.902-.583 1.74-1.26 2.499-2.02l.459-.458a7.25 7.25 0 0 0 2.123-5.127V1.75a.25.25 0 0 0-.25-.25h-.186a7.249 7.249 0 0 0-5.125 2.123ZM3.56 14.56c-.732.732-2.334 1.045-3.005 1.148a.234.234 0 0 1-.201-.064.234.234 0 0 1-.064-.201c.103-.671.416-2.273 1.15-3.003a1.502 1.502 0 1 1 2.12 2.12Zm6.94-3.935c-.088.06-.177.118-.266.175l-2.35 1.521.548 1.783 1.949-1.2a.25.25 0 0 0 .119-.213ZM3.678 8.116 5.2 5.766c.058-.09.117-.178.176-.266H3.309a.25.25 0 0 0-.213.119l-1.2 1.95ZM12 5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg>.
2. If you're not already on the "Site admin" page, in the upper-left corner, click **Site admin**.
3. In the left menu, click **Audit log**.

In addition to viewing your audit log, you can monitor activity in your enterprise in other ways, such as viewing push logs and managing global webhooks. For more information, see [Exploring user activity in your enterprise](/en/enterprise-server@3.22/admin/monitoring-activity-in-your-enterprise/exploring-user-activity-in-your-enterprise). You can also use the audit log, and other tools, to monitor the actions taken in response to security alerts. For more information, see [Auditing security alerts](/en/enterprise-server@3.22/code-security/concepts/security-at-scale/audit-security-alerts).

## How to use audit logs

As an enterprise owner or site administrator, you can interact with the audit log data for your enterprise in several ways:

* You can view the audit log for your enterprise. For more information, see [Accessing the audit log for your enterprise](/en/enterprise-server@3.22/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/accessing-the-audit-log-for-your-enterprise).
* You can search the audit log for specific events. For more information, see [Searching the audit log for your enterprise](/en/enterprise-server@3.22/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/searching-the-audit-log-for-your-enterprise).
* You can identify all events that were performed by a specific access token. For more information, see [Identifying audit log events performed by an access token](/en/enterprise-server@3.22/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/identifying-audit-log-events-performed-by-an-access-token).
* You can configure settings, such as the retention period for audit log events and whether Git events are included. For more information, see [Configuring the audit log for your enterprise](/en/enterprise-server@3.22/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/configuring-the-audit-log-for-your-enterprise).
* You can stream audit and Git events data from GitHub to an external data management system. For more information, see [Streaming the audit log for your enterprise](/en/enterprise-server@3.22/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/streaming-the-audit-log-for-your-enterprise).
* You can forward audit and system logs from your enterprise to a third-party hosted monitoring system. For more information, see [Log forwarding](/en/enterprise-server@3.22/admin/monitoring-activity-in-your-enterprise/exploring-user-activity-in-your-enterprise/log-forwarding).
* You can use the Audit log API to view actions performed in your enterprise. For more information, see [Using the audit log API for your enterprise](/en/enterprise-server@3.22/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/using-the-audit-log-api-for-your-enterprise).

For a full list of audit log actions that may appear in your enterprise audit log, see [Audit log events for your enterprise](/en/enterprise-server@3.22/admin/monitoring-activity-in-your-enterprise/reviewing-audit-logs-for-your-enterprise/audit-log-events-for-your-enterprise).

## Further reading

* [Reviewing the audit log for your organization](/en/enterprise-server@3.22/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/reviewing-the-audit-log-for-your-organization)
* [About system logs](/en/enterprise-server@3.22/admin/monitoring-and-managing-your-instance/monitoring-your-instance/about-system-logs)