﻿# Diagnostics and troubleshooting in BRIX On-Premises

> [HTML Version](enterprise-troubleshooting.html)

Diagnostics can be used to determine the current state of the system, eliminate existing errors, and optimize performance.

The diagnostic and troubleshooting process consists of three steps:

1. [Collecting diagnostic information](#collect-diagnostic-info).

2. [Applying new parameters for BRIX](#apply-new-parameters-enterprise).

3. [Generating logs and checking the status of services](#generate-logs-check-status).

Please note that during the diagnostic and troubleshooting process, changes are made to the existing configuration file \[OBJECT\], which is received and filled in when BRIX is installed. Unintentional changes to parameters in this file may result in the loss of BRIX application functionality.

````
начало внимание

````
Before making changes to the \[OBJECT\] file, it is recommended to create its backup copy.

````
конец внимание

````
If the \[OBJECT\] file has been lost, retrieve the parameters of the current BRIX installation and save them to this file. To do this, execute the following command:

````
helm get values brix365 \[-n namespace\] > values-brix365.yaml

## ````
Step 1: Collecting diagnostic information

To collect system state data, enable debugging of the platform. To do this, set the \[OBJECT\] parameter to \[OBJECT\]:

````
debug: true

## ````
Step 2: Applying new parameters for BRIX

You can update BRIX application settings in two ways: [online](#update-via-internet) or [offline](#update-offline).

### Update parameters online

1. Determine the chart version where the BRIX application was installed or updated:

````
helm show chart brix365/brix365

````
Command execution example:

**(change-settings-enterprise-1.png)**

The command will result in the chart version information being specified in the \[OBJECT\] file. Save this value for the next step.

2. Update the BRIX parameters. To do this, execute the following command specifying the installed chart version for the \[OBJECT\] flag instead of \[OBJECT\]:

````
helm upgrade --install brix365 brix365/brix365 -f values-brix365.yaml --version <brix365-chart-version> --timeout=30m --wait \[-n namespace\]

### ````
Update parameters offline

Go to the chart directory where the BRIX application was installed or updated and execute the following command:

````
helm upgrade --install brix365 ./brix365 -f values-brix365.yaml --timeout=30m --wait \[-n namespace\]

````
It takes about 10-30 minutes to update the parameters. Wait for it to complete.

## Step 3: Generating logs and checking the status of services

### Obtain logs

- If you need to gather logs from all application services, execute the following command:

````
kubectl logs -l tier=brix365 --all-containers \[-n namespace\] > logs.txt

- ````
To view logs of a separate service, specify the required service instead of \[OBJECT\]:

````
kubectl logs -l app=\[name\] \[-n namespace\]

начало примера

````
Example:

````
kubectl logs -l app=main -n brix

конец примера

### ````
View logs in real time

To monitor logs in real time, add the \[OBJECT\] option:

````
kubectl logs -l app=\[name\] -f \[-n namespace\]

начало примера

````
Example:

````
kubectl logs -l app=main -f -n brix

конец примера

### ````
Check the status of services

To make sure that all services are working correctly, execute the following command:

````
kubectl get pod \[-n namespace\]

````
The result will be generated as a table with the list of services. Services need to be in the \[OBJECT\] status, while tasks need to be in the \[OBJECT\] status.

For more detailed analysis, it is recommended to install the necessary [monitoring](install-monitoring-tools.md), [logging](install-loki.md) and [trace analysis](install-tempo.md) tools.