vo

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2022 License: MIT Imports: 2 Imported by: 0

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 Group

type Group struct {
	Name  string  `yaml:"name" json:"name" dc:"group name"`
	Rules g.Slice `yaml:"rules" json:"rules" dc:"rules"`
}

type Groups

type Groups struct {
	Groups []Group `yaml:"groups" json:"groups"`
}

type RecordRule

type RecordRule struct {
	Record string `yaml:"record" json:"record" dc:"record name"`
	Expr   string `yaml:"expr" json:"expr" dc:"expression for prometheus metrics"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL