2016-04-27 06:02:28 -05:00
|
|
|
package dtos
|
|
|
|
|
2016-07-20 09:13:36 -05:00
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"github.com/grafana/grafana/pkg/components/simplejson"
|
|
|
|
)
|
2016-06-20 04:31:20 -05:00
|
|
|
|
2016-04-27 06:02:28 -05:00
|
|
|
type AlertRuleDTO struct {
|
2016-05-31 06:55:16 -05:00
|
|
|
Id int64 `json:"id"`
|
|
|
|
DashboardId int64 `json:"dashboardId"`
|
|
|
|
PanelId int64 `json:"panelId"`
|
|
|
|
Query string `json:"query"`
|
|
|
|
QueryRefId string `json:"queryRefId"`
|
|
|
|
WarnLevel float64 `json:"warnLevel"`
|
|
|
|
CritLevel float64 `json:"critLevel"`
|
|
|
|
WarnOperator string `json:"warnOperator"`
|
|
|
|
CritOperator string `json:"critOperator"`
|
|
|
|
Frequency int64 `json:"frequency"`
|
2016-06-06 10:11:46 -05:00
|
|
|
Name string `json:"name"`
|
2016-05-31 06:55:16 -05:00
|
|
|
Description string `json:"description"`
|
|
|
|
QueryRange int `json:"queryRange"`
|
|
|
|
Aggregator string `json:"aggregator"`
|
|
|
|
State string `json:"state"`
|
2016-04-27 06:02:28 -05:00
|
|
|
|
|
|
|
DashbboardUri string `json:"dashboardUri"`
|
|
|
|
}
|
2016-06-20 04:31:20 -05:00
|
|
|
|
|
|
|
type AlertNotificationDTO struct {
|
|
|
|
Id int64 `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
Created time.Time `json:"created"`
|
|
|
|
Updated time.Time `json:"updated"`
|
|
|
|
}
|
2016-07-20 09:13:36 -05:00
|
|
|
|
2016-07-21 03:29:11 -05:00
|
|
|
type AlertTestCommand struct {
|
|
|
|
Dashboard *simplejson.Json `json:"dashboard" binding:"Required"`
|
|
|
|
PanelId int64 `json:"panelId" binding:"Required"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type AlertTestResult struct {
|
|
|
|
Triggered bool `json:"triggerd"`
|
|
|
|
Timing string `json:"timing"`
|
|
|
|
Error string `json:"error"`
|
2016-07-20 09:13:36 -05:00
|
|
|
}
|