mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
1.修复报警信息中>等被转义的问题 2.针对:host_raid.adapter和smart_device.exit_status 只能出现alerting和nodata 两种报警状态。在queryCondition的查询逻辑下,nodata情况也进行detach操作 3.修复报警记录中报警策略翻译异常的问题
47 lines
1.1 KiB
Go
47 lines
1.1 KiB
Go
package monitor
|
|
|
|
import "yunion.io/x/onecloud/pkg/apis"
|
|
|
|
type AlertRecordListInput struct {
|
|
apis.Meta
|
|
|
|
apis.ScopedResourceBaseListInput
|
|
apis.EnabledResourceBaseListInput
|
|
apis.StatusStandaloneResourceListInput
|
|
|
|
AlertId string `json:"alert_id"`
|
|
Level string `json:"level"`
|
|
State string `json:"state"`
|
|
}
|
|
|
|
type AlertRecordDetails struct {
|
|
apis.StatusStandaloneResourceDetails
|
|
apis.ScopedResourceBaseInfo
|
|
|
|
ResNum int64 `json:"res_num"`
|
|
}
|
|
|
|
type AlertRecordCreateInput struct {
|
|
apis.StandaloneResourceCreateInput
|
|
|
|
AlertId string `json:"alert_id"`
|
|
// 报警级别
|
|
Level string `json:"level"`
|
|
State string `json:"state"`
|
|
EvalData []*EvalMatch `json:"eval_data"`
|
|
AlertRule AlertRecordRule
|
|
}
|
|
|
|
type AlertRecordRule struct {
|
|
Metric string `json:"metric"`
|
|
Measurement string `json:"measurement"`
|
|
MeasurementDesc string `json:"measurement_desc"`
|
|
Field string `json:"field"`
|
|
FieldDesc string `json:"field_desc"`
|
|
// 比较运算符, 比如: >, <, >=, <=
|
|
Comparator string `json:"comparator"`
|
|
// 报警阀值
|
|
Threshold string `json:"threshold"`
|
|
Period string `json:"period"`
|
|
}
|