feat(alerting): add alert message to slack integration

This commit is contained in:
bergquist
2016-08-12 10:12:04 +02:00
parent e7613b8bc0
commit 16e75a3036
12 changed files with 30 additions and 30 deletions
+2 -2
View File
@@ -36,7 +36,7 @@ type Alert struct {
DashboardId int64
PanelId int64
Name string
Description string
Message string
Severity AlertSeverityType
State AlertStateType
Handler int64
@@ -63,7 +63,7 @@ func (alert *Alert) ShouldUpdateState(newState AlertStateType) bool {
func (this *Alert) ContainsUpdates(other *Alert) bool {
result := false
result = result || this.Name != other.Name
result = result || this.Description != other.Description
result = result || this.Message != other.Message
if this.Settings != nil && other.Settings != nil {
json1, err1 := this.Settings.Encode()
+6 -6
View File
@@ -14,15 +14,15 @@ func TestAlertingModelTest(t *testing.T) {
json2, _ := simplejson.NewJson([]byte(`{ "field": "value" }`))
rule1 := &Alert{
Settings: json1,
Name: "Namn",
Description: "Description",
Settings: json1,
Name: "Namn",
Message: "Message",
}
rule2 := &Alert{
Settings: json2,
Name: "Namn",
Description: "Description",
Settings: json2,
Name: "Namn",
Message: "Message",
}
Convey("Testing AlertRule equals", func() {