Introduction #

This document provides guidelines for migrating to the latest version of VictoriaMetrics Anomaly Detection (vmanomaly). It covers the key changes, compatibility considerations, and best practices to ensure a smooth transition for stateful and stateless modes of operation.

Note

Upgrading to v1.27.0 or newer is recommended to benefit from simplified migration process.

Dry Run #

The --dryRun command-line argument allows Available from v1.27.0 to simulate the migration process without making any actual changes. This is useful for identifying potential issues and understanding the impact of the migration before applying it, e.g. dropping of existing state database or on-disk artifacts for all (or some) of the configured models and data. Starting from version v1.27.0 , the upgrade impact to any new version can be assessed by running vmanomaly with the --dryRun flag automatically. Downgrade check from v1.27.0 (or newer) to earlier versions than v1.25.3 requires setting env variable VMANOMALY_STATE_VERSION_OVERRIDE=<version>, e.g.:

      export VMANOMALY_STATE_VERSION_OVERRIDE=1.25.2
    

Compatibility Matrix #

This section outlines the compatibility of different vmanomaly versions with various components, including data, models, and configuration formats, for both stateful and stateless modes.

Note

Refer to the global changelog for detailed information on changes in each version. Use --dryRun Available from v1.27.0 mode to check for compatibility issues before performing the actual migration. See Dry Run section for more details.

Stateful Mode #

Note

Used if settings.restore_state is set to true. See argument details in the configuration documentation .

There are 2 types of compatibilitity to consider when migrating in stateful mode:

  • Global (in)compatibility: The new version can seamlessly read and utilize the existing state without any modifications or data loss. Or, in case of incompatibility, the existing state must be dropped completely to proceed with the migration.
  • Component (in)compatibility: The new version may introduce changes that affect specific components (e.g., specific models, data formats) but can still operate with the existing state with some adjustments or drop of incompatible on disk artifacts.
Group startGroup endCompatibilityNotes
v1.27.0Latest*Fully CompatibleJust a placeholder for new releases
v1.26.0v1.27.0Fully Compatible-
v1.25.3v1.26.0Partially Compatible*v1.25.3 introduced forecast_at argument for base univariate and Prophet models , however, itself remains backward-reversible from newer states like v1.26.2 , v1.27.0 . (All models except isolation_forest_multivariate class will be dropped)
v1.25.1v1.25.2Fully CompatibleIn v1.25.1 there was a change to vmanomaly.db metadata database format, so migrating from v1.24.0-v1.25.0 requires deletion of a state, see note above the table
v1.24.1v1.25.0Partially Compatible*In v1.25.0 there were changes to data dump layout and to online_quantile and isolation_forest_multivariate model states, so to migrate from v1.24.0-v1.24.1 it is recommended to drop the state
v1.24.0v1.24.1Fully Compatible-
v1.23.3 and earlierv1.24.0Fully Incompatible**As no state (prior to v1.24.0 ) existed, it was not saved (even if on-disk mode was used). Also, see config breaking changes list in stateless mode

Clearing State #

For releases v1.27.0 and newer, the migration process is automatically handled by vmanomaly when started with settings.restore_state: true, so no manual intervention is required to clear existing state if incompatible.

However, for releases v1.24.0 - v1.26.2 , to clear the existing state (if ended with settings.restore_state: true), please manually delete the existing state database and on-disk artifacts before starting the new version of `vmanomaly - either:

  • Manually delete the content of VMANOMALY_MODEL_DUMPS_DIR / VMANOMALY_DATA_DUMPS_DIR folders or
  • Set settings.restore_state: false in the config the first run of the new version, then stop vmanomaly, set back settings.restore_state: true, and restart vmanomaly.

Stateless Mode #

Note

Used if settings.restore_state is set to false. See argument details in the configuration documentation .

In stateless mode, the migration process is almost straightforward as there are no persistent states to manage. One may simply upgrade the vmanomaly service to the latest version and restart it, up to a slight change in the config .YAML files for backward-incompatible changes, see the list below.

Breaking Changes

  • v1.12.0 ARIMA model is removed from built-in models ; Action: replace ARIMA by Prophet or alternative seasonal models in model(s) section of your configuration files.

  • v1.9.0 The sampling_period parameter is now mandatory in VmReader. This change aims to clarify and standardize the frequency of input/output in vmanomaly, thereby reducing uncertainty and aligning with user expectations; Action: Add the sampling_period parameter to your VmReader configuration, e.g.:

          reader:
      # Other VmReader settings...
      sampling_period: 1m
      ...