# Audit Logs

Optionally you can activate writing audit logs on a MetaKube cluster during cluster creation or in the "Edit Settings" dialog.

When activated all operations against the api-server will be logged.

For more information see also [Auditing](<https://kubernetes.io/docs/tasks/debug/debug-cluster/audit/>).

To get the current audit-logs, there are two options:

- If cluster was created using [old MetaKube dashboard](<https://metakube.syseleven.de/>) you'll need to contact our [support](<https://documentation.syseleven.de/en/support/index.md>) and specify for which cluster and time frame you want to retrieve the logs.
- If cluster was created using [new dashboard](<https://dashboard.syseleven.de/>) you can access audit-logs through `https://dashboard.syseleven.de/dashboard/iam/organizations/{org_id}/audit-logs` URL, using your org-id to retrieve specific logs.

Two specific formats exist for the audit-logs on new dashboard:

- Table format: Allows to filter by columns.
- Text format: Allowing to show the current content in JSON format extracted from Grafana Alloy output.

Current configuration for audit-logs are:

Old dashboard:

```yaml
apiVersion: audit.k8s.io/v1
kind: Policy
rules:
- level: Metadata
```

New dashboard:

```yaml
apiVersion: audit.k8s.io/v1
kind: Policy
omitStages:
- "RequestReceived"
- "ResponseStarted"
rules:
- level: Metadata
```
