Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DiDi
nightingale
提交
ad26225f
N
nightingale
项目概览
DiDi
/
nightingale
9 个月 前同步成功
通知
46
Star
7053
Fork
1161
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
N
nightingale
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
ad26225f
编写于
6月 25, 2023
作者:
N
ning
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: recording rule model
上级
16db570f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
19 addition
and
18 deletion
+19
-18
docker/initsql/a-n9e.sql
docker/initsql/a-n9e.sql
+1
-0
models/recording_rule.go
models/recording_rule.go
+18
-18
未找到文件。
docker/initsql/a-n9e.sql
浏览文件 @
ad26225f
...
...
@@ -402,6 +402,7 @@ CREATE TABLE `recording_rule` (
`prom_ql`
varchar
(
8192
)
not
null
comment
'promql'
,
`prom_eval_interval`
int
not
null
comment
'evaluate interval'
,
`append_tags`
varchar
(
255
)
default
''
comment
'split by space: service=n9e mod=api'
,
`query_configs`
text
not
null
comment
'query configs'
,
`create_at`
bigint
default
'0'
,
`create_by`
varchar
(
64
)
default
''
,
`update_at`
bigint
default
'0'
,
...
...
models/recording_rule.go
浏览文件 @
ad26225f
...
...
@@ -16,24 +16,24 @@ import (
// A RecordingRule records its vector expression into new timeseries.
type
RecordingRule
struct
{
Id
int64
`json:"id" gorm:"primary
Key
"`
GroupId
int64
`json:"group_id"
`
// busi group id
DatasourceIds
string
`json:"-" gorm:"
datasource_ids"`
// datasource ids
DatasourceIdsJson
[]
int64
`json:"datasource_ids" gorm:"-"`
// for fe
Cluster
string
`json:"cluster"
`
// take effect by cluster, seperated by space
Name
string
`json:"name"`
// new metric name
Disabled
int
`json:"disabled"`
// 0: enabled, 1: disabled
PromQl
string
`json:"prom_ql"
`
// just one ql for promql
QueryConfigs
string
`json:"-" gorm:"
query_configs"`
// query_configs
QueryConfigsJson
[]
QueryConfig
`json:"query_configs" gorm:"-"`
// query_configs for fe
PromEvalInterval
int
`json:"prom_eval_interval"
`
// unit:s
AppendTags
string
`json:"-"
`
// split by space: service=n9e mod=api
AppendTagsJSON
[]
string
`json:"append_tags" gorm:"-"`
// for fe
Note
string
`json:"note"`
// note
CreateAt
int64
`json:"create_at"`
CreateBy
string
`json:"create_by"`
UpdateAt
int64
`json:"update_at"`
UpdateBy
string
`json:"update_by"`
Id
int64
`json:"id" gorm:"primary
_key;auto_increment;column:id
"`
GroupId
int64
`json:"group_id"
gorm:"type:bigint;not null;default:0;column:group_id"`
// busi group id
DatasourceIds
string
`json:"-" gorm:"
type:varchar(255);not null;default:'';column:datasource_ids"`
// datasource ids
DatasourceIdsJson
[]
int64
`json:"datasource_ids" gorm:"-"`
// for fe
Cluster
string
`json:"cluster"
gorm:"type:varchar(128);not null;column:cluster"`
// take effect by cluster, seperated by space
Name
string
`json:"name"
gorm:"type:varchar(255);not null;column:name"
`
// new metric name
Disabled
int
`json:"disabled"
gorm:"type:varchar(255);not null;column:note"
`
// 0: enabled, 1: disabled
PromQl
string
`json:"prom_ql"
gorm:"type:varchar(8192);not null;column:prom_ql"`
// just one ql for promql
QueryConfigs
string
`json:"-" gorm:"
type:text;not null;column:query_configs"`
// query_configs
QueryConfigsJson
[]
QueryConfig
`json:"query_configs" gorm:"-"`
// query_configs for fe
PromEvalInterval
int
`json:"prom_eval_interval"
gorm:"type:int;not null;column:prom_eval_interval"`
// unit:s
AppendTags
string
`json:"-"
gorm:"type:varchar(255);default:'';column:append_tags"`
// split by space: service=n9e mod=api
AppendTagsJSON
[]
string
`json:"append_tags" gorm:"-"`
// for fe
Note
string
`json:"note"
gorm:"type:varchar(255);not null;column:note"
`
// note
CreateAt
int64
`json:"create_at"
gorm:"type:bigint;default:0;column:create_at"
`
CreateBy
string
`json:"create_by"
gorm:"type:varchar(64);default:'';column:create_by"
`
UpdateAt
int64
`json:"update_at"
gorm:"type:bigint;default:0;column:update_at"
`
UpdateBy
string
`json:"update_by"
gorm:"type:varchar(64);default:'';column:update_by"
`
}
type
QueryConfig
struct
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录