Vmalert
services.vmalert.enable
Whether to enable vmalert.
Type: boolean
Default
false
Example
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/vmalert.nix
services.vmalert.package
The victoriametrics package to use.
Type: package
Default
pkgs.victoriametrics
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/vmalert.nix
services.vmalert.rules
A list of the given alerting or recording rules against configured "datasource.url"
compatible with
Prometheus HTTP API for vmalert
to execute. Refer to
https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/app/vmalert/README.md#rules
for details on supported values.
Type: YAML value
Default
{ }
Example
{group = [{name = "TestGroup";rules = [{alert = "ExampleAlertAlwaysFiring";expr = '' sum by(job) (up == 1) '';}];}];}
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/vmalert.nix
services.vmalert.settings
vmalert
configuration, passed via command line flags. Refer to
https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/app/vmalert/README.md#configuration
for details on supported values.
Type: attribute set of (boolean or signed integer or path or string or list of (boolean or signed integer or path or string))
Default
{ }
Example
{"datasource.disableKeepAlive" = true;"datasource.showURL" = false;"datasource.url" = "http://localhost:8428";rule = ["http://<some-server-addr>/path/to/rules""dir/*.yaml"];}
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/vmalert.nix
services.vmalert.settings."datasource.url"
Datasource compatible with Prometheus HTTP API.
Type: non-empty string
Example
"http://localhost:8428"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/vmalert.nix
services.vmalert.settings."notifier.url"
Prometheus Alertmanager URL. List all Alertmanager URLs if it runs in the cluster mode to ensure high availability.
Type: list of non-empty string
Default
[ ]
Example
["http://127.0.0.1:9093"]
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/vmalert.nix
services.vmalert.settings.rule
Path to the files with alerting and/or recording rules.
::: {.note}
Consider using the {option}services.vmalert.rules
option as a convenient alternative for declaring rules
directly in the nix
language.
:::
Type: list of path
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/monitoring/vmalert.nix