MyNixOS website logo
option

services.vmalert.instances.<name>.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.

Declarations
Type
YAML 1.1 value
Default
{ }
Example
{
  group = [
    {
      name = "TestGroup";
      rules = [
        {
          alert = "ExampleAlertAlwaysFiring";
          expr = ''
            sum by(job)
            (up == 1)
          '';
        }
      ];
    }
  ];
}