Browse Source

alerting: reduce log level for notifiers

bergquist 8 years ago
parent
commit
1240db31d3

+ 1 - 1
pkg/services/alerting/notifier.go

@@ -65,7 +65,7 @@ func (n *notificationService) sendNotifications(context *EvalContext, notifiers
 
 	for _, notifier := range notifiers {
 		not := notifier //avoid updating scope variable in go routine
-		n.log.Info("Sending notification", "type", not.GetType(), "id", not.GetNotifierId(), "isDefault", not.GetIsDefault())
+		n.log.Debug("Sending notification", "type", not.GetType(), "id", not.GetNotifierId(), "isDefault", not.GetIsDefault())
 		metrics.M_Alerting_Notification_Sent.WithLabelValues(not.GetType()).Inc()
 		g.Go(func() error { return not.Notify(context) })
 	}

+ 1 - 1
pkg/services/alerting/notifiers/base.go

@@ -15,7 +15,7 @@ type NotifierBase struct {
 }
 
 func NewNotifierBase(id int64, isDefault bool, name, notifierType string, model *simplejson.Json) NotifierBase {
-	uploadImage := model.Get("uploadImage").MustBool(true)
+	uploadImage := model.Get("uploadImage").MustBool(false)
 
 	return NotifierBase{
 		Id:          id,

+ 2 - 4
pkg/services/alerting/notifiers/dingding_test.go

@@ -25,10 +25,8 @@ func TestDingDingNotifier(t *testing.T) {
 
 		})
 		Convey("settings should trigger incident", func() {
-			json := `
-			{
-  "url": "https://www.google.com"
-			}`
+			json := `{ "url": "https://www.google.com" }`
+
 			settingsJSON, _ := simplejson.NewJson([]byte(json))
 			model := &m.AlertNotification{
 				Name:     "dingding_testing",