Skip to content

Industrial monitoring systems for power plants. Stream data from acoustic-based culvert rupture telltale aggregation boxes.

License

Notifications You must be signed in to change notification settings

omega1x/crta-box

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crta-box

License: MIT

Industrial monitoring systems for power plants. Stream data from acoustic-based culvert rupture telltale aggregation boxes (CRTA-BOXes) to the dedicated ClickHouse-database.

Usage

Concept

Usage Scheme
Figure: crta-box usage concept

Basics

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.

Logging

Enforce logging to file by adding --log=<FILE> option before command:

./crta-box --log=crta-box.log stream <access-options>

Installation

Prerequisites

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.

View box_view

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.

Database BOXes

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 

Installation process

Linux (amd64)

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

Windows (amd64)

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

Change Log

  • 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 and crta-box house now can additionally show last record timestamps performing the whole connectivity path check implicitly.
  • 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.

About

Industrial monitoring systems for power plants. Stream data from acoustic-based culvert rupture telltale aggregation boxes.

Topics

Resources

License

Stars

Watchers

Forks