grafana/pkg/services/alerting/models.go
2016-06-10 15:31:17 +02:00

53 lines
919 B
Go

package alerting
import (
"github.com/grafana/grafana/pkg/components/simplejson"
)
type AlertJob struct {
Offset int64
Delay bool
Running bool
RetryCount int
Rule *AlertRule
}
type AlertResult struct {
State string
ActualValue float64
Duration float64
Description string
Error error
AlertJob *AlertJob
}
type AlertRule struct {
Id int64
OrgId int64
DashboardId int64
PanelId int64
Frequency int64
Name string
Description string
State string
Warning Level
Critical Level
Query AlertQuery
Transform string
TransformParams simplejson.Json
Transformer Transformer
}
type Level struct {
Operator string
Level float64
}
type AlertQuery struct {
Query string
DatasourceId int64
Aggregator string
From string
To string
}