Skip to content

Commit

Permalink
amtool template render improve default data
Browse files Browse the repository at this point in the history
Signed-off-by: Philipp Stehle <[email protected]>
  • Loading branch information
phil9909 committed Feb 15, 2024
1 parent 80b3cb0 commit 0db1bfa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cli/template_render.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ import (
"github.com/alecthomas/kingpin/v2"

"github.com/prometheus/alertmanager/template"
"github.com/prometheus/common/model"
)

var defaultData = template.Data{
Receiver: "receiver",
Status: "alertstatus",
Alerts: template.Alerts{
template.Alert{
Status: "alertstatus",
Status: string(model.AlertFiring),
Labels: template.KV{
"label1": "value1",
"label2": "value2",
Expand All @@ -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",
Expand Down

0 comments on commit 0db1bfa

Please sign in to comment.