mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-02-09 15:27:11 +00:00
![Hui Wang](/assets/img/avatar_default.png)
Previous commit b09272ccac
added regression, which could lead to the template
global state overwrites.
The issue related to the mechanism how `vmalert` inherits templates. It has global templates, that could be changed via `rule.templates` flag. And local templates defined per labels/annotations for rules and groups.
During labels/annotations templating state could be changed via `define` syntax.
This commit restores previous behavior with `Clone` call for templates before templating labels/annotations.
Affected releases:
- 1.106.1
- v1.102.7
- v1.97.12
Related issue:
https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6894
19 lines
450 B
Text
19 lines
450 B
Text
groups:
|
|
- name: group
|
|
rules:
|
|
- alert: InvalidAnnotations
|
|
for: 5m
|
|
expr: vm_rows > 0
|
|
labels:
|
|
label: bar
|
|
annotations:
|
|
summary: "{{ }}"
|
|
description: "{{$labels}}"
|
|
- alert: UnkownAnnotationsFunction
|
|
for: 5m
|
|
expr: vm_rows > 0
|
|
labels:
|
|
label: bar
|
|
annotations:
|
|
summary: "{{ value|query }}"
|
|
description: "{{$labels}}"
|