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.
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:
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/).
Thank you for your report. Information you provided will help us investigate further.
There was an error while sending your report. Please try again later.
You are about to open
Do you wish to proceed?
Generate an embeddable card to be shared on external websites.
Choose your Linux distribution to get detailed installation instructions. If yours is not shown, get more details on the installing snapd documentation.