|
@@ -35,10 +35,11 @@ type AlertTestCommand struct {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
type AlertTestResult struct {
|
|
type AlertTestResult struct {
|
|
|
- Firing bool `json:"firing"`
|
|
|
|
|
- TimeMs string `json:"timeMs"`
|
|
|
|
|
- Error string `json:"error,omitempty"`
|
|
|
|
|
- Logs []*AlertTestResultLog `json:"logs,omitempty"`
|
|
|
|
|
|
|
+ Firing bool `json:"firing"`
|
|
|
|
|
+ TimeMs string `json:"timeMs"`
|
|
|
|
|
+ Error string `json:"error,omitempty"`
|
|
|
|
|
+ EvalMatches []*EvalMatch `json:"matches,omitempty"`
|
|
|
|
|
+ Logs []*AlertTestResultLog `json:"logs,omitempty"`
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
type AlertTestResultLog struct {
|
|
type AlertTestResultLog struct {
|
|
@@ -46,7 +47,8 @@ type AlertTestResultLog struct {
|
|
|
Data interface{} `json:"data"`
|
|
Data interface{} `json:"data"`
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-type AlertEvent struct {
|
|
|
|
|
- Metric string `json:"metric"`
|
|
|
|
|
- Value float64 `json:"value"`
|
|
|
|
|
|
|
+type EvalMatch struct {
|
|
|
|
|
+ Tags map[string]string `json:"tags,omitempty"`
|
|
|
|
|
+ Metric string `json:"metric"`
|
|
|
|
|
+ Value float64 `json:"value"`
|
|
|
}
|
|
}
|