vmalert-tool
Contact us about Snaps and IoT ›
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.
Details for vmalert-tool
Package name
- 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
External link warning
You are about to open
Do you wish to proceed?
Report a Snap Store violation
Report vmalert-tool for a Snap Store violation
Snap Store Violation Report submitted successfully
Thank you for your report. Information you provided will help us investigate further.
Error submitting report
There was an error while sending your report. Please try again later.
Share this snap
Generate an embeddable card to be shared on external websites.
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/).
| Revision | Channel | Version | Build | Commit |
|---|
The build and commit information is derived from build infrastructure records.
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.