models.go 593 B

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