# Log Database Externalization

This document outlines the process for externalizing log storage by allowing log entries to be stored in other databases, such as MySQL, PostgreSQL, and SQL Server.

## Steps to Configure Log Database

### Accessing Global Settings

1. Click on the “**Administration**” icon On the left-hand panel.
2. &#x20;Once clicked, Click on the “**Global settings.**”&#x20;

<figure><img src="https://1807783010-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrJ01SyijpwGkw5NZTFOA%2Fuploads%2FclH1ufZuLx2ny2P4g2Y2%2Fglobal.png?alt=media&#x26;token=eaebddfe-6ba2-42f4-b5a6-bae5c620d643" alt=""><figcaption><p>Administration tab commands</p></figcaption></figure>

### Configuring Log Database Settings

Once inside the “**Global settings**” Page, click on the “**Log Database setting**” as shown below.

<figure><img src="https://1807783010-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrJ01SyijpwGkw5NZTFOA%2Fuploads%2FhcJqqAWtfoByWtJIus1W%2Flogdbinglobal.png?alt=media&#x26;token=8ebeecb7-8337-4737-9ea9-6d87ab6147ed" alt=""><figcaption><p>Global setting page</p></figcaption></figure>

### Entering Database Configuration Details

You will see several fields to configure your log database instance:

* **Type**: Select the type of database (e.g., MySQL, PostgreSQL, SQLServer).
* **Host:** Enter the hostname or IP address of your database server.
* **Port:** Specify the port number used for database connections.
* **Username:** Input the username for database access.
* **Password:** Enter the corresponding password for the specified username.
* **Database Name:** Provide the database name where logs will be stored.
* **Schema:** If applicable, specify the schema to be used.

Once you fill in these details, the URL will auto-fill based on the provided configuration.

#### Testing connection and saving Changes

* Once you have completed and tested all the settings, click the “ **save changes**” button to save them.
* Click the “**Test Connection**” button to validate the connection.

<figure><img src="https://1807783010-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrJ01SyijpwGkw5NZTFOA%2Fuploads%2FKlfkYpBp6meUkICfIl8w%2Flogdbsetup.png?alt=media&#x26;token=36b762c3-285e-4456-9d6e-727461c34320" alt=""><figcaption><p>Log Database setup </p></figcaption></figure>

{% hint style="info" %}

#### Important Notification

**Restart the Tomcat server once the Log Database setup is complete to ensure the new configurations take effect.**
{% endhint %}

### Testing Logs on your database

Once Setup is complete and any command is run, you can see the logs in your Database, which is added as the location for your Log Database.\
Inside your database, you will be able to see three tables.&#x20;

#### PROCESS\_TABLE

It will show you the process logs, including the process information

<figure><img src="https://1807783010-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrJ01SyijpwGkw5NZTFOA%2Fuploads%2FHkSZR4IG0FTE0M2XDwyS%2FPROCESSTABLE.png?alt=media&#x26;token=fa273ce8-dbec-4e2b-baee-264c27a06138" alt=""><figcaption><p>Includes all process related information like status, command, Timestamp, etc.</p></figcaption></figure>

#### SYS\_ROLE&#x20;

This table will show the information related to the system roles assigned.

<figure><img src="https://1807783010-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrJ01SyijpwGkw5NZTFOA%2Fuploads%2FkY0UiUJQudFd6n5Mhzfy%2FSYSTable.png?alt=media&#x26;token=806e8ae5-97ac-4671-90ea-d7eda2c2eb60" alt=""><figcaption><p>It include system information like Policy, createdetdate, type, etc</p></figcaption></figure>

#### SYS\_USER

This table will show the information related to the Users added to the system.

<figure><img src="https://1807783010-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrJ01SyijpwGkw5NZTFOA%2Fuploads%2FwJ8EKBU6MsKURxCZCYD2%2FUsertable.png?alt=media&#x26;token=5f0ade62-7f16-47dc-8f11-2b98cf6b0321" alt=""><figcaption><p>It Include user informations like firstname, lastname, role, etc.</p></figcaption></figure>

Using the above informations and following the given steps user can set up there external log database to externalize their log information in the database of their choise&#x20;
