Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DiDi
nightingale
提交
60bf8139
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 搜索 >>
未验证
提交
60bf8139
编写于
4月 24, 2023
作者:
X
xtan
提交者:
GitHub
4月 24, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: add eventid to ibex task_record (#1497)
上级
fc0d077c
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
8 addition
and
2 deletion
+8
-2
alert/sender/callback.go
alert/sender/callback.go
+1
-0
docker/experience_pg_vm/initsql_for_postgres/a-n9e-for-Postgres.sql
...erience_pg_vm/initsql_for_postgres/a-n9e-for-Postgres.sql
+3
-1
docker/initsql/a-n9e.sql
docker/initsql/a-n9e.sql
+3
-1
models/task_record.go
models/task_record.go
+1
-0
未找到文件。
alert/sender/callback.go
浏览文件 @
60bf8139
...
...
@@ -154,6 +154,7 @@ func handleIbex(ctx *ctx.Context, url string, event *models.AlertCurEvent, targe
// write db
record
:=
models
.
TaskRecord
{
Id
:
res
.
Dat
,
EventId
:
event
.
Id
,
GroupId
:
tpl
.
GroupId
,
IbexAddress
:
ibexConf
.
Address
,
IbexAuthUser
:
ibexConf
.
BasicAuthUser
,
...
...
docker/experience_pg_vm/initsql_for_postgres/a-n9e-for-Postgres.sql
浏览文件 @
60bf8139
...
...
@@ -651,6 +651,7 @@ COMMENT ON COLUMN task_tpl_host.host IS 'ip or hostname';
CREATE
TABLE
task_record
(
id
bigint
not
null
,
event_id
bigint
not
null
default
0
,
group_id
bigint
not
null
,
ibex_address
varchar
(
128
)
not
null
,
ibex_auth_user
varchar
(
128
)
not
null
default
''
,
...
...
@@ -669,9 +670,10 @@ CREATE TABLE task_record
)
;
CREATE
INDEX
task_record_cg_idx
ON
task_record
(
create_at
,
group_id
);
CREATE
INDEX
task_record_create_by_idx
ON
task_record
(
create_by
);
CREATE
INDEX
task_record_event_id_idx
ON
task_record
(
event_id
);
COMMENT
ON
COLUMN
task_record
.
id
IS
'ibex task id'
;
COMMENT
ON
COLUMN
task_record
.
group_id
IS
'busi group id'
;
COMMENT
ON
COLUMN
task_record
.
event_id
IS
'event id'
;
CREATE
TABLE
alerting_engines
(
...
...
docker/initsql/a-n9e.sql
浏览文件 @
60bf8139
...
...
@@ -531,6 +531,7 @@ CREATE TABLE `task_tpl_host`
CREATE
TABLE
`task_record`
(
`id`
bigint
unsigned
not
null
comment
'ibex task id'
,
`event_id`
bigint
not
null
comment
'event id'
default
0
,
`group_id`
bigint
not
null
comment
'busi group id'
,
`ibex_address`
varchar
(
128
)
not
null
,
`ibex_auth_user`
varchar
(
128
)
not
null
default
''
,
...
...
@@ -547,7 +548,8 @@ CREATE TABLE `task_record`
`create_by`
varchar
(
64
)
not
null
default
''
,
PRIMARY
KEY
(
`id`
),
KEY
(
`create_at`
,
`group_id`
),
KEY
(
`create_by`
)
KEY
(
`create_by`
),
KEY
(
`event_id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
;
CREATE
TABLE
`alerting_engines`
...
...
models/task_record.go
浏览文件 @
60bf8139
...
...
@@ -4,6 +4,7 @@ import "github.com/ccfos/nightingale/v6/pkg/ctx"
type
TaskRecord
struct
{
Id
int64
`json:"id" gorm:"primaryKey"`
EventId
int64
`json:"event_id"`
GroupId
int64
`json:"group_id"`
IbexAddress
string
`json:"ibex_address"`
IbexAuthUser
string
`json:"ibex_auth_user"`
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录