mirror of
https://github.com/grafana/grafana.git
synced 2024-11-23 09:26:43 -06:00
53 lines
919 B
Go
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
|
|
}
|