TAKZ MS – System Documentation

TAKZ MS is a platform designed for monitoring, visualization and integration of devices, automation systems, IT infrastructure and applications. The system has been designed as a modular solution that can work with different communication protocols, databases and additional components responsible for executing tasks on monitored computers. The platform can be deployed in Windows and Linux environments. Individual system components can run on the same computer or be distributed across multiple machines depending on the requirements of the installation.

TAKZ MS – System Documentation

System Architecture

TAKZ MS consists of two main applications and one additional component designed for computer monitoring. TAKZ MS provides the user interface, web application and communication with the database. The interface is delivered through the Flask web server and can be accessed using a web browser. TAKZ Worker is responsible for communication with devices and data sources. It performs tasks such as periodic datapoint polling and communication using the configured runtimes. TAKZ Agent is an additional application designed to run on monitored computers. It can collect information that cannot always be obtained through standard communication protocols and can also execute predefined tasks on the monitored system.

TAKZ MS and the Web Interface

The main TAKZ MS application provides its user interface through a Flask web server. This web-based architecture allows operators to access the system from a web browser without installing a dedicated operator application. TAKZ MS is also responsible for system configuration and management of devices, datapoints, dashboards, alarms, users and other platform components.

TAKZ Worker

TAKZ Worker is a background process responsible for communication tasks and data processing. The Worker uses runtimes responsible for individual data sources. Depending on the configuration, these may include Modbus, SNMP, MQTT, OPC, HTTP, databases, files and other sources supported by the platform. Separating the Worker from the web application allows communication tasks to run independently of the user interface and reduces the impact of longer-running communication operations on the web application.

TAKZ Agent

TAKZ Agent is an additional component designed to run on monitored computers and servers. The Agent can collect information about the operating system, processes, services, files and other elements of the computer. It can also execute predefined administrative tasks. The Agent is particularly useful when a monitored computer does not expose the required information through standard protocols such as SNMP, Modbus or HTTP.

Database

TAKZ MS uses a database to store system configuration and data. Depending on the deployment, the platform can use either SQLite or MySQL. SQLite can be used for simple installations, testing environments and deployments where a separate database server is not required. MySQL is intended primarily for installations that use an external database server or where the system is deployed in a more extensive environment.

System Configuration

The basic TAKZ MS configuration is stored in the config.json file. The file contains information such as the selected database mode, locations of additional libraries, HTTPS configuration, license file and logging level. An example configuration is shown below.

Example config.json

json
{
  "database": {
    "mode": "mysql"
  },
  "sqlite": {
    "path": "rel:storage/takz_ms.db"
  },
  "mysql": {
    "host": "127.0.0.1",
    "port": 3306,
    "database": "takz_ms",
    "username": "root",
    "password": ""
  },
  "paths": {
    "ffmpeg": "rel:ffmpeg/bin/ffmpeg.exe",
    "oracle_client": "rel:instantclient_18_5"
  },
  "https_enabled": true,
  "ssl_cert": "ssl/server.crt",
  "ssl_key": "ssl/server.key",
  "license_file": "rel:license.lic",
  "logging_level": "INFO"
}

Relative and Absolute Paths

TAKZ MS supports both relative and absolute paths. A path prefixed with rel: is treated as a relative path based on the location of the application or executable file. For example, rel:storage/takz_ms.db points to the storage/takz_ms.db file relative to the application directory. Absolute paths can also be specified when a resource is located outside the application directory.

HTTPS Configuration

TAKZ MS can operate using an encrypted HTTPS connection. HTTPS support is controlled by the https_enabled parameter in config.json. The ssl_cert and ssl_key parameters specify the certificate and private key used by the server. Example configuration:

HTTPS

json
"https_enabled": true,
"ssl_cert": "ssl/server.crt",
"ssl_key": "ssl/server.key"

Running as a System Service

For production deployments, TAKZ MS and TAKZ Worker can be configured to run as system services. This allows the applications to start automatically with the operating system and enables the operating system or service manager to restart a process if it stops unexpectedly. The exact procedure depends on the operating system.

Windows – System Service

On Windows, TAKZ MS and TAKZ Worker can be registered as Windows services. One simple option is NSSM (Non-Sucking Service Manager), which allows applications that are not native Windows services to be managed as services. A separate service can be created for each application. For example: TAKZ_MS – web application and system interface TAKZ_Worker – background communication and processing service When configuring a service, specify the application executable and its working directory. The working directory is particularly important when relative paths are used in config.json.

Example NSSM Configuration

text
nssm install TAKZ_MS

Application:
Path: C:\TAKZ_MS\TAKZ_MS.exe
Startup directory: C:\TAKZ_MS

A separate service can be created for the Worker:

nssm install TAKZ_Worker

Application:
Path: C:\TAKZ_MS\TAKZ_Worker.exe
Startup directory: C:\TAKZ_MS

Linux – System Service

On Linux, TAKZ MS and TAKZ Worker can be configured as systemd services. A separate service can be created for the web application and another for the Worker. This allows both processes to be started, stopped, monitored and restarted independently by the operating system.

Example systemd Service for TAKZ Worker

text
[Unit]
Description=TAKZ Worker
After=network.target

[Service]
WorkingDirectory=/opt/takz-ms
ExecStart=/opt/takz-ms/TAKZ_Worker
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

Starting the Components

In a typical installation, TAKZ MS and TAKZ Worker use the same configuration environment and database. Before starting the Worker, make sure that the database and required configuration files are available. When TAKZ Agent is used, the Agent can be installed independently on monitored computers. Its connection to the central platform depends on the configured communication mechanism.

Further Configuration

After the runtime environment has been prepared, the remaining system components can be configured through the TAKZ MS interface. This includes devices, datapoints, runtimes, dashboards, scenes, states, thresholds, triggers and users. The following sections of the documentation describe the configuration of individual features and the integration of TAKZ MS with specific data sources.