Moogsoft Docs

Historic Data Utility Command Reference

The Historic Data utility moog_db_split_enabler is a command line utility to:

  • Enable and disable the retention of historic data in a separate database.

  • Configure the retention of historic data.

The utility is located at $MOOGSOFT_HOME/bin/utils.

See Configure Historic Data Retention for more information.

Usage
moog_db_split_enabler [ --alerts_batch_size <number of alerts> ] [ --disable ] [ --enable ] [ --grace_period <number of seconds> ] [ --loglevel INFO|WARN|DEBUG|TRACE ] [ --database_name <name> ] [ --password <password> ] [ --run_at <time> ] [ --sigs_batch_size <number of situations> ] [ --user <username> ] --help

Argument

Input

Description

-a, --alerts_batch_size

Integer <number of alerts>

Number of alerts per batch when moving data to the historic database. Increasing this value can speed up the process but places more load on the database. Default is 2000.

-d, --disable

-

Disable the retention of historic data in a separate database. The data in the old historic database is not moved to the active database and becomes effectively inaccessible.

-e, --enable

-

Enable the retention of historic data in a separate database.

-g, --grace_period

Integer <number of seconds>

Period of time since the last update after which closed alerts and Situations are eligible to be included in historic data retention. Default is 3600 (one hour).

-l, --loglevel

String, one of INFO | WARN | DEBUG | TRACE

Log level controlling the amount of information logged by the utility. Default is INFO.

-n, --database_name

String <database name>

The name of the historic database. Default is historic_moogdb.

-p, --password

String <password>

Password for the MySQL user specified in the --user argument.

-r, --run_at

Integer <number of seconds>

The time at which the utility runs and moves any eligible data to the historic database, in the format HH:MM. For example, 03:00 is 3am. Default is 01:00.

-s, --sigs_batch_size

Integer <number of Situations>

Number of Situations to include in each batch when moving data to the historic database. Default is 500.

-u, --user

String <username>

MySQL user to run the utility. The user must have schema creation privileges. Default is root.

-h, --help

-

Display the utility options and syntax.

Example
moog_db_split_enabler --enable --alerts_batch_size 1000 --loglevel INFO --run_at 02:00 --sigs_batch_size 250

+-------------- DB split configurations -----------------------------+
  Grace period:          [3600]
  Alerts batch size:     [1000]
  Situations batch size: [250]
  Run at:                [02:00]
  Historic database:     [historic_moogdb]
+-------------- DB split enabled ------------------------------------+