Skip to content

Additional features#

The use of additional features is available both at the installation stage and after the installation of the System. If changes are made after the System is fully installed, the System must be completely restarted in order to apply them.

Using the HTTPS Protocol and Generating Encryption Keys#

LUNA CARS allows the use of an encrypted connection via an SSL certificate and the HTTPS protocol.

To do this, open the system interface using the port specified in the ANALYTICS_FRONTEND_SSL_PORT parameter.

By default, the value of this parameter is 443. Thus, the system is available at:

https://<IP_address>:443

The parameter value can be changed if necessary. In this case, the manually set port number must be used.

By default, the system includes a file containing the SSL private key.

To generate a new encryption key, follow these steps:

1․ Go to /extras directory:

cd cars-installer_v.*.*.*/extras

2․ Run the encryption key generation script:

./nginx_cert_gen.sh

Follow the prompts during the script execution.

Once completed, a new encryption key will be generated.

Grafana monitoring service#

The LUNA CARS package includes the Grafana service, which is not mandatory for installation and is used for visualization, monitoring and analysis of data from LUNA CARS subsystems.

The Grafana service works in conjunction with the following additional components:

  • cAdvisor — analyzes and provides data on resource usage and performance of running containers (see https://github.com/google/cadvisor for more details);
  • prometheus — writes metrics to the database (see https://prometheus.io/ for more details);
  • nodeexporter — measures various machine resources such as memory, disk and CPU load (see https://github.com/prometheus/node_exporter for more details).

Installation#

Before starting the installation, make sure that docker and docker-compose are installed, see section LUNA CARS installation and configuration.

Make sure that the ports used by the service are not occupied on the target server:

ss -ltn

Table 1. List of used ports

Port Service The port uses..
3000 grafana User(UI)
9090 prometheus grafana
9080 cadvisor prometheus
9100 nodeexporter prometheus

If there are occupied ports in the list, edit the «.env» file to specify the available ports. To do this, navigate to the working directory

cd cars-installer_v.*.*.*/extras/monitor

Open the «.env» file and edit the required ports

nano .env docker-compose.yml

To install the Grafana service, follow these steps:

1․ Open working directory

cd cars-installer_v.*.*.*/extras/monitor

1․ Run the start_all.sh script and wait for it to complete

./start_all.sh

Additional information on Grafana service configuration is described in the README.md file

Launch#

After complete installation, to enter the web interface, you need to open the following address in browser:

http://ip_adress:3000

The default port is specified, the port is set in the GRAFANA_PORT variable in the «.env» configuration file.

The system will prompt you to log in to your account (Figure 11).

Grafana login page
Figure 11. Grafana login page

To log in to Grafana, use the following data:

  • Login – admin;
  • Password – PASSWORD.

The default password is given, the password is set in the GRAFANA_PASSWORD variable in the «.env» configuration file.

To change the default password, open the «.env» file in your working directory and edit the GRAFANA_PASSWORD variable

nano .env docker-compose.yml

Working with Grafana#

Adding a dashboard#

To monitor data, you need to add a dashboard and configure it.

Let's use an existing dashboard specially prepared for LUNA CARS resource monitoring. To do this, import the json file of settings.

1․ In the Grafana interface, go to the "Import" section in the "Create" tab (Figure 12).

Import section
Figure 12. Import section

2․ Copy the contents of the settings file "/cars-installer_v.*.*.*/extras/monitor/dashboards/new.json" and paste it into the Import via panel json field on the "Import" page (Figure 13).

Importing the settings file new.json
Figure 13. Importing the settings file new.json

3․ Click the "Load" button at the bottom of the window. If necessary, change the name of the dashboard in the Name field and click the "Import" button (Figure 14).

Dashboard options
Figure 14. Dashboard options

The dashboard page opens (Figure 15).

General view of the dashboard
Figure 15. General view of the dashboard

For detailed information about Grafana administration, please refer to the documentation at: https://grafana.com/docs/grafana/latest/

Editing the dashboard#

Editing existing panels:

1․ To edit existing panels on the general dashboard, you must select the “Edit” item in the drop-down menu for the desired element (Figure 16).

Editing panels on the dashboard
Figure 16. Editing panels on the dashboard

2․ Change an existing or add a new query in the "Query" tab in PromQL format (Figure 17).

Query tab when editing an element
Figure 17. Query tab when editing an element

Adding new panels:

1․ To add new panels to the general dashboard, click the "Add panel" button at the top of the service (Figure 18).

2․ In the window that appears, click the "Add a new panel" button.

Adding panel to the dashboard
Figure 18. Adding panel to the dashboard

3․ Enter the query in the "Query" tab in PromQL format (Figure 19).

Query tab when adding a new panel
Figure 19. Query tab when adding a new panel

Query is formed using the Prometheus query language called PromQL. For detailed information please refer to the documentation on the page: https://prometheus.io/docs/prometheus/latest/querying/basics/.