models.go 590 B

12345678910111213141516171819202122232425
  1. package alerting
  2. import "github.com/grafana/grafana/pkg/components/null"
  3. // Job holds state about when the alert rule should be evaluated.
  4. type Job struct {
  5. Offset int64
  6. OffsetWait bool
  7. Delay bool
  8. Running bool
  9. Rule *Rule
  10. }
  11. // ResultLogEntry represents log data for the alert evaluation.
  12. type ResultLogEntry struct {
  13. Message string
  14. Data interface{}
  15. }
  16. // EvalMatch represents the serie violating the threshold.
  17. type EvalMatch struct {
  18. Value null.Float `json:"value"`
  19. Metric string `json:"metric"`
  20. Tags map[string]string `json:"tags"`
  21. }