Skip to content

Commit

Permalink
fix: cli upgrade alert_mute
Browse files Browse the repository at this point in the history
  • Loading branch information
710leo committed Mar 24, 2023
1 parent bc6616c commit 63690ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions cli/upgrade/readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# v5 升级 v6 手册
0. 操作之前,记得备注下数据库!

1. 解压 n9e 安装包
2. 导入 upgrade.sql 到 n9e_v5 数据库
1. 需要先将你正在使用的夜莺数据源表结构更新到和 v5.15.0 一致,[release](https://github.com/ccfos/nightingale/releases) 页面有每个版本表结构的更新说明,可以根据你正在使用的版本,按照说明,逐个执行的更新表结构的语句

2. 解压 n9e 安装包,导入 upgrade.sql 到 n9e_v5 数据库
```
mysql -h 127.0.0.1 -u root -p1234 < cli/upgrade/upgrade.sql
```
Expand All @@ -16,4 +18,4 @@ mysql -h 127.0.0.1 -u root -p1234 < cli/upgrade/upgrade.sql
nohup ./n9e &> n9e.log &
```

5. n9e 监听的端口为 17000,如果想使用之前的端口,可以在配置文件中将端口改为 18000
5. n9e 监听的端口为 17000,需要将之前的 web 端口和数据上报的端口,都调整为 17000
2 changes: 1 addition & 1 deletion models/alert_mute.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ func AlertMuteUpgradeToV6(ctx *ctx.Context, dsm map[string]Datasource) error {

err = lst[i].UpdateFieldsMap(ctx, map[string]interface{}{
"datasource_ids": lst[i].DatasourceIds,
"rule_prod": lst[i].Prod,
"prod": lst[i].Prod,
"cate": lst[i].Cate,
})
if err != nil {
Expand Down

0 comments on commit 63690ba

Please sign in to comment.