gnat overview
Synopsis
All GNAT command line tools, aka client tools, share a common interface with required and optional arguments.
Description
The GNAT client tools are primarily designed to run inside Docker containers. However, they can be used in a variety of environments, including interactive shells, scripts, and automated systems. The command line interface is designed to be intuitive and easy to use, with a consistent syntax across all tools, enabling flexiblility and customization through the use of Docker environment variables and configuration files. The goal is to make it easy to integrate the tools into existing workflows and systems.
Required Arguments
The following arguments are required for all GNAT tools and must be specified for the tool to function properly.
--input <input directory>
The --input
argument specifies the directory with input file(s) to be processed by the GNAT tool.
With the exception of gnat_import
, all input files are in Apache Parquet format containing columns with the standard data schema.
If running within a Docker container, this directory should be accessible from the Docker container running the GNAT tool.
--output <output directory>
The --output
argument specifies the output file where the results of the GNAT tool will be saved.
If running within a Docker container, this directory should be accessible from the Docker container running the GNAT tool.
The output file argument is required for all GNAT tools and must be specified for the tool to function properly.
Optional Arguments
--pass <pass through directory>
The --pass
argument specifies a directory where input files are pass through
without modification.
If the --pass
argument is not specified, the input files are deleted after processing.
If running within a Docker container, this directory should be accessible from the Docker container running the GNAT tool.
--interval <second | minute | hour | day>
The --interval
argument specifies the polling interval for the GNAT tool.
The polling interval determines how often the GNAT tool will check for new input files in the input directory.
The polling interval can be specified using the key word once
, second
, minute
, hour
, or day
(e.g., --interval minute
for every minute).
The once
keyword indicates that the GNAT tool should process the input files once and then exit.
The second
, minute
, hour
, and day
keywords indicate that the GNAT tool should continue to check for new input files at the specified interval.
This argument is optional and if omitted defaults to second
.
--options <key=value[;key=value...]>
The --options
argument specifies key/value pairs.
The key/value pairs are used to configure the GNAT tool and can be used to customize the behavior of the tool.
The key/value pairs are separated by semicolons and can be specified in any order.
Each GNAT tool has its own set of valid key/value pairs that can be used to configure the tool.
Example
1) Import IPFIX files from /var/spool/ipfix and output to /var/spool/import polled every second
$ gnat_import --input /var/spool/ipfix --output /var/spool/import --interval second
2) Merge Parquet files from /var/spool/import every minute and placing them in the /var/spool/minute directory
$ gnat_import --input /var/spool/import --output /var/spool/minute --interval minute