When encountering errors or issues in BRIX AI, run diagnostics to troubleshoot the problem. You can review the diagnostic files to fix issues on your own or attach them to a technical support ticket for analysis.
Several diagnostic methods are available:
Running diagnostic script
- Go to the BRIX AI installation folder:
cd ~/elma-cortex
- If you are running diagnostics for the first time, set up permissions:
chmod +x ./diagnose.sh
- Run the diagnostic script. By default, it collects logs for the last 30 days:
./diagnose.sh
The script generates an archive named <project-name>-diagnostics-<timestamp>.tar.gz containing all collected diagnostic data.
To customize the diagnostic data collection, run the script using the parameters described below.
Diagnostic script parameters
Parameter |
Description |
Default value |
|
Project or Docker Swarm stack name for diagnostics |
Retrieved from the .env environment variables file. If no name is specified, elma-cortex is used |
|
Time period for log collection |
Format:
Default: 30 days |
|
Name of the output diagnostic file |
Specify the file name without the .tar.gz extension. Format: <project-name>-diagnostics-<timestamp> |
|
Display the list of available parameters |
— |
Diagnostic data collection examples
Here are examples of commands used to run diagnostics:
- For the last two hours:
./diagnose.sh --logs-since 2h
- For the last 24 hours with a custom file name:
./diagnose.sh --logs-since 24h --output issue-diagnostics
- For a week with a custom project name configured in environment variables:
./diagnose.sh --project-name my-cortex --logs-since 7d
Diagnostic file contents
The diagnostic script gathers operational data about BRIX AI into several folders, which are then packaged into an archive:
- system: System information about the installation and environment.
- logs: Service logs.
- containers and services:
- Information about containers when using Docker Compose.
- Information about services when using Docker Swarm.
- config: Docker and environment configuration. Standard sensitive data such as passwords and API keys in the environment configuration file are automatically replaced with ***MASKED***.
начало внимание
Before submitting diagnostic files to technical support, ensure they do not contain sensitive data.
конец внимание
Below is a summary of the data collected by the diagnostic script.
File |
Content |
|
OS version, memory, disk space, CPU information |
|
Docker version and configuration |
|
Docker Compose service status (only when using Docker Compose) |
|
Swarm nodes and cluster information (only when using Docker Swarm) |
|
Stack services and replicas (only when using Docker Swarm) |
|
Task history including failures (only when using Docker Swarm) |
|
Running and stopped containers |
|
Docker network configuration |
|
Docker volume information |
|
Docker secret metadata (only when using Docker Swarm) |
|
Service health checks |
|
Recent Docker events |
Log files for all BRIX AI services:
- gamma-apps.log: Main app service.
- gamma-tasks.log: Background task worker.
- caddy.log: Reverse proxy.
- mongo-db.log: MongoDB.
- rabbit.log: RabbitMQ.
- redis.log: Redis.
- minio.log: MinIO S3 storage.
- qdrant.log: Vector database.
- JSON data on configuration, status, and metadata for each running container or service.
- Docker task data (only when using Docker Swarm).
- The docker-compose.yml files when using Docker Compose or stack-*.yml when using Docker Swarm.
- The env-sanitized.txt file: Environment configuration with masked passwords.
- The install.md file: Installation documentation.
Troubleshooting the diagnostic script
Here are common issues you might encounter when using the diagnostic script.
- Permission denied error.
If you get a permission error, run these commands:
chmod +x diagnose.sh
./diagnose.sh
- Script not found in Docker Compose.
Make sure you are in the correct directory when running the script:
ls -la diagnose.sh
If the script is missing from the directory, copy it from the installation archive.
- Docker permissions issues.
If Docker commands fail due to permission errors, you can:
- Run the script using sudo:
sudo ./diagnose.sh
- Add the user to the docker group. You will need to log in again afterward:
sudo usermod -aG docker $USER
Manual diagnostic commands
Here are commands you can use to collect diagnostic data manually.
Diagnostics in Docker Compose
- Check service status:
docker compose ps --all
- View logs for a specific service:
docker compose logs gamma-apps --since 1h
- View combined logs:
docker compose logs --since 1h
- Get container details:
docker inspect $(docker compose ps -q gamma-apps)
- Check service readiness:
docker exec $(docker compose ps -q gamma-apps) curl -sf http://localhost:8080/api/int/v1/info/application/health
Diagnostics in Docker Swarm
- Get the list of stack services:
docker stack services elma-cortex
- Get the list of stack tasks, including failed ones:
docker stack ps elma-cortex --no-trunc
- View service logs:
docker service logs elma-cortex_gamma-apps --since 1h
- Get service details:
docker service inspect elma-cortex_gamma-apps
- Check Swarm node status:
docker node ls
Collecting HAR files in browser
HAR files record network interaction between the browser and the server. They help diagnose API issues, authentication errors, and UI failures. Generating a HAR file depends on your browser and is described in its documentation.
A HAR file includes:
- HTTP requests and responses.
- Request and response headers.
- Request and response bodies.
- Timing details.
- Cookie values.
Важно: HAR files include sensitive data such as:
- Authentication tokens and cookies.
- Session data.
- Personal data from API response.
Before sending HAR files to technical support::
- Ensure that the file does not contain sensitive information.
- Record activity for the minimum time required to reproduce the issue.
- Whenever possible, use a test account.