Merge pull request #1945 from kfdm/webhook-fingerprint
Add Fingerprint to template data
This commit is contained in:
commit
e7275537ff
|
@ -245,6 +245,7 @@ type Alert struct {
|
|||
StartsAt time.Time `json:"startsAt"`
|
||||
EndsAt time.Time `json:"endsAt"`
|
||||
GeneratorURL string `json:"generatorURL"`
|
||||
Fingerprint string `json:"fingerprint"`
|
||||
}
|
||||
|
||||
// Alerts is a list of Alert objects.
|
||||
|
@ -294,6 +295,7 @@ func (t *Template) Data(recv string, groupLabels model.LabelSet, alerts ...*type
|
|||
StartsAt: a.StartsAt,
|
||||
EndsAt: a.EndsAt,
|
||||
GeneratorURL: a.GeneratorURL,
|
||||
Fingerprint: a.Fingerprint().String(),
|
||||
}
|
||||
for k, v := range a.Labels {
|
||||
alert.Labels[string(k)] = string(v)
|
||||
|
|
Loading…
Reference in New Issue