CLI ColdDB tool
Note that with Airlock Gateway 8.0 the CLI ColdDB tool has become widely obsolete due to the improved, UI-based Anomaly Shield model management page. Basic training and management tasks (i.e. export/import of data) are covered by the UI functionalities.
The airlock-ml-colddb-tool
is a CLI application that allows administrators to perform a set of actions on ColdDB machine learning data collections. This includes data check, merge, move, copy and delete actions. It can also be used to shrink the ColdDB itself.
Path to the tool:
/opt/airlock/ml-service/bin/airlock-ml-colddb-tool
Use ./airlock-ml-colddb-tool --help
for detailed tool description.
Copy command
The copy
command can be used to merge ColdDBs, e.g. to consolidate data collections between Airlock Gateway instances. Adjust the code of the following example before use:
Example explained:
- In our example, all session metrics from
failovernode-cold.db
are copied and merged into thecold.db
database.
The copy
command can also be used to restore archived session metrics data. Adjust the code of the following example before use:
Example explained:
- In our example, all session metrics from the application named
ebanking
from2020-10-17
to2020-11-01
are restored from thearchive-cold.db
into thecold.db
database.
Summary command
Before machine learning models can be trained for an application, sufficient session metrics data must be collected. To check the content of the ColdDB, use the summary
command. Adjust the code of the following example before use:
Example explained:
Application
– the name of the application for which session metrics have been collected.first
– the timestamp of the first sample.last
– the timestamp of the last sample.SessionCount
– the number of collected session metrics.
Note that only sessions with a minimum number of requests are collected. Very short sessions, e.g. with only a single request, are not collected because they have little to no value as training data.
Move command
The move
command can be used to archive session metrics. Adjust the code of the following example before use:
Example explained:
- In our example, all session metrics from the application named
ebanking
from2020-10-17
to2020-11-01
are moved into a ColdDB namedarchive-cold.db
- To restore the data from the
archive-cold.db
, the copy command can be used.
Delete command
The delete
command can be used to remove session metrics from ColdDB. Note that deleting session metrics is permanent. Adjust the code of the following example before use:
Example explained:
- In our example, all session metrics from the application named
ebanking
from2020-10-17
to2020-11-01
are removed from the ColdDB by thedelete
command. - After deletion, the
vacuum
command can be used to reduce the size of the ColdDB.
Vacuum command
The vacuum
command can be used to shrink and repackage the ColdDB. This command is usually used to free up space after the deletion of session metrics from the ColdDB.