> For the complete documentation index, see [llms.txt](https://docs.datasentinel.io/manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.datasentinel.io/manual/implementation/platform-usage/configuration/audit.md).

# Audit

Datasentinel can audit the actions performed by your declared users on the platform.

You can thus know the Datasentinel modules as well as the selected instances with their date of use.

Convenient if you want to delete inactive accounts for example

## Configure

{% hint style="info" %}
On a new installation, the audit is **enabled** with a retention of **60** days.
{% endhint %}

{% stepper %}
{% step %}

### Open tools menu

> <img src="https://1072624949-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlcWi6G1jtNuyGT9C0pkc%2Fuploads%2FjtvOaWdVdR3TkapgvvUQ%2Ftools_icon.png?alt=media&amp;token=99b0c7a9-8d88-4f40-b784-f7e6687c0043" alt="" data-size="original">

{% endstep %}

{% step %}

### Global settings

> <img src="https://1072624949-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlcWi6G1jtNuyGT9C0pkc%2Fuploads%2FyF2ObfgOFHJSio5vkd52%2Ftools_menu.png?alt=media&amp;token=6c019fe1-199f-492e-b794-56438546d86a" alt="" data-size="original">

{% endstep %}

{% step %}

### Audit settings

<figure><img src="https://1072624949-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlcWi6G1jtNuyGT9C0pkc%2Fuploads%2F20OUEYDlSPNcrMIC9WE6%2Faudit_settings.png?alt=media&amp;token=7858f52d-f6eb-4f07-976b-0fecee7e6078" alt=""><figcaption><p>Audit settings</p></figcaption></figure>

Enable or disable audit logging and configure the retention period (in days) for audit records.

When audit logging is enabled, Datasentinel records all user actions, including the module used and the selected PostgreSQL instance.
{% endstep %}
{% endstepper %}

## View

From the **Tools** menu, click **Users**.

The **Last Use** field shows the date of the most recent action performed by each user.

<figure><img src="https://1072624949-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlcWi6G1jtNuyGT9C0pkc%2Fuploads%2FFqnGdZemRlruSjl6orNQ%2Faudit_last_use.png?alt=media&amp;token=ff809d62-29f5-4b72-99cb-0f7e023e4f7b" alt=""><figcaption><p>Audit last use</p></figcaption></figure>

All user actions can be viewed in the **Usage** tab.

<div data-with-frame="true"><figure><img src="https://1072624949-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlcWi6G1jtNuyGT9C0pkc%2Fuploads%2F1gR3rEJxiZs11LQVQy5I%2Faudit_usage.png?alt=media&amp;token=c861a93a-2bca-4073-accb-47bb4e39ccd0" alt=""><figcaption><p>Usage</p></figcaption></figure></div>

Actions are grouped by user and PostgreSQL instance. For more detailed analysis, results can also be grouped by day and/or module.

The **Number of Uses** column shows how many times each action was performed.

{% hint style="info" %}
Actions can also be viewed at the individual user level.
{% endhint %}

<div data-with-frame="true"><figure><img src="https://1072624949-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlcWi6G1jtNuyGT9C0pkc%2Fuploads%2FfV4qzJ0AHRb8mmVrPhDV%2Faudit_user_usage.png?alt=media&amp;token=67de2599-33f5-4ab9-89a8-071b01e19e7f" alt=""><figcaption><p>User audit actions</p></figcaption></figure></div>


---

# 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://docs.datasentinel.io/manual/implementation/platform-usage/configuration/audit.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.
