Settings for alert event migration from MongoDB to ClickHouse

The following table lists and describes the available options for migrating alert events from MongoDB to ClickHouse.

Possible settings for alert event migration from MongoDB to ClickHouse

Setting

Type

Description

Default value

--batch

int

Size of the batch of events that is fully migrated to the storage in the course of a single iteration of the migration process. Increasing this value speeds up the migration, but requires more RAM and disk space.

The value of this parameter must be determined based on the total number of alerts and available resources. To find out the total number of alerts, go to the Alerts section and click in the Filters drop-down list, click Clear filters. The total number of alerts is displayed in the Found field.

100

--cluster-id

string

ID of the cluster for storing alert events. You can get the cluster ID in the KUMA web interface in the Active services section. To do this, select the storage for the migration of alert events, right-click it to bring up the context menu, and select Copy ID.

--core-dir

string

The working directory of the KUMA Core with the service ID. The directory with certificates is located here.

--core-url

string

URL of the KUMA Core internal API. By default, the API is available on port 7210.

--mongo

string

URL of MongoDB to be connected to. Alert events that you want to migrate are stored here.

"mongodb://localhost:27017"

--time-limit

string

This option lets you migrate alert events created during the period from the specified timestamp (in RFC1123 format) up until the current moment. We recommend taking into account the Alert retention period, days because alert events older than the alert retention period are deleted from ClickHouse after migration.

Example:

You have alert events for the past year and a half, and you want to migrate only some alert events, for example, events for the last year. If you initiate the migration on August 18, 2025, and the Alert retention period, days is set to 365, then set the --time-limit option to August 19, 2024 as follows: --time-limit="Sun, 19 Aug 2024 00:01:00 UTC".

As a result, only alert events for the last 365 days are migrated. This speeds up migration and avoids moving unwanted events.

If you do not specify the --time-limit, all alert events are migrated to ClickHouse, but this may take more time, and alert events older than the specified alert retention period will be subsequently deleted from ClickHouse.

--timeout

int

ClickHouse storage connection timeout in seconds.

10

--wd

string

The working directory of the migrate command. Used for storing temporary and service files of the command. The process must have write permissions to this directory. Required option for an installation with KUMA Core in a Kubernetes cluster.

If this option is not specified, the working directory is the current working directory from which the command is run.

Page top