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 string `json:"labels" ` // 告警labels
Annotations string `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" ` // 创建时间
}
Alert is the golang structure for table alert.
type Config ¶ added in v1.1.0
type Config struct {
Id int64 `json:"id" ` // 主键
Name string `json:"name" ` // 配置名称
Value string `json:"value" ` // 配置内容
}
Config is the golang structure for table config.
type Group ¶
type Group struct {
Id int64 `json:"id" ` // 主键
Name string `json:"name" ` // 分组名称
Identification string `json:"identification" ` // 英文标识
CreateTime *gtime.Time `json:"createTime" ` // 创建时间
}
Group is the golang structure for table group.
type Node ¶
type Node struct {
Id int64 `json:"id" ` // 主键
Alias string `json:"alias" ` // 监控项别名
Host string `json:"host" ` // 主机地址 IP或者域名
Port string `json:"port" ` // exporter对应的端口号
Owner string `json:"owner" ` // 所有者/责任人
JobName string `json:"jobName" ` // prometheus job_name
Group string `json:"group" ` // 组名
Labels string `json:"labels" ` // 标签 对应 prometheus中的label配置选项
CreateTime *gtime.Time `json:"createTime" ` // 创建时间
Active int `json:"active" ` // 是否启用
}
Node is the golang structure for table node.
type Rules ¶ added in v1.1.0
type Rules struct {
Id int64 `json:"id" ` // 主键
GroupName string `json:"groupName" ` // 规则组名称
Type string `json:"type" ` // 规则类型 alert record
Content string `json:"content" ` // 规则内容
Active int `json:"active" ` // 是否启用
CreateTime *gtime.Time `json:"createTime" ` // 创建时间
}
Rules is the golang structure for table rules.
type User ¶
type User struct {
Id int64 `json:"id" ` // 主键
Name string `json:"name" ` // 用户名
LoginName string `json:"loginName" ` // 登录名
Password string `json:"password" ` // 登录密码,MD5加密
CreateTime *gtime.Time `json:"createTime" ` // 创建时间
Email string `json:"email" ` // 邮箱
PhoneNumber string `json:"phoneNumber" ` // 手机号码
}
User is the golang structure for table user.
Click to show internal directories.
Click to hide internal directories.