Industrial monitoring systems for power plants. Stream data from acoustic-based culvert rupture telltale aggregation boxes (CRTA-BOXes) to the dedicated ClickHouse-database.
Figure: crta-box usage concept |
To start streaming data from CRTA-BOX to ClickHouse-database execute
./crta-box stream <access-options>
where a full set of <access-options>
could be listed by executing
./crta-box stream --help
Warning
Although it is possible, streaming data from different CRTA-BOX servers to the same table in the ClickHouse-database is a bad practice. Use individual house_table
for each running crta-box stream
instance.
Optionally they could check access to CRTA-BOX server with
./crta-box box <access-options>
or ClickHouse-database with
./crta-box house <access-options>
where appropriate <access-options>
could be listed with --help
:
./crta-box box --help && ./crta-box house --help
Note
On Windows™ use .\crta-box.exe
command call.
Enforce logging to file by adding --log=<FILE>
option before command:
./crta-box --log=crta-box.log stream <access-options>
For operability of crta-box
command line utility, it is necessary not only to have valid access options but also the correct organization of the table structure in both communicating systems: a CRTA-BOX server and a ClickHouse)-database.
All modifications of the CRTA-BOXes should have a unified box_view
-view that combines data from acoustic sensors of all possible versions (revisions).
Note
For the newest versions of CRTA-BOX, box_view
is provided as an out-of-the-box feature by vendor.
The receiver of data from CRTA-BOX server is the database named BOXes
inside the (ClickHouse)-database, that contains individual tables mirroring the box_view
for each instance of CRTA-BOX server. An example of a ClickHouse-database deployment can be found in the deploy-example.py-script.
Note
Edit HOST_IP
value in deploy-example.py before run it to make ClickHouse-database reachable for the crta-box stream
process.
The structure of mirroring tables is provided in create-table.sql-script. You may run the next command to organize example mirroring table:
clickhouse-client --host $HOST_IP --port 29000 --user user --password pass --queries-file .share/ch/create-table.sql
Set the tag for the latest Release, i.e.:
tag=v0.1.0
Install the tagged version:
wget \
-O crta-box \
-o download.log \
--show-progress \
https://github.com/omega1x/crta-box/releases/download/$tag/crta-box-linux-amd64 \
\
&& cat download.log && rm download.log \
&& chmod +x crta-box
Then check installation:
./crta-box --version
With PowerShell set the tag for the latest Release, i.e.:
$tag = "v0.1.0"
Install the tagged version:
Invoke-WebRequest -Uri "https://github.com/omega1x/crta-box/releases/download/$tag/crta-box-windows-amd64" -OutFile 'crta-box.exe'
Then check installation:
./crta-box.exe --version
- v0.1.0 - significant changes and additions due to the need to transfer data from sensors of all previous revisions:
- data from CRTA-BOX server now is fetched from the unified
box_view
; - fetched data is streamed to individual tables created for each of CRTA-BOXes
- pinging with
crta-box box
andcrta-box house
now can additionally show last record timestamps performing the whole connectivity path check implicitly.
- data from CRTA-BOX server now is fetched from the unified
- v0.0.3 - unify sensor revision-gп3.3 data source for all current versions of CRTA-BOXes
- v0.0.2 - solve some lint issues.
- v0.0.1 - first working binary.