Feature for repeated alerting in grafana

This commit is contained in:
John Baublitz
2018-06-04 13:19:13 +02:00
committed by bergquist
parent f5cf926364
commit e068be4c26
10 changed files with 55 additions and 2 deletions
+9
View File
@@ -72,6 +72,9 @@ type Alert struct {
Silenced bool
ExecutionError string
Frequency int64
NotifyOnce bool
NotifyFreq uint64
NotifyEval uint64
EvalData *simplejson.Json
NewStateDate time.Time
@@ -95,6 +98,8 @@ func (this *Alert) ContainsUpdates(other *Alert) bool {
result := false
result = result || this.Name != other.Name
result = result || this.Message != other.Message
result = result || this.NotifyOnce != other.NotifyOnce
result = result || (!other.NotifyOnce && this.NotifyFreq != other.NotifyFreq)
if this.Settings != nil && other.Settings != nil {
json1, err1 := this.Settings.Encode()
@@ -159,6 +164,10 @@ type SetAlertStateCommand struct {
Timestamp time.Time
}
type IncAlertEvalCommand struct {
AlertId int64
}
//Queries
type GetAlertsQuery struct {
OrgId int64