`amtool template render` improve default data (#3725)
Signed-off-by: Philipp Stehle <anderschwiedu@gmail.com>
This commit is contained in:
parent
efa801faf7
commit
81c3e3bae5
|
@ -22,6 +22,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/alecthomas/kingpin/v2"
|
"github.com/alecthomas/kingpin/v2"
|
||||||
|
"github.com/prometheus/common/model"
|
||||||
|
|
||||||
"github.com/prometheus/alertmanager/template"
|
"github.com/prometheus/alertmanager/template"
|
||||||
)
|
)
|
||||||
|
@ -31,7 +32,7 @@ var defaultData = template.Data{
|
||||||
Status: "alertstatus",
|
Status: "alertstatus",
|
||||||
Alerts: template.Alerts{
|
Alerts: template.Alerts{
|
||||||
template.Alert{
|
template.Alert{
|
||||||
Status: "alertstatus",
|
Status: string(model.AlertFiring),
|
||||||
Labels: template.KV{
|
Labels: template.KV{
|
||||||
"label1": "value1",
|
"label1": "value1",
|
||||||
"label2": "value2",
|
"label2": "value2",
|
||||||
|
@ -51,7 +52,7 @@ var defaultData = template.Data{
|
||||||
Fingerprint: "fingerprint1",
|
Fingerprint: "fingerprint1",
|
||||||
},
|
},
|
||||||
template.Alert{
|
template.Alert{
|
||||||
Status: "alertstatus",
|
Status: string(model.AlertResolved),
|
||||||
Labels: template.KV{
|
Labels: template.KV{
|
||||||
"foo": "bar",
|
"foo": "bar",
|
||||||
"baz": "qux",
|
"baz": "qux",
|
||||||
|
|
Loading…
Reference in New Issue