Configuring Eocortex Union services🔗

The settings of Eocortex Union services can be found on the Settings page in the administrator personal area.

General Settings of Union

There is only one option in the Settings page on the Union Settings tab of the administrator personal area: Proxying for web client.

../_images/proxy-web.png

Note

Since systems can be connected to Eocortex Union using different protocols (HTTP and HTTPS), and browser protection does not allow HTTP connections to systems using untrusted certificates and HTTPS, the user may encounter issues when working in the Eocortex Union Web Client application.

Such problems can be resolved using one of the following methods:

Connecting all systems to Eocortex Union via HTTPS with trusted certificates and connecting using the web client via HTTPS. In this case, the option Proxying for web client must be disabled.

This is a safe option.

This solution does not put load on Eocortex Union.

Enabling the option Proxying for web client. The way the systems are connected to Eocortex Union does not matter.

This is a safe option.

This solution does put load on Eocortex Union.

Connecting all systems to Eocortex Union via HTTP and connecting using the web client via HTTP. It does not matter whether the option Proxying for web client is enabled or not, since it will not be used.

This option is not safe.

This solution does not put load on Eocortex Union.

SMTP server settings
../_images/smtp.png

Description of settings:

  • Gmail: Switch to using the Gmail SMTP server.

  • SMTP Server Address: an address through which notifications will be sent (e.g. smtp.gmail.com).

  • SMTP Server Port: SMTP port of the server (e.g., 587).

  • Use SSL when sending emails.

  • Email: an address of the email account on behalf of which notifications will be sent.

  • Username for authentication on the SMTP server.

  • Password a password for the email account on behalf of which notifications will be sent.

Eocortex System Monitoring

Eocortex System Monitoring is installed automatically together with Eocortex Union.

Note

Eocortex System Monitoring is available for Enterprise and Ultra licenses only.

After installing Eocortex Union the Eocortex System Monitoring service will be available at {address-union}: 8191.

Eocortex System Monitoring is available from the administrator personal area on the Eocortex System Monitoring page.

../_images/monitoring.png

Warning

In systems connected to Eocortex Union, Eocortex System Monitoring is automatically enabled with Eocortex Union settings.

Warning

If the system being connected already has its own settings for Eocortex System Monitoring, then, when connected to Eocortex Union, a prompt to change them to the settings common for all the connected systems will appear. In case of failure, the Eocortex System Monitoring service of this system will not be connected to Eocortex Union and will remain with its own settings.

Connection and configuration of Eocortex System Monitoring

Configuring Eocortex System Monitoring, as well as connecting the Eocortex System Monitoring service to Eocortex Union deployed on another server, is carried out in the administrator personal area, on the Settings page of the Eocortex System Monitoring settings tab.

../_images/monitoring-settings.png

Settings:

  • Monitoring service address (by default, address_union).

  • Port (by default, 8891).

  • Password (by default, blank).

  • List of recipients to whom all monitoring notifications will be sent (by default, the notifications are sent to the Eocortex Union, administrator, if their email is indicated).

  • Error notifications:

    • Send server errors

    • Send camera errors

    • Send general errors

Using own SMTP server

To use own SMTP server, in addition to changing the settings in the administrator personal area, it is possible to create or edit the file MailSettings.json in the folder /opt/eocortex-union/service/Setting folder of the Eocortex Union service.

Contents of the file:

{

    "MainSettings": {

        "ServerAddress": "SMTP server address", ← string

        "ServerPort": SMTP server port, ← numeral

        "SenderName": "name of sender", ← string

        "Email": "email for sending messages", ← string

        "UserName": "name of SMTP server user", ← string

        "Password": "password of SMTP server user", ← string

        "SslConnection": true ← boolean

    }

}

Example of using the Postfix SMTP server (with default settings):

{

    "MainSettings": {

        "ServerAddress": "127.0.0.1",

        "ServerPort": 25,

        "SenderName": "Eocortex Union",

        "Email": "noreply@union.eocortex.com",

        "UserName": "",

        "Password": ""

        "SslConnection": false

    }

}
{

    "MainSettings": {

        "ServerAddress": "smtp.google.com",

        "ServerPort": 587,

        "SenderName": "Eocortex Union",

        "Email": "union.eocortex@gmail.com",

        "UserName": "union.eocortex@gmail.com",

        "Password": "qwerty123"

        "SslConnection": true

    }

}

Note

The fields Email and UserName may or may not match, depending on the settings of the SMTP server.

Eocortex Union network settings

By default, Eocortex Union service has a number of following restrictions on interaction with other services connected to Eocortex Union, including Eocortex servers and Eocortex System Monitoring service:

  • maximum request execution time (RequestTimeoutInSecodns): 3 seconds

  • number of repeated attempts to execute requests (MaxRetryCount): 3

  • waiting time between repeated execution of requests (RetryTimeoutInSeconds): 1 second.

To change these settings, it is required to modify the value of the parameter HttpConnectionSettings in the file appsettings.json.

{

    ...

    "HttpConnectionSettings": {

        "MaxRetryCount": 3, ← numeral

        "RetryTimeoutInSeconds": 1, ← numeral

        "RequestTimeoutInSeconds": 3, ← numeral

    }

    ...

}

Note

Should the requests to the server connected to Eocortex Union take longer than the specified time, Eocortex Union, based on the current settings, will consider the system to be unavailable. To avoid this, it is required to modify the parameters; first of all, RequestTimeoutInSeconds, increasing the timeout of the response from the connected system.

Changing Eocortex Union port

By default, Eocortex Union uses the following ports:

  • 80: http (nginx);

  • 443: https (nginx);

  • 5000: http (eocortex-union).

It is possible to change these ports

To change ports 80 and 443, it is required to do the following:

  1. Open the service configuration file in nginx: /etc/nginx/sites-available/eocortex-union.conf

  2. Change the ports in the following strings:

    listen 80;
    
    listen 443 ssl;
    
  3. Restart nginx:

    systemctl restart nginx
    

To change the port 5000, it is required to do the following:

  1. Open the file of the service /etc/systemd/system/eocortex-union.service

  2. Add the flag --urls=http://0.0.0.0: 5001/, where 5001 is the new port, to the key ExecStart= and to its value. The resulting string should look as follows:

    ExecStart=/usr/bin/dotnet /opt/eocortex-
    
    union/service/UnionService.dll --
    
    --urls=http://0.0.0.0:5001/
    
  3. Restart the service systemctl daemon

    systemctl daemon-reload
    
  4. Restart the service eocortex-union

    systemctl restart eocortex-union
    
  5. Open the configuration file of the service in nginx/etc/nginx/sites-available/eocortex-union.conf

  6. Specify the desired port in the block location /api in the string proxy_pass http://localhost:5000; The resulting string should look as follows:

    location /api {
    
    proxy_pass http://localhost:5001;
    
  7. Restart nginx

    systemctl restart nginx
    
PostgreSQL password change

By default, when installing Eocortex Union for PostgreSQL, a password that can be viewed in the configuration file of the eocortex-union service /opt/eocortex-union/service/appsettings.json generated. The password is located in the Password= parameter in the following string:

"ConnectionStrings": {

    "DbConnection":

    "Host=127.0.0.1;Port=5432;Database=union_db;Username=union_user;Password=80b8eb0a-cc2e-499c-a500-d695eb3a0b6b;"

}

To change the password, it is required to do the following:

  1. Enter the console as the user postgres:

    cd /
    
    su postgres
    
  2. Change the password, specifying a new password instead of newpassword

    psql -c "ALTER USER union_user WITH PASSWORD 'newpassword';"
    
  3. Change the password in the configuration file of the service /opt/eocortex-union/service/appsettings.json. Specify a new password in the value Password=:

    "ConnectionStrings": {
    
        "DbConnection":
    
        "Host=127.0.0.1;Port=5432;Database=union_db;Username=union_user;Password=newpassword;"
    
    }
    
  4. Restart the service eocortex-union:

    systemctl restart eocortex-union
    
Installing own SSL certificate

By default, a self-signed SSL certificate is generated when installing Eocortex Union. To replace it with own SSL certificate, it is required to proceed as follows:

  1. Open the service configuration file in nginx /etc/nginx/sites-available/eocortex-union.conf;

  2. Find the following lines and change the paths to the files of own SSL certificates and a private key:

    ssl_certificate /etc/ssl/certs/eocortex-union.cert.pem;
    
    ssl_certificate_key /etc/ssl/private/eocortex-union.key.pem;
    
  3. Restart nginx:

    systemctl restart nginx
    

Note

The certificate and the key must be changed in two places, for configuring the eocortex-union SSL service and for configuring the monitoring server located on port 8191 by default.

Domain name change

To change the address or domain of the server that were entered during installation, it is required to do the following:

  1. Open the service configuration file /opt/eocortex-union/service/appsettings.json;

  2. Find the key HostUrl and modify its value:

    "HostUrl": "https://union.com"
    
  3. Restart the service eocortex-union:

    systemctl restart eocortex-union