diff --git a/app/vmalert/main.go b/app/vmalert/main.go index d6f164215a..1e9e6f2eae 100644 --- a/app/vmalert/main.go +++ b/app/vmalert/main.go @@ -76,7 +76,7 @@ absolute path to all .tpl files in root. `Link to VMUI: -external.alert.source='vmui/#/?g0.expr={{.Expr|queryEscape}}'. `+ `If empty 'vmalert/alert?group_id={{.GroupID}}&alert_id={{.AlertID}}' is used.`) externalLabels = flagutil.NewArrayString("external.label", "Optional label in the form 'Name=value' to add to all generated recording rules and alerts. "+ - "Pass multiple -label flags in order to add multiple label sets.") + "In case of conflicts, original labels are kept with prefix `exported_`.") remoteReadIgnoreRestoreErrors = flag.Bool("remoteRead.ignoreRestoreErrors", true, "Whether to ignore errors from remote storage when restoring alerts state on startup. DEPRECATED - this flag has no effect and will be removed in the next releases.") diff --git a/docs/vmalert.md b/docs/vmalert.md index 5ec250eec4..2f289d31f9 100644 --- a/docs/vmalert.md +++ b/docs/vmalert.md @@ -273,6 +273,7 @@ expr: [ update_entries_limit: | default 0 ] # Labels to add or overwrite for each alert. +# In case of conflicts, original labels are kept with prefix `exported_`. labels: [ : ] @@ -394,6 +395,7 @@ record: expr: # Labels to add or overwrite before storing the result. +# In case of conflicts, original labels are kept with prefix `exported_`. labels: [ : ] @@ -1109,7 +1111,7 @@ The shortlist of configuration flags is the following: -external.alert.source string External Alert Source allows to override the Source link for alerts sent to AlertManager for cases where you want to build a custom link to Grafana, Prometheus or any other service. Supports templating - see https://docs.victoriametrics.com/vmalert/#templating . For example, link to Grafana: -external.alert.source='explore?orgId=1&left={"datasource":"VictoriaMetrics","queries":[{"expr":{{.Expr|jsonEscape|queryEscape}},"refId":"A"}],"range":{"from":"now-1h","to":"now"}}'. Link to VMUI: -external.alert.source='vmui/#/?g0.expr={{.Expr|queryEscape}}'. If empty 'vmalert/alert?group_id={{.GroupID}}&alert_id={{.AlertID}}' is used. -external.label array - Optional label in the form 'Name=value' to add to all generated recording rules and alerts. Pass multiple -label flags in order to add multiple label sets. + Optional label in the form 'Name=value' to add to all generated recording rules and alerts. In case of conflicts, original labels are kept with prefix `exported_`. Supports an array of values separated by comma or specified via multiple flags. Value can contain comma inside single-quoted or double-quoted string, {}, [] and () braces. -external.url string