Skip to main content

Archiver Utility Command Reference

The archiver utility moog_archiver is a command line utility to archive and delete Situations, alerts and statistical data.

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

See Archive Situations and Alerts for more information.

Usage

moog_archiver [ --alert_filter <filter name> ] [ --update_batch_size <number of Situations/rows> ] [ --delimiter <delimiter> ] [ --export ] [ --file_age <number of days > ] [ --situation_filter ] [ --loose_alert_age <number of days> ] [ --logconsole ] [ --logfilename ] [ --include_statistics ] [ --statistics_age <number of days> ] [ --archive_path <path> ] [ --remove ] [ --situation_age <number of days> ] [ --loose_alerts_only ] [ --delay_time <number of milliseconds> ] [ --id_batch_size <number of rows> ]  [ --log_level WARN|INFO|DEBUG|TRACE ] --help

Argument

Input

Description

-a, --alert_filter

String <filter name>

Include all loose alerts that match the specified global alert filter. Does not apply to alerts within Situations that are being archived.

-b, --update_batch_size

Integer <number of Situations/rows>

Maximum number of alert/Situation rows to process at once during the export/deletion process. Increasing this value can speed up archiving but places more load on the database. Default is 1000.

-d, --delimiter

String <delimiter>

Delimiter to insert between values in the export file. Defaults to comma ",".

-e, --export

-

Export the archived data to a file.

-f, --file_age

Integer <number of days>

Delete files from the default directory /usr/local/archived that are older than the specified number of days.

-g, --log_level

String, one of WARN | INFO | DEBUG | TRACE

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

-i, --situation_filter

-

Include all Situations that match the specified global Situation filter.

-l, --loose_alert_age

Integer <number of days>

Export data related to loose alerts older than the specified number of days. Default is 395.

--logconsole

-

Write logs to the console only.

--logfilename

String <filename>

Specify a log filename.

-m, --include_statistics

-

Include the deletion of statistical data. Statistical data can only be deleted, not archived.

-n, --statistics_age

Integer <number of days>

Delete statistical data older than the specified number of days. Default is 395.

-p, --archive_path

String <path>

Destination path for the archived data. Default is /usr/local/archived.

-r, --remove

-

Delete data from the database.

-s, --situation_age

Integer <number of days>

Include Situation data (and alerts within Situations) older than the specified number of days. Default is 395.

-t, --loose_alerts_only

-

Archive loose alerts only. Cannot be used with -i or -s.

-x, --skip_search_engine

-

Skip the removal of entries from Opensearch.

-y, --delay_time

Integer <number of milliseconds>

Length of the delay between each batch operation. Can be used to slow the speed of archiving to reduce load on the database. Default is 0.

-z, --id_batch_size

Integer <number of rows>

Maximum number of rows to process per batch during the export/deletion process. Increasing this value can speed up archiving but places more load on the database. Default is 100.

-h, --help

-

Display the utility options and syntax.

Example

moog_archiver --export --remove --loose_alert_age 2 --situation_age 7 --logfilename 10_12_20_archiver.log

Logging to : /var/log/moogsoft/10_12_20_archiver.log