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
902314d3
Commit
902314d3
authored
Aug 18, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'alerting' of github.com:grafana/grafana into alerting
parents
75a6c2b6
6d080904
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
27 deletions
+2
-27
examples/alerting-dashboard.json
+0
-19
pkg/services/alerting/engine.go
+1
-6
pkg/services/alerting/result_handler.go
+1
-2
No files found.
examples/alerting-dashboard.json
View file @
902314d3
...
...
@@ -74,7 +74,6 @@
"notifications"
:
[],
"severity"
:
"critical"
},
"alerting"
:
{},
"aliasColors"
:
{},
"bars"
:
false
,
"datasource"
:
"${DS_GRAPHITE}"
,
...
...
@@ -185,7 +184,6 @@
"notifications"
:
[],
"severity"
:
"critical"
},
"alerting"
:
{},
"aliasColors"
:
{},
"bars"
:
false
,
"datasource"
:
"${DS_GRAPHITE}"
,
...
...
@@ -296,7 +294,6 @@
"notifications"
:
[],
"severity"
:
"critical"
},
"alerting"
:
{},
"aliasColors"
:
{},
"bars"
:
false
,
"datasource"
:
"${DS_GRAPHITE}"
,
...
...
@@ -407,7 +404,6 @@
"notifications"
:
[],
"severity"
:
"critical"
},
"alerting"
:
{},
"aliasColors"
:
{},
"bars"
:
false
,
"datasource"
:
"${DS_GRAPHITE}"
,
...
...
@@ -526,7 +522,6 @@
"notifications"
:
[],
"severity"
:
"warning"
},
"alerting"
:
{},
"aliasColors"
:
{},
"bars"
:
false
,
"datasource"
:
"${DS_GRAPHITE}"
,
...
...
@@ -636,7 +631,6 @@
"notifications"
:
[],
"severity"
:
"warning"
},
"alerting"
:
{},
"aliasColors"
:
{},
"bars"
:
false
,
"datasource"
:
"${DS_GRAPHITE}"
,
...
...
@@ -746,7 +740,6 @@
"notifications"
:
[],
"severity"
:
"warning"
},
"alerting"
:
{},
"aliasColors"
:
{},
"bars"
:
false
,
"datasource"
:
"${DS_GRAPHITE}"
,
...
...
@@ -856,7 +849,6 @@
"notifications"
:
[],
"severity"
:
"warning"
},
"alerting"
:
{},
"aliasColors"
:
{},
"bars"
:
false
,
"datasource"
:
"${DS_GRAPHITE}"
,
...
...
@@ -974,7 +966,6 @@
"notifications"
:
[],
"severity"
:
"critical"
},
"alerting"
:
{},
"aliasColors"
:
{},
"bars"
:
false
,
"datasource"
:
"${DS_GRAPHITE}"
,
...
...
@@ -1084,7 +1075,6 @@
"notifications"
:
[],
"severity"
:
"critical"
},
"alerting"
:
{},
"aliasColors"
:
{},
"bars"
:
false
,
"datasource"
:
"${DS_GRAPHITE}"
,
...
...
@@ -1194,7 +1184,6 @@
"notifications"
:
[],
"severity"
:
"critical"
},
"alerting"
:
{},
"aliasColors"
:
{},
"bars"
:
false
,
"datasource"
:
"${DS_GRAPHITE}"
,
...
...
@@ -1304,7 +1293,6 @@
"notifications"
:
[],
"severity"
:
"critical"
},
"alerting"
:
{},
"aliasColors"
:
{},
"bars"
:
false
,
"datasource"
:
"${DS_GRAPHITE}"
,
...
...
@@ -1422,7 +1410,6 @@
"notifications"
:
[],
"name"
:
"Fast Warning panel alert"
},
"alerting"
:
{},
"aliasColors"
:
{},
"bars"
:
false
,
"datasource"
:
"${DS_GRAPHITE}"
,
...
...
@@ -1532,7 +1519,6 @@
"notifications"
:
[],
"name"
:
"Fast Warning panel alert"
},
"alerting"
:
{},
"aliasColors"
:
{},
"bars"
:
false
,
"datasource"
:
"${DS_GRAPHITE}"
,
...
...
@@ -1642,7 +1628,6 @@
"notifications"
:
[],
"name"
:
"Fast Warning panel alert"
},
"alerting"
:
{},
"aliasColors"
:
{},
"bars"
:
false
,
"datasource"
:
"${DS_GRAPHITE}"
,
...
...
@@ -1752,7 +1737,6 @@
"notifications"
:
[],
"name"
:
"Fast Warning panel alert"
},
"alerting"
:
{},
"aliasColors"
:
{},
"bars"
:
false
,
"datasource"
:
"${DS_GRAPHITE}"
,
...
...
@@ -1936,7 +1920,6 @@
"timeShift"
:
null
,
"aliasColors"
:
{},
"seriesOverrides"
:
[],
"alerting"
:
{},
"thresholds"
:
[
{
"value"
:
20
,
...
...
@@ -2047,7 +2030,6 @@
"timeShift"
:
null
,
"aliasColors"
:
{},
"seriesOverrides"
:
[],
"alerting"
:
{},
"thresholds"
:
[
{
"value"
:
10
,
...
...
@@ -2167,7 +2149,6 @@
"timeShift"
:
null
,
"aliasColors"
:
{},
"seriesOverrides"
:
[],
"alerting"
:
{},
"thresholds"
:
[
{
"value"
:
60
,
...
...
pkg/services/alerting/engine.go
View file @
902314d3
...
...
@@ -101,11 +101,6 @@ func (e *Engine) resultDispatcher() {
for
result
:=
range
e
.
resultQueue
{
e
.
log
.
Debug
(
"Alert Rule Result"
,
"ruleId"
,
result
.
Rule
.
Id
,
"firing"
,
result
.
Firing
)
if
result
.
Error
!=
nil
{
e
.
log
.
Error
(
"Alert Rule Result Error"
,
"ruleId"
,
result
.
Rule
.
Id
,
"error"
,
result
.
Error
,
"retry"
)
}
else
{
e
.
resultHandler
.
Handle
(
result
)
}
e
.
resultHandler
.
Handle
(
result
)
}
}
pkg/services/alerting/result_handler.go
View file @
902314d3
...
...
@@ -29,7 +29,7 @@ func NewResultHandler() *DefaultResultHandler {
func
(
handler
*
DefaultResultHandler
)
Handle
(
ctx
*
EvalContext
)
{
oldState
:=
ctx
.
Rule
.
State
exeuctionError
:=
""
exeuctionError
:=
"
"
if
ctx
.
Error
!=
nil
{
handler
.
log
.
Error
(
"Alert Rule Result Error"
,
"ruleId"
,
ctx
.
Rule
.
Id
,
"error"
,
ctx
.
Error
)
ctx
.
Rule
.
State
=
m
.
AlertStateExeuctionError
...
...
@@ -41,7 +41,6 @@ func (handler *DefaultResultHandler) Handle(ctx *EvalContext) {
}
countSeverity
(
ctx
.
Rule
.
Severity
)
if
ctx
.
Rule
.
State
!=
oldState
{
handler
.
log
.
Info
(
"New state change"
,
"alertId"
,
ctx
.
Rule
.
Id
,
"newState"
,
ctx
.
Rule
.
State
,
"oldState"
,
oldState
)
...
...
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