mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-16 17:21:04 +01:00
d0d0be9031
Function `ValidateTemplates`, used on the vmalert startup, is supposed to check whether used templates and functions in loaded rules are correct. The function was parsing and executing loaded templates. However, rules may contain functions which can't be executed without values (label values or query results), like `slice`. Because of this, validation for completely valid expression `{{ slice $labels.job 9 }}` will fail since `$labels.job` is empty during validation. This PR updates `ValidateTemplates` function to only parse templates without executing them. https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2514 Signed-off-by: hagen1778 <roman@victoriametrics.com> |
||
---|---|---|
.. | ||
vmagent | ||
vmalert | ||
vmauth | ||
vmbackup | ||
vmbackupmanager | ||
vmctl | ||
vmgateway | ||
vminsert | ||
vmrestore | ||
vmselect | ||
vmstorage | ||
vmui |