﻿# Configure the system for the Security Audit 2.4.1 module

> [HTML Version](install-audit-service.html)

In system versions prior to 2026.4, before using the **Security Audit 2.4.1** module and logging events, install the **Security Audit** service as a database for storing collected data.

````
начало внимание

````
Starting with system version 2026.4, use the [Security Audit 3.0 module](update-audit.md). It includes a configured portable service that automatically deploys the microservice in the Kubernetes environment when the module is enabled.

````
конец внимание

## ````
Install the Security Audit service

For the **Security Audit 2.4.1** module to function correctly in BRIX On-Premises prior to version 2026.4, a separate **Security Audit** service must be installed.

Installation consists of four steps:

1. [Prepare the connection string for the PostgreSQL database](#prepare-connection-string).

2. [Download the Helm chart and configuration file](#download-helm-chart-and-config-file).

3. [Fill out the configuration file](#fill-config-file).

4. [Install the Audit chart using Helm in the Kubernetes cluster](#install-audit-chart).

### Step 1: Prepare the connection string for the PostgreSQL database

Data collected in the system and displayed using the **Security Audit** module is stored in a PostgreSQL database. Install the **uuid-ossp** and **pg\_trgm extensions** in this database. Also, consider the disk storage capacity based on the information processed in your company. For more information on configuring PostgreSQL and installing the **uuid-ossp** and **pg\_trgm** extensions, see the [Databases](postgresql.md) section.

Information from the module is stored in a database separate from system data. When you first connect the module to the database, all the tables required for operation will be created. By default, the database name for the** Security Audit** module is `audit`.

Prepare the PostgreSQL connection string for write and read operations in the format \[OBJECT\], where:

- \[OBJECT\] is the username of PostgreSQL having rights to the database \[OBJECT\]; 

- \[OBJECT\] is the password for the PostgreSQL user; 

- \[OBJECT\] is the IP or domain name of the PostgreSQL server; 

- \[OBJECT\] is the port for connecting to PostgreSQL (the standard port is \[OBJECT\]; 

- \[OBJECT\] is the name of the database (standard name is \[OBJECT\]); 

- \[OBJECT\] is  the use of a secure connection. 

### Step 2: Download the Helm chart and configuration file

For installation via the internet, obtain the configuration file \[OBJECT\] by executing the command:

````
helm repo add brix365 https://charts.brix365.com  
helm repo update  
helm show values brix365/audit > values-audit.yaml

````
Getting the configuration file for installation in a closed-loop environment without internet acces

1. On a computer with internet access, download the BRIX images and upload them to the local image registry by executing the following command:

````
helm repo add brix365 https://charts.brix365.com  
helm repo update  
helm pull brix365/audit

````
For more details, see [Download BRIX images](downloadin-images-elma365.md).

2. Copy the downloaded chart archive \[OBJECT\] to the server where the installation will be performed.

3. Unpack this chart and copy the default configuration file \[OBJECT\] to \[OBJECT\]: 

````
tar -xf audit-X.Y.Z.tgz  
cp audit/values.yaml values-audit.yaml
````

### ````
Step 3: Fill out the configuration file

Fill out the configuration file \[OBJECT\] for the installation of the Audit service.

For the parameter \[OBJECT\], specify the PostgreSQL connection string obtained in Step 1. This article uses a connection string to PostgreSQL deployed in the Kubernetes cluster. 

````
\# Audit settings  
audit:  
  global:  
    psql\_url: "postgresql://postgres:pgpassword@postgres.default.svc.cluster.local:5432/audit?sslmode=disable"  
...

````
Filling in the connection parameters to the private registry for installation in a closed loop without internet access

  
To connect to the private registry, you need to:

1. Download the BRIX images and upload them to the local image registry. For more details, see [Download BRIX images](downloadin-images-elma365.md).

2. Set the address and path in the parameter \[OBJECT\]. 

3. Indicate the name of the secret with access rights to the private registry in the parameter \[OBJECT\]. The secret must be created manually and encrypted in Base6.

````
\# Audit settings  
audit:  
...  
  # address and secret for the private registry  
  image:  
    repository: registry.example.com  
    # The secret with access rights to the private registry must be created manually, encrypted in Base64  
    pullSecret:  
      - name: myRegistryKeySecretName
````

### ````
Step 4: Install the Audit chart using Helm in the Kubernetes cluster

Install the audit chart in the \[OBJECT\] specified in Step 3 in the configuration file \[OBJECT\]. The namespace will be created during installation if it was not previously created.

For internet installation:

````
helm upgrade --install brix365-audit brix365/audit -f values-audit.yaml -n audit --create-namespace 

````
For offline installation without internet access:

````
helm upgrade --install brix365-audit ./audit -f values-audit.yaml -n audit --create-namespace

Начало внимание

````
Installing the Security Audit service does not automatically include or install the Security Audit module on the BRIX application side.

````
Конец внимание

````
Read more about installing the module and working with it in [Security Audit module](audit-module-settings.md).

## Delete the Audit chart using helm in the Kubernetes cluster

````
Начало внимание

````
Before removing the Security Audit component, disable the use of the [Secutiry Audit module](audit-module-settings.md) on the BRIX application side.

````
Конец внимание

````
To delete the brix365-audit chart in \[OBJECT\], execute the command:

````
helm uninstall brix365-audit -n audit
````