Install latest/stable of vmalert-tool

Ubuntu 16.04 or later?

Make sure snap support is enabled in your Desktop store.


Install using the command line

sudo snap install vmalert-tool

Don't have snapd? Get set up for snaps.

Channel Version Published

VMAlert command-line tool

vmalert-tool

https://docs.victoriametrics.com/vmalert-tool/

Unit testing for rules

https://docs.victoriametrics.com/vmalert-tool/#unit-testing-for-rules

You can use vmalert-tool to run unit tests for alerting and recording rules. It will perform the following actions:

  • sets up an isolated VictoriaMetrics instance;
  • simulates the periodic ingestion of time series;
  • queries the ingested data for recording and alerting rules evaluation like https://docs.victoriametrics.com/vmalert/;
  • checks whether the firing alerts or resulting recording rules match the expected results.

See how to run vmalert-tool for unit test below:

Run vmalert-tool with one or multiple test files via --files cmd-line flag

./vmalert-tool unittest --files test1.yaml --files test2.yaml

vmalert-tool unittest is compatible with Prometheus config format for tests (https://prometheus.io/docs/prometheus/latest/configuration/unit_testing_rules/#test-file-format except) promql_expr_test field. Use metricsql_expr_test field name instead. The name is different because vmalert-tool validates and executes MetricsQL (https://docs.victoriametrics.com/metricsql/) expressions, which aren’t always backward compatible with PromQL (https://prometheus.io/docs/prometheus/latest/querying/basics/).

Details for vmalert-tool

License
  • Apache-2.0

Last updated
  • 9 December 2024 - latest/stable
  • 9 December 2024 - latest/edge

Websites

Contact

Source code

Report a bug

Report a Snap Store violation

Share this snap

Generate an embeddable card to be shared on external websites.


Install vmalert-tool on your Linux distribution

Choose your Linux distribution to get detailed installation instructions. If yours is not shown, get more details on the installing snapd documentation.


Where people are using vmalert-tool

Users by distribution (log)

Ubuntu 24.04