stmik
- Industrial web-socket connector to BTSK-telemetry service.
Connect to BTSK-telemetry service through web-socket interface and store received telemetry data in ClickHouse backend database.
Somehow install Java 1.11+ Runtime so that
java --version
produces the output in the nature of
openjdk 16.0.1 2021-04-20
OpenJDK Runtime Environment (build 16.0.1+9-Ubuntu-120.04)
OpenJDK 64-Bit Server VM (build 16.0.1+9-Ubuntu-120.04, mixed mode, sharing)
Download the latest release of the stmik
fat-jar:
wget https://github.com/omega1x/stmik/releases/download/0.9.0/stmik.jar
NOTE! In order to connect to BTSK-telemetry service you must have appropriate credentials: a PKCS 12 file and password.
Get usage synopsis:
java -jar ./stmik.jar --help
Start communicating with BTSK-telemetry service with local ClickHouse backend:
java -jar ./stmik.jar --key-file=~/key.p12 --password=keypass
where ~/key.p12
is a PKCS 12 file and keypass
is a password both provided to you by BTSK-telemetry service administration.
Local ClickHouse backend should provide the next connection details:
Host : 127.0.0.1
Port : 9000
Database: default
User : default
Password: default
It is equivalent to usage with the next jdbc-connection string:
java -jar ./target/stmik.jar --key-file=~/key.p12 --password=keypass "jdbc:clickhouse://127.0.0.1:9000/default?user=default&password=default"
You may specify another connection details by providing your own jdbc-connection string.
Monitor stmik
status (Linux/WSL):
tail -f stmik.log
Press Ctrl+C in terminal to invoke System.exit()
method.
First, download the standalone dependency - libwebsocket-1.1.jar - from release page:
wget -P /tmp https://github.com/omega1x/stmik/releases/download/0.1.1/libwebsocket-1.1.jar
Then install libwebsocket-1.1.jar to local maven-repository:
mvn install:install-file -Dfile=/tmp/libwebsocket-1.1.jar -DgroupId=fr.bmartel -DartifactId=libwebsocket -Dversion=1.1 -Dpackaging=jar -DgeneratePom=true
Clone the repository:
git clone https://github.com/omega1x/stmik.git
Build fat-jar:
cd ./stmik
mvn package -f pom.xml