alerting: reduce log level for notifiers

This commit is contained in:
bergquist 2017-12-13 19:12:05 +01:00
parent a8264fe316
commit 1240db31d3
3 changed files with 4 additions and 6 deletions

View File

@ -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) })
}

View File

@ -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,

View File

@ -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",