Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Alert ¶ added in v1.2.0
type Alert struct {
Id int64 `json:"id" ` // 主键
GroupKey string `json:"groupKey" ` // key identifying the group of alerts (e.g. to deduplicate)
Status string `json:"status" ` // resolved|firing
ExternalUrl string `json:"externalUrl" ` // alertmanager连接
Labels g.MapStrAny `json:"labels" ` // 告警labels
Annotations g.MapStrAny `json:"annotations" ` // 告警annotations
StartsAt *gtime.Time `json:"startsAt" ` // 告警开始时间
EndsAt *gtime.Time `json:"endsAt" ` // 告警结束时间
GeneratorUrl string `json:"generatorUrl" ` // 触发告警连接
Fingerprint string `json:"fingerprint" ` // 告警指纹
CreateTime *gtime.Time `json:"createTime" ` // 创建时间
}
type AlertRule ¶
type AlertRule struct {
Alert string `yaml:"alert" json:"alert"`
Expr string `yaml:"expr" json:"expr" dc:"prometheus metrics expression"`
For string `yaml:"for" json:"for" dc:""`
Labels g.MapStrAny `yaml:"labels" json:"lables" dc:"alert rule lables"`
Annotations g.MapStrAny `yaml:"annotations" json:"annotations" dc:"alert rule annotations"`
}
type RecordRule ¶
Click to show internal directories.
Click to hide internal directories.