# Sarg com UserAuth

Agora temos uma opção de integração direta entre o UserAuth e o SARG, portanto você pode utilizar essa função para verificação dos Logs.

## Instalando o SARG

Navegue até: **System -> Package Manager -> Available Packages**

* Busque pelo SARG
* Clique em "Install"

<figure><img src="/files/blcjszkS05TO0MjENHZw" alt=""><figcaption></figcaption></figure>

## Configurando a integração UserAuth com Sarg

Navegue até: Services -> UserAuth Integration -> General

Na aba Logs, vamos ter algumas opções, podemos deixar conforme a imagem abaixo.

<figure><img src="/files/uTEwQgN6LEbkzeHRWGSH" alt=""><figcaption></figcaption></figure>

**Log volumetry:** Aqui vamos marcar a opção de volumetria no log;

**Log volumetry Interfaces:** Selecionar as interface a ser auditada;

**Patch Configuration:** Clique na opção **"Enable userAuth Inf Sarg".**

<figure><img src="/files/EdMcbz4EJ7OK5YiywVPj" alt=""><figcaption></figcaption></figure>

## Configurando o Sarg

&#x20;Após realizar todos os passos acima, podemos iniciar os ajustes.

Navegue até: **Status -> Sarg Settings -> General**

<figure><img src="/files/5eBYt3qmQdgx72eYrlzS" alt=""><figcaption></figcaption></figure>

**Proxy Server:** Marque a opção "Userauth";

**Resport Options:** Por padrão marque essas opções abaixo.&#x20;

<figure><img src="/files/EUPExDXNpQdl4755vo1x" alt=""><figcaption></figcaption></figure>

**Report To Generate:** Mantenha o padrão deixando todas as opções.

<figure><img src="/files/qReHo1GoBD8dFcwv5NCQ" alt=""><figcaption></figcaption></figure>

Date Format: Selecione a opção: **European dd/mm/yy**

<figure><img src="/files/Df3cqSv1fiCmNKefE5Nl" alt=""><figcaption></figcaption></figure>

**Days Limits:** Por padrão deixamos com 90 dias.

Caso seja deixando em branco, não haverá exclusão automática, portanto existe a possibilidade de acabar o espaço de armazenamento (Disco, SSD e afins), caso não haja um gerenciamento para isso.

<figure><img src="/files/CYVBn0nWRDfmE5a8NF54" alt=""><figcaption></figcaption></figure>

**Exclude Hosts:** Aqui você pode adicionar endereços que não gostaria de mostrar nos logs, por padrão deixamos apenas: **127.0.0.1**

<figure><img src="/files/VVu2XwyWlquUuI8cn9x9" alt=""><figcaption></figcaption></figure>

Após realizar todas as alterações, pode salvar.

<figure><img src="/files/jYHXojtkfQFJqBRXmrS8" alt=""><figcaption></figcaption></figure>

## Criando um Schedule <a href="#criando-um-schedule" id="criando-um-schedule"></a>

Na aba "S**chedule"** você pode definir quanto tempo será gerado o relatório.&#x20;

Podemos criar várias opções com tempos diferentes, conforme o desejo.

Clique em **"Add"**

<figure><img src="/files/GbHM4plJh1fU5FkYOc5j" alt=""><figcaption></figcaption></figure>

Nesse exemplo vamos criar um relatório do dia atual, atualizando a cada 1hrs.

**Enable:** Ativar essa schedule

**Description:** Adicione uma descrição de fácil identificação

**Sarg Args:** Aqui vamos definir o tempo de cada arquivo de log.

<figure><img src="/files/yzjzuwW6XLXbfDz9dPp5" alt=""><figcaption></figcaption></figure>

Frequency: Tempo de atualização dos logs, por padrão mantemos em 1h.

Após isso pode salvar.

<figure><img src="/files/3CtqqMIlcYvQmP7cmyLj" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/J0r1StIn75aVFgv9iCMN" alt=""><figcaption></figcaption></figure>

## Verificação dos logs

Na aba "View Report", temos o acesso ao logs gerados.

<figure><img src="/files/T2GF0GpeGe2xDt5F37rv" alt=""><figcaption></figcaption></figure>

O relatórios são separados por **ano, mês e dia**.

<figure><img src="/files/ZqbjCkBjv0XI7Wb3YuMV" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/VWADRqmSMXP67i1Tpl9D" alt=""><figcaption></figcaption></figure>

Após escolher a data, você terá acesso separado por usuário/IP.

<figure><img src="/files/0e0OA820LNce0kApbHaw" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/0B7AzNzk447FNbFbi9bs" alt=""><figcaption></figcaption></figure>

Caso queira exportar, pode clicar nas opções abaixo conforme a imagem.

<figure><img src="/files/1ww0bU3ANefwShRBz9SB" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.userauth.com.br/opcoes-avancadas-do-userauth/filtro-de-logs-com-sarg/sarg-com-userauth.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
