template.go 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright 2019 Yunion
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package monitor
  15. type NotificationTemplateCreateInput struct {
  16. Content string `json:"content"`
  17. }
  18. type NotificationTemplateConfig struct {
  19. Title string `json:"title"`
  20. Name string `json:"name"`
  21. ResourceName string `json:"resource_name"`
  22. Matches []*EvalMatch `json:"matches"`
  23. MatchTags []map[string]string `json:"match_tags"`
  24. MatchTagsStr []string `json:"match_tags_str"`
  25. // PrevAlertState AlertStateType `json:"prev_alert_state"`
  26. // State AlertStateType `json:"state"`
  27. NoDataFound bool `json:"no_data"`
  28. StartTime string `json:"start_time"`
  29. EndTime string `json:"end_time"`
  30. Description string `json:"description"`
  31. Reason string `json:"reason"`
  32. Priority string `json:"priority"`
  33. Level string `json:"level"`
  34. IsRecovery bool `json:"is_recovery"`
  35. WebUrl string `json:"web_url"`
  36. }