Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
1240db31
Commit
1240db31
authored
Dec 13, 2017
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
alerting: reduce log level for notifiers
parent
a8264fe3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
6 deletions
+4
-6
pkg/services/alerting/notifier.go
+1
-1
pkg/services/alerting/notifiers/base.go
+1
-1
pkg/services/alerting/notifiers/dingding_test.go
+2
-4
No files found.
pkg/services/alerting/notifier.go
View file @
1240db31
...
...
@@ -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
)
})
}
...
...
pkg/services/alerting/notifiers/base.go
View file @
1240db31
...
...
@@ -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
(
tru
e
)
uploadImage
:=
model
.
Get
(
"uploadImage"
)
.
MustBool
(
fals
e
)
return
NotifierBase
{
Id
:
id
,
...
...
pkg/services/alerting/notifiers/dingding_test.go
View file @
1240db31
...
...
@@ -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"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment