From 81c3e3bae5e169bd053c4cc5b6170afb46081643 Mon Sep 17 00:00:00 2001 From: Philipp Stehle Date: Wed, 28 Feb 2024 12:10:25 +0100 Subject: [PATCH] `amtool template render` improve default data (#3725) Signed-off-by: Philipp Stehle --- cli/template_render.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cli/template_render.go b/cli/template_render.go index 7d984273..b02df7c0 100644 --- a/cli/template_render.go +++ b/cli/template_render.go @@ -22,6 +22,7 @@ import ( "time" "github.com/alecthomas/kingpin/v2" + "github.com/prometheus/common/model" "github.com/prometheus/alertmanager/template" ) @@ -31,7 +32,7 @@ var defaultData = template.Data{ Status: "alertstatus", Alerts: template.Alerts{ template.Alert{ - Status: "alertstatus", + Status: string(model.AlertFiring), Labels: template.KV{ "label1": "value1", "label2": "value2", @@ -51,7 +52,7 @@ var defaultData = template.Data{ Fingerprint: "fingerprint1", }, template.Alert{ - Status: "alertstatus", + Status: string(model.AlertResolved), Labels: template.KV{ "foo": "bar", "baz": "qux",