diff --git a/.gtmproject.yaml b/.gtmproject.yaml index daf3e196ad..59163bb7f0 100644 --- a/.gtmproject.yaml +++ b/.gtmproject.yaml @@ -6,7 +6,7 @@ github: repo_name: "blueking-dbm" # 指定里程碑ID, - milestone_id: "8" + milestone_id: "9" project: # 主分支 diff --git a/dbm-services/bigdata/db-tools/dbactuator/pkg/util/esutil/es_helper.go b/dbm-services/bigdata/db-tools/dbactuator/pkg/util/esutil/es_helper.go index 05617182a7..1f71fbf91e 100644 --- a/dbm-services/bigdata/db-tools/dbactuator/pkg/util/esutil/es_helper.go +++ b/dbm-services/bigdata/db-tools/dbactuator/pkg/util/esutil/es_helper.go @@ -5,6 +5,7 @@ import ( "encoding/json" "errors" "fmt" + "os" "strconv" "strings" "time" @@ -38,11 +39,18 @@ type Allocation struct { // Conn TODO func (o EsInsObject) Conn() (*elasticsearch.Client, error) { + username := os.Getenv("ES_USERNAME") + password := os.Getenv("ES_PASSWORD") + if username == "" || password == "" { + err := errors.New("环境变量ES_USERNAME、ES_PASSWORD为空,或不存在") + return nil, err + + } return elasticsearch.NewClient( elasticsearch.Config{ Addresses: []string{fmt.Sprintf("http://%s:%d", o.Host, o.HTTPPort)}, - Username: o.UserName, - Password: o.Password, + Username: username, + Password: password, }) } diff --git a/dbm-services/common/dbha/ha-module/client/redis_client.go b/dbm-services/common/dbha/ha-module/client/redis_client.go index 569202aa1d..4bac93e77b 100644 --- a/dbm-services/common/dbha/ha-module/client/redis_client.go +++ b/dbm-services/common/dbha/ha-module/client/redis_client.go @@ -147,6 +147,19 @@ func (r *RedisClient) InfoV2(section string) (infoRet map[string]string, err err return } +// Get Redis `GET key` command. It returns redis.Nil error when key does not exist. +func (r *RedisClient) Get(key string) (ret string, err error) { + if r.mode != RedisInstance { + ret, err = r.crdb.Get(context.TODO(), key).Result() + } else { + ret, err = r.rdb.Get(context.TODO(), key).Result() + } + if err != nil && err != redis.Nil { + return + } + return ret, nil +} + // SlaveOf TODO func (r *RedisClient) SlaveOf(host, port string) (ret string, err error) { if r.mode == RedisInstance { diff --git a/dbm-services/common/dbha/ha-module/dbmodule/redis/redis_switch.go b/dbm-services/common/dbha/ha-module/dbmodule/redis/redis_switch.go index 411662c18a..ff45cdd0fc 100644 --- a/dbm-services/common/dbha/ha-module/dbmodule/redis/redis_switch.go +++ b/dbm-services/common/dbha/ha-module/dbmodule/redis/redis_switch.go @@ -6,6 +6,7 @@ import ( "encoding/json" "fmt" "io" + "math" "net" "sort" "strconv" @@ -523,7 +524,8 @@ func (ins *RedisSwitch) GetTwemproxyBackends(ip string, adminPort int) (segs map // CheckSlaveSyncStatus // 5. 检查同步状态 func (ins *RedisSwitch) CheckSlaveSyncStatus(masterIp string, masterPort int, slaveIp string, slavePort int) error { slaveAddr, slaveConn := fmt.Sprintf("%s:%d", slaveIp, slavePort), &client.RedisClient{} - slaveConn.Init(slaveAddr, ins.Pass, ins.Timeout, 0) + masterAddr := fmt.Sprintf("%s:%d", masterIp, masterPort) + slaveConn.Init(slaveAddr, ins.Pass, ins.Timeout, 1) defer slaveConn.Close() replic, err := slaveConn.InfoV2("replication") @@ -547,8 +549,10 @@ func (ins *RedisSwitch) CheckSlaveSyncStatus(masterIp string, masterPort int, sl return err } - if replic["master_link_status"] != "up" { - err := fmt.Errorf("unexpected status master_link_status:%s", replic["master_link_status"]) + // master_last_io_seconds_ago:-1 master_link_status:down master_link_down_since_seconds:160 master_port:30001 + // master_last_io_seconds_ago:114 master_link_status:up master_port:30000 master_repl_offset:2113331 master | + if err := ins.checkReplicationSync(slaveConn, masterAddr, slaveAddr); err != nil { + err := fmt.Errorf("unexpected status master_sync_status:%s", err) ins.ReportLogs(constvar.FailResult, fmt.Sprintf("redis switch precheck: (%s) : %s", slaveAddr, err.Error())) return err } @@ -563,6 +567,32 @@ func (ins *RedisSwitch) CheckSlaveSyncStatus(masterIp string, masterPort int, sl return nil } +// checkReplicationSync # here we just check the master heartbeat: +func (ins *RedisSwitch) checkReplicationSync(newMasterConn *client.RedisClient, + masterAddr, slaveAddr string) (err error) { + var masterTime, slaveTime int64 + + rst, err := newMasterConn.Get(fmt.Sprintf("%s:time", masterAddr)) + if err != nil { + return fmt.Errorf("[%s]new master node, exec cmd err:%+v", masterAddr, err) + } + if masterTime, err = strconv.ParseInt(rst, 10, 64); err != nil { + return fmt.Errorf("[%s]new master node, time2Int64 err:%+v", masterAddr, err) + } + + slaveTime = time.Now().Unix() // here gcs.perl use redis-cli time + + slaveMasterDiffTime := math.Abs(float64(slaveTime) - float64(masterTime)) + if slaveMasterDiffTime > MaxLastIOSecondsAgo { + return fmt.Errorf("err master slave sync too long %s => %s diff: %.0f(%d)", + masterAddr, slaveAddr, slaveMasterDiffTime, MaxLastIOSecondsAgo) + } + + log.Logger.Infof("[%s]new master node, master on slave time:%d, diff:%.0f slave time:%d", + slaveAddr, masterTime, slaveMasterDiffTime, slaveTime) + return nil +} + // IsSlave check instance is slave or not func (ins *RedisSwitch) IsSlave() bool { return strings.Contains(ins.Role, "slave") diff --git a/dbm-services/mysql/db-partition/main.go b/dbm-services/mysql/db-partition/main.go index 56c50079df..595d0e7ad8 100644 --- a/dbm-services/mysql/db-partition/main.go +++ b/dbm-services/mysql/db-partition/main.go @@ -13,11 +13,10 @@ import ( "dbm-services/common/go-pubpkg/apm/metric" "dbm-services/common/go-pubpkg/apm/trace" - "dbm-services/mysql/db-partition/monitor" - "dbm-services/mysql/db-partition/assests" "dbm-services/mysql/db-partition/cron" "dbm-services/mysql/db-partition/model" + "dbm-services/mysql/db-partition/monitor" "dbm-services/mysql/db-partition/router" ) diff --git a/dbm-services/mysql/db-partition/monitor/monitor.go b/dbm-services/mysql/db-partition/monitor/monitor.go index 115190aec7..20c0d9c8ff 100644 --- a/dbm-services/mysql/db-partition/monitor/monitor.go +++ b/dbm-services/mysql/db-partition/monitor/monitor.go @@ -95,7 +95,7 @@ func TestSendEvent(dataId int, token string, serviceHost string) error { "content": "test partition monitor", }, commonData: commonData{ - Target: "127.0.0.1", + Target: "0.0.0.0", Timestamp: time.Now().In(l).UnixMilli(), Dimension: dimension, Metrics: nil, diff --git a/dbm-services/mysql/db-partition/service/manage_config.go b/dbm-services/mysql/db-partition/service/manage_config.go index a648609cd8..922173684d 100644 --- a/dbm-services/mysql/db-partition/service/manage_config.go +++ b/dbm-services/mysql/db-partition/service/manage_config.go @@ -75,6 +75,9 @@ func (m *QueryParititionsInput) GetPartitionsConfig() ([]*PartitionConfigWithLog slog.Error(vsql, "execute error", err) return nil, 0, err } + if m.Limit == -1 { + m.Limit = cnt.Count + } limitCondition := fmt.Sprintf("limit %d offset %d", m.Limit, m.Offset) if m.OrderBy == "" { diff --git a/dbm-services/mysql/db-partition/service/manage_config_object.go b/dbm-services/mysql/db-partition/service/manage_config_object.go index 1e288d205c..9757ec9657 100644 --- a/dbm-services/mysql/db-partition/service/manage_config_object.go +++ b/dbm-services/mysql/db-partition/service/manage_config_object.go @@ -45,7 +45,7 @@ type QueryParititionsInput struct { ImmuteDomains []string `json:"immute_domains"` DbLikes []string `json:"dblikes"` TbLikes []string `json:"tblikes"` - Limit int `json:"limit"` + Limit int64 `json:"limit"` Offset int `json:"offset"` OrderBy string `json:"order_by"` AscDesc string `json:"asc_desc"` diff --git a/dbm-services/mysql/db-priv/handler/account.go b/dbm-services/mysql/db-priv/handler/account.go index 73ae1f4edc..b263216d69 100644 --- a/dbm-services/mysql/db-priv/handler/account.go +++ b/dbm-services/mysql/db-priv/handler/account.go @@ -92,10 +92,10 @@ func (m *PrivService) ModifyAccount(c *gin.Context) { return } -// GetAccount 获取账号 -func (m *PrivService) GetAccount(c *gin.Context) { - slog.Info("do GetAccount!") - var input service.AccountPara +// GetAccountList 获取账号列表 +func (m *PrivService) GetAccountList(c *gin.Context) { + slog.Info("do GetAccountList!") + var input service.GetAccountListPara body, err := ioutil.ReadAll(c.Request.Body) if err != nil { @@ -103,22 +103,25 @@ func (m *PrivService) GetAccount(c *gin.Context) { SendResponse(c, errno.ErrBind, err) return } - if err = json.Unmarshal(body, &input); err != nil { slog.Error("msg", err) SendResponse(c, errno.ErrBind, err) return } - accounts, count, err := input.GetAccount() + accounts, count, err := input.GetAccountList() + type ListResponse struct { + Count int64 `json:"count"` + Results interface{} `json:"results"` + } SendResponse(c, err, ListResponse{ - Count: count, - Items: accounts, + Count: count, + Results: accounts, }) return } -// GetAccount 获取账号 +// GetAccountIncludePsw 获取账号密码 func (m *PrivService) GetAccountIncludePsw(c *gin.Context) { slog.Info("do GetAccount!") var input service.GetAccountIncludePswPara diff --git a/dbm-services/mysql/db-priv/handler/register_routes.go b/dbm-services/mysql/db-priv/handler/register_routes.go index e3fc616815..dc897aa817 100644 --- a/dbm-services/mysql/db-priv/handler/register_routes.go +++ b/dbm-services/mysql/db-priv/handler/register_routes.go @@ -22,9 +22,12 @@ func (m *PrivService) Routes() []*gin.RouteInfo { return []*gin.RouteInfo{ // 账号 {Method: http.MethodPost, Path: "add_account", HandlerFunc: m.AddAccount}, - {Method: http.MethodPost, Path: "get_account", HandlerFunc: m.GetAccount}, {Method: http.MethodPost, Path: "modify_account", HandlerFunc: m.ModifyAccount}, {Method: http.MethodPost, Path: "delete_account", HandlerFunc: m.DeleteAccount}, + // 查询帐号清单 + {Method: http.MethodPost, Path: "get_account", HandlerFunc: m.GetAccountList}, + // 查询帐号,并且包含密码,为mongodb等非mysql数据库类型使用 + {Method: http.MethodPost, Path: "get_account_include_psw", HandlerFunc: m.GetAccountIncludePsw}, // 账号规则 {Method: http.MethodPost, Path: "get_account_rule_list", HandlerFunc: m.GetAccountRuleList}, @@ -73,9 +76,6 @@ func (m *PrivService) Routes() []*gin.RouteInfo { // 检查和迁移账号规则 {Method: http.MethodPost, Path: "migrate_account_rule", HandlerFunc: m.MigrateAccountRule}, - - // 查询帐号,并且包含密码,为mongodb等非mysql数据库类型使用 - {Method: http.MethodPost, Path: "get_account_include_psw", HandlerFunc: m.GetAccountIncludePsw}, } } diff --git a/dbm-services/mysql/db-priv/service/account.go b/dbm-services/mysql/db-priv/service/account.go index eb1357a239..d51de0e2a4 100644 --- a/dbm-services/mysql/db-priv/service/account.go +++ b/dbm-services/mysql/db-priv/service/account.go @@ -4,6 +4,7 @@ import ( "encoding/hex" "fmt" "log/slog" + "strconv" "strings" "time" @@ -169,22 +170,61 @@ func (m *AccountPara) DeleteAccount(jsonPara string) error { return nil } -// GetAccount 获取账号 -func (m *AccountPara) GetAccount() ([]*TbAccounts, int64, error) { +// GetAccountList 获取账号列表 +func (m *GetAccountListPara) GetAccountList() ([]*TbAccounts, int64, error) { + // Cnt 用于返回匹配到的行数 + type Cnt struct { + Count int64 `gorm:"column:cnt"` + } var ( accounts []*TbAccounts - result *gorm.DB ) - if m.BkBizId == 0 { - return nil, 0, errno.BkBizIdIsEmpty + where := " 1=1 " + if m.BkBizId > 0 { + where = fmt.Sprintf("%s and bk_biz_id=%d", where, m.BkBizId) } - result = DB.Self.Model(&TbAccounts{}).Where(&TbAccounts{ - BkBizId: m.BkBizId, ClusterType: *m.ClusterType, User: m.User}).Select( - "id,bk_biz_id,user,cluster_type,creator,create_time,update_time").Scan(&accounts) - if result.Error != nil { - return nil, 0, result.Error + if m.ClusterType != nil { + where = fmt.Sprintf("%s and cluster_type='%s'", where, *m.ClusterType) } - return accounts, int64(len(accounts)), nil + if m.UserLike != "" { + where = fmt.Sprintf("%s and user like '%%%s%%'", where, m.UserLike) + } + if m.User != "" { + where = fmt.Sprintf("%s and user = '%s'", where, m.User) + } + if m.Id != nil { + m.Ids = append(m.Ids, *m.Id) + } + if len(m.Ids) != 0 { + var temp = make([]string, len(m.Ids)) + for k, id := range m.Ids { + temp[k] = strconv.FormatInt(id, 10) + } + ids := " and id in (" + strings.Join(temp, ",") + ") " + where = where + ids + } + cnt := Cnt{} + vsql := fmt.Sprintf("select count(*) as cnt from tb_accounts where %s", where) + err := DB.Self.Raw(vsql).Scan(&cnt).Error + if err != nil { + slog.Error(vsql, "execute error", err) + return nil, 0, err + } + if cnt.Count == 0 { + return nil, 0, nil + } + if m.Limit == nil { + vsql = fmt.Sprintf("select id, user, creator, bk_biz_id from tb_accounts where %s", where) + } else { + limitCondition := fmt.Sprintf("limit %d offset %d", *m.Limit, *m.Offset) + vsql = fmt.Sprintf("select id, user, creator, bk_biz_id from tb_accounts where %s %s", where, limitCondition) + } + err = DB.Self.Raw(vsql).Scan(&accounts).Error + if err != nil { + slog.Error(vsql, "execute error", err) + return nil, 0, err + } + return accounts, cnt.Count, nil } // GetAccountIncludePsw 获取帐号以及密码 @@ -199,6 +239,9 @@ func (m *GetAccountIncludePswPara) GetAccountIncludePsw() ([]*TbAccounts, int64, if len(m.Users) == 0 { return nil, 0, errno.ErrUserIsEmpty } + if m.ClusterType == nil { + return nil, 0, errno.ClusterTypeIsEmpty + } // mongodb 需要查询psw users := "'" + strings.Join(m.Users, "','") + "'" where := fmt.Sprintf("bk_biz_id=%d and cluster_type='%s' and user in (%s)", m.BkBizId, *m.ClusterType, users) diff --git a/dbm-services/mysql/db-priv/service/account_object.go b/dbm-services/mysql/db-priv/service/account_object.go index a6b36ee73f..e7bde6ba3e 100644 --- a/dbm-services/mysql/db-priv/service/account_object.go +++ b/dbm-services/mysql/db-priv/service/account_object.go @@ -55,6 +55,19 @@ type GetAccountIncludePswPara struct { ClusterType *string `json:"cluster_type"` } +type GetAccountListPara struct { + BkBizId int64 `json:"bk_biz_id"` + Ids []int64 `json:"ids"` + Id *int64 `json:"id"` + ClusterType *string `json:"cluster_type"` + // user模糊查询 + UserLike string `json:"user_like"` + // user精确查询 + User string `json:"user"` + Limit *int64 `json:"limit"` + Offset *int64 `json:"offset"` +} + // PrivLog 记录权限相关接口的调用日志 type PrivLog struct { Id int64 `gorm:"column:id;primary_key;auto_increment" json:"id"` diff --git a/dbm-services/mysql/db-priv/service/migrate_account_rule_base_func.go b/dbm-services/mysql/db-priv/service/migrate_account_rule_base_func.go index 7b338765cb..98d3bbad1b 100644 --- a/dbm-services/mysql/db-priv/service/migrate_account_rule_base_func.go +++ b/dbm-services/mysql/db-priv/service/migrate_account_rule_base_func.go @@ -135,8 +135,8 @@ func DoAddAccounts(apps map[string]int64, users []PrivModule, clusterType string // DoAddAccountRule 创建帐号规则 func DoAddAccountRule(rule *PrivModule, apps map[string]int64, clusterType string, priv map[string]string) error { - account := AccountPara{BkBizId: apps[rule.App], User: rule.User, ClusterType: &clusterType} - items, cnt, err := account.GetAccount() + account := GetAccountListPara{BkBizId: apps[rule.App], User: rule.User, ClusterType: &clusterType} + items, cnt, err := account.GetAccountList() if err != nil { return fmt.Errorf("add rule failed when get account: %s", err.Error()) } diff --git a/dbm-services/mysql/db-tools/dbactuator/cmd/cmd.go b/dbm-services/mysql/db-tools/dbactuator/cmd/cmd.go index 7c65cddf12..f4b9efbee4 100644 --- a/dbm-services/mysql/db-tools/dbactuator/cmd/cmd.go +++ b/dbm-services/mysql/db-tools/dbactuator/cmd/cmd.go @@ -163,6 +163,10 @@ Buildstamp:%s`, version, githash, strings.ToUpper(external), buildstamp, &subcmd.GBaseOptions.PayloadFormat, "payload-format", "m", subcmd.GBaseOptions.PayloadFormat, "command payload format, default base64, value_allowed: base64|raw", ) + cmds.PersistentFlags().StringVarP( + &subcmd.GBaseOptions.NotSensitivePayload, "non-sensitive-paylod", "c", + subcmd.GBaseOptions.NotSensitivePayload, "commandn not sensitive payload ", + ) cmds.PersistentFlags().StringVarP(&subcmd.GBaseOptions.Uid, "uid", "U", subcmd.GBaseOptions.Uid, "bill id") cmds.PersistentFlags().StringVarP(&subcmd.GBaseOptions.RootId, "root_id", "R", subcmd.GBaseOptions.NodeId, "process id") diff --git a/dbm-services/mysql/db-tools/dbactuator/internal/subcmd/mysqlcmd/install_mysql.go b/dbm-services/mysql/db-tools/dbactuator/internal/subcmd/mysqlcmd/install_mysql.go index 3fc5bebd24..af0aa805cb 100644 --- a/dbm-services/mysql/db-tools/dbactuator/internal/subcmd/mysqlcmd/install_mysql.go +++ b/dbm-services/mysql/db-tools/dbactuator/internal/subcmd/mysqlcmd/install_mysql.go @@ -67,6 +67,10 @@ func (d *DeployMySQLAct) Init() (err error) { logger.Error("DeserializeAndValidate failed, %v", err) return err } + if err = d.DeserializeNonSensitivePayload(&d.Service.MySQLConfigParams); err != nil { + logger.Error("DeserializeAndValidate failed, %v", err) + return err + } d.Service.GeneralParam = subcmd.GeneralRuntimeParam return d.Service.InitDefaultParam() } diff --git a/dbm-services/mysql/db-tools/dbactuator/internal/subcmd/subcmd.go b/dbm-services/mysql/db-tools/dbactuator/internal/subcmd/subcmd.go index 8b6b911808..6d2a5c3280 100644 --- a/dbm-services/mysql/db-tools/dbactuator/internal/subcmd/subcmd.go +++ b/dbm-services/mysql/db-tools/dbactuator/internal/subcmd/subcmd.go @@ -19,6 +19,7 @@ import ( "path/filepath" "strings" + "dbm-services/common/go-pubpkg/cmutil" "dbm-services/common/go-pubpkg/logger" "dbm-services/common/go-pubpkg/validate" "dbm-services/mysql/db-tools/dbactuator/pkg/components" @@ -53,14 +54,15 @@ func init() { 此参数是json字符串的base64编码之后的字符串 */ type BaseOptions struct { - Uid string - RootId string - NodeId string - VersionId string - Payload string - PayloadFormat string - RollBack bool - Helper bool + Uid string + RootId string + NodeId string + VersionId string + Payload string + PayloadFormat string + NotSensitivePayload string + RollBack bool + Helper bool // 是否为外部版本 // on ON External string @@ -191,6 +193,25 @@ func Deserialize(s interface{}) (p *BaseOptions, err error) { return GBaseOptions, nil } +// DeserializeNonSensitivePayload 反序列化非敏感payload,不校验参数 +func (b *BaseOptions) DeserializeNonSensitivePayload(s interface{}) (err error) { + var bp []byte + if cmutil.IsEmpty(b.NotSensitivePayload) { + return errors.New("non-sensitive payload need input") + } + bp, err = base64.StdEncoding.DecodeString(b.NotSensitivePayload) + if err != nil { + return err + } + logger.Local("DeserializeSimple not sensitive payload body: %s", b.NotSensitivePayload) + if err = json.Unmarshal(bp, &s); err != nil { + logger.Error("json.Unmarshal failed, %v", s, err) + err = errors.WithMessage(err, "error in resolving parameter") + return err + } + return nil +} + // Deserialize 反序列化payload,并校验参数 // // ps: 参数校验 from golang validate v10 @@ -266,7 +287,7 @@ func (b *BaseOptions) DeserializeSimple(s interface{}) (err error) { return nil } -// Validate TODO +// Validate validate payload func (b *BaseOptions) Validate() (err error) { if len(b.Payload) == 0 { return fmt.Errorf("payload need input") @@ -274,7 +295,7 @@ func (b *BaseOptions) Validate() (err error) { return nil } -// OutputCtx TODO +// OutputCtx output ctx // // @receiver b func (b *BaseOptions) OutputCtx(ctx string) { @@ -326,7 +347,7 @@ func SetLogger(cmd *cobra.Command, opt *BaseOptions) { defer logger.Sync() } -// ValidateSubCommand TODO +// ValidateSubCommand validate sub command func ValidateSubCommand() func(cmd *cobra.Command, args []string) error { return func(cmd *cobra.Command, args []string) error { if len(args) <= 0 { diff --git a/dbm-services/mysql/db-tools/dbactuator/pkg/components/mysql/install_checksum.go b/dbm-services/mysql/db-tools/dbactuator/pkg/components/mysql/install_checksum.go index 932350717d..ba2cdffef1 100644 --- a/dbm-services/mysql/db-tools/dbactuator/pkg/components/mysql/install_checksum.go +++ b/dbm-services/mysql/db-tools/dbactuator/pkg/components/mysql/install_checksum.go @@ -7,7 +7,6 @@ import ( "os/exec" "path" "path/filepath" - "time" "dbm-services/common/go-pubpkg/logger" "dbm-services/mysql/db-tools/dbactuator/pkg/components" @@ -147,7 +146,7 @@ func (c *InstallMySQLChecksumComp) GenerateBinaryConfig() (err error) { Args: []map[string]interface{}{ { "name": "run-time", - "value": time.Hour * 2, + "value": "2h", //time.Hour * 2, }, }, }, diff --git a/dbm-services/mysql/db-tools/dbactuator/pkg/components/mysql/install_mysql.go b/dbm-services/mysql/db-tools/dbactuator/pkg/components/mysql/install_mysql.go index 965377c9c8..33e4c9ccfe 100644 --- a/dbm-services/mysql/db-tools/dbactuator/pkg/components/mysql/install_mysql.go +++ b/dbm-services/mysql/db-tools/dbactuator/pkg/components/mysql/install_mysql.go @@ -40,6 +40,7 @@ import ( type InstallMySQLComp struct { GeneralParam *components.GeneralParam `json:"general"` Params *InstallMySQLParams `json:"extend"` + MySQLConfigParams *MySQLConfigParams installMySQLConfig `json:"-"` RollBackContext rollback.RollBackObjects `json:"-"` TimeZone string @@ -52,11 +53,16 @@ type InstallMySQLComp struct { AvoidReset bool `json:"-"` // 迁移单据复用了这个 actor, 需要不做reset } +// MySQLConfigParams TODO +type MySQLConfigParams struct { + MyCnfConfigs json.RawMessage `json:"mycnf_configs" validate:"required" ` +} + // InstallMySQLParams TODO type InstallMySQLParams struct { components.Medium // map[port]my.cnf - MyCnfConfigs json.RawMessage `json:"mycnf_configs" validate:"required" ` + MyCnfConfigs json.RawMessage // MySQLVerion 只需5.6 5.7 这样的大版本号 MysqlVersion string `json:"mysql_version" validate:"required"` // 字符集参数 @@ -72,14 +78,14 @@ type InstallMySQLParams struct { AllowDiskFileSystemTypes []string } -// InitDirs TODO +// InitDirs init dirs type InitDirs = []string -// Port TODO +// Port port type Port = int type socket = string -// SpiderAutoIncrModeValue TODO +// SpiderAutoIncrModeValue spider au type SpiderAutoIncrModeValue int type installMySQLConfig struct { @@ -131,15 +137,6 @@ func (i *InstallMySQLComp) Example() interface{} { CharSet: "utf8", Ports: []int{20000, 20001}, InstMem: 0, - MyCnfConfigs: []byte(`{ - "20000":{ - "client":{"port": "{{mysqld.port}}" }, - "mysql":{"socket": "{{mysqld.datadir}}/mysql.sock" }, - "mysqld":{"binlog_format": "ROW","innodb_io_capacity": "1000","innodb_read_io_threads": "8"}}, - "20001":{ - "client":{"port": "{{mysqld.port}}"}, - "mysql":{"socket": "{{mysqld.datadir}}/mysql.sock"}, - "mysqld":{"binlog_format": "ROW","innodb_io_capacity": "2000","innodb_read_io_threads": "10"}}}`), SuperAccount: AdditionalAccount{ User: "user", Pwd: "xxx", @@ -161,6 +158,7 @@ func (i *InstallMySQLComp) InitDefaultParam() (err error) { i.WorkPassword = "" i.AvoidReset = false + i.Params.MyCnfConfigs = i.MySQLConfigParams.MyCnfConfigs var mountpoint string i.InstallDir = cst.UsrLocal i.MysqlInstallDir = cst.MysqldInstallPath diff --git a/dbm-services/mysql/db-tools/dbactuator/pkg/components/mysql/pt_table_checksum.go b/dbm-services/mysql/db-tools/dbactuator/pkg/components/mysql/pt_table_checksum.go index dbe1697759..36d2490271 100644 --- a/dbm-services/mysql/db-tools/dbactuator/pkg/components/mysql/pt_table_checksum.go +++ b/dbm-services/mysql/db-tools/dbactuator/pkg/components/mysql/pt_table_checksum.go @@ -199,7 +199,7 @@ func (c *PtTableChecksumComp) GenerateConfigFile() (err error) { Args: []map[string]interface{}{ { "name": "run-time", - "value": c.Params.RuntimeHour, + "value": fmt.Sprintf("%dh", c.Params.RuntimeHour), }, }, }, diff --git a/dbm-services/mysql/db-tools/mysql-monitor/pkg/itemscollect/mysqlerrlog/mysql_critical.go b/dbm-services/mysql/db-tools/mysql-monitor/pkg/itemscollect/mysqlerrlog/mysql_critical.go index 27a9c4a064..ccddfef995 100644 --- a/dbm-services/mysql/db-tools/mysql-monitor/pkg/itemscollect/mysqlerrlog/mysql_critical.go +++ b/dbm-services/mysql/db-tools/mysql-monitor/pkg/itemscollect/mysqlerrlog/mysql_critical.go @@ -27,6 +27,7 @@ func init() { "restarting transaction", "slave SQL thread was killed", `\[Warning\]`, + "Failed to execute mysql_file_stat on file", }, "|", ), diff --git a/dbm-services/mysql/db-tools/mysql-table-checksum/Makefile b/dbm-services/mysql/db-tools/mysql-table-checksum/Makefile index c7debb8937..2db9af6057 100644 --- a/dbm-services/mysql/db-tools/mysql-table-checksum/Makefile +++ b/dbm-services/mysql/db-tools/mysql-table-checksum/Makefile @@ -14,21 +14,23 @@ DEV_BUILD_FLAG="-X ${MODULE}/cmd.version="develop" -X ${MODULE}/cmd.gitHash="" " release-bin: CGO_ENABLED=0 GOARCH=amd64 GOOS=linux go build -gcflags="all=-trimpath=${PWD}" -asmflags="all=-trimpath=${PWD}" -ldflags ${RELEASE_BUILD_FLAG} -o ${OUTPUT_DIR}/${PROJ} chmod +x pt-table-checksum pt-table-sync + cp -ar lib ${OUTPUT_DIR}/ cp -a pt-table-checksum ${OUTPUT_DIR}/ cp -a pt-table-sync ${OUTPUT_DIR}/ cp -a checksum_history.sql ${OUTPUT_DIR}/ # 为了保证 tar 压缩得到的包的 md5 一致,这里修改文件的时间戳,同时把 tar -zcf 拆为 tar -cf && gzip find ${OUTPUT_DIR} -exec touch -t ${GITDATE} {} + - tar -C ${OUTPUT_DIR} --numeric-owner -cvf ${OUTPUT_DIR}/${TAR_PKG} ${PROJ} pt-table-checksum pt-table-sync checksum_history.sql + tar -C ${OUTPUT_DIR} --numeric-owner -cvf ${OUTPUT_DIR}/${TAR_PKG} ${PROJ} pt-table-checksum pt-table-sync checksum_history.sql lib gzip -n -f ${OUTPUT_DIR}/${TAR_PKG} .PHONY: dev-bin dev-bin: go build -ldflags ${DEV_BUILD_FLAG} -o ${OUTPUT_DIR}/${PROJ} + cp -ar lib ${OUTPUT_DIR}/ cp -a pt-table-checksum ${OUTPUT_DIR}/ cp -a pt-table-sync ${OUTPUT_DIR}/ cp -a checksum_history ${OUTPUT_DIR}/ - tar -C ${OUTPUT_DIR} -zcf ${OUTPUT_DIR}/${PKG} ${PROJ} pt-table-checksum pt-table-sync + tar -C ${OUTPUT_DIR} -zcf ${OUTPUT_DIR}/${PKG} ${PROJ} pt-table-checksum pt-table-sync lib .PHONY: clean clean: diff --git a/dbm-services/mysql/db-tools/mysql-table-checksum/lib/Sys/SigAction.pm b/dbm-services/mysql/db-tools/mysql-table-checksum/lib/Sys/SigAction.pm new file mode 100644 index 0000000000..3a60da4804 --- /dev/null +++ b/dbm-services/mysql/db-tools/mysql-table-checksum/lib/Sys/SigAction.pm @@ -0,0 +1,449 @@ +# +# Copyright (c) 2004-2009 Lincoln A. Baxter +# +# You may distribute under the terms of either the GNU General Public +# License or the Artistic License, as specified in the Perl README file, + +package Sys::SigAction; +require 5.005; +use strict; +#use warnings; +use POSIX ':signal_h' ; +require Exporter; +use vars qw( $VERSION @ISA @EXPORT_OK %EXPORT_TAGS ); + +#use Data::Dumper; + +@ISA = qw( Exporter ); +@EXPORT_OK = qw( set_sig_handler timeout_call sig_name sig_number ); +$VERSION = '0.11'; + +use Config; +my %signame = (); +my %signo = (); +{ + defined $Config{sig_name} or die "This OS does not support signals?"; + my $i = 0; # Config prepends fake 0 signal called "ZERO". + my @numbers = split( ' ' ,$Config{sig_num} ); + foreach my $name (split(' ', $Config{sig_name})) + { + $signo{$name} = $numbers[$i]; + $signame{$signo{$name}} = $name; + #print "name=$name num=" .$numbers[$i] ."\n" ; + $i++; + } +} + +sub sig_name { + my ($sig) = @_; + return $sig if $sig !~ m/^\d+$/ ; + return $signame{$sig} ; +} +sub sig_number { + my ($sig) = @_; + return $sig if $sig =~ m/^\d+$/; + return $signo{$sig} ; +} +#if ( $] < 5008 ) { +# #over write definitions of sig_name and sig_number +# sub sig_name { warn "sig_name() not supported on perl versions < 5.8.0"; } +# sub sig_number { warn "sig_number() not supported on perl versions < 5.8.0"; } +#} + +my $use_sigaction = ( $] >= 5.008 and $Config{d_sigaction} ); + +sub _attrs_warning($) +{ + my ( $attrs ) = @_ ; + #my $act = POSIX::SigAction->new( $handler ,$mask ,$attrs->{flags} ,$attrs->{safe} ); + #steve ( SPURKIS@cpan.org submitted http://rt.cpan.org/Ticket/Display.html?id=19916 + # puts out the above liin is a mis-interpretation of the API for POSIX::SigAcation + # so here is the fix (per his suggestion)... lab: + # + #http://rt.cpan.org/Public/Bug/Display.html?id=21777 + #2006-09-29: in perl 5.8.0 (RH) $act->safe() is broken + # safe is not available until 5.8.2 + # DAMN... it was in my docs too... + if ( exists( $attrs->{safe} ) ) + { + if ( ( $] < 5.008002 ) && defined($attrs->{safe}) && $attrs->{safe} ) + { + warn "safe mode is not supported in perl versions less than 5.8.2"; + delete $attrs->{safe}; + } + } + +} +sub set_sig_handler( $$;$$ ) +{ + my ( $sig ,$handler ,$attrs ) = @_; + $attrs = {} if not defined $attrs; + _attrs_warning($attrs); + if ( not $use_sigaction ) + { + #warn '$flags not supported in perl versions < 5.8' if $] < 5.008 and defined $flags; + $sig = sig_name( $sig ); + my $ohandler = $SIG{$sig}; + $SIG{$sig} = $handler; + return if not defined wantarray; + return Sys::SigAction->new( $sig ,$ohandler ); + } + my $act = mk_sig_action( $handler ,$attrs ); + return set_sigaction( sig_number($sig) ,$act ); +} +sub mk_sig_action($$) +{ + my ( $handler ,$attrs ) = @_; + die 'mk_sig_action requires perl 5.8.0 or later' if $] < 5.008; + $attrs->{flags} = 0 if not defined $attrs->{flags}; + $attrs->{mask} = [] if not defined $attrs->{mask}; + #die '$sig is not defined' if not defined $sig; + #$sig = sig_number( $sig ); + my @siglist = (); + foreach (@{$attrs->{mask}}) { push( @siglist ,sig_number($_)); }; + my $mask = POSIX::SigSet->new( @siglist ); + + my $act = POSIX::SigAction->new( $handler ,$mask ,$attrs->{flags} ); + + #apply patch suggested by CPAN bugs + # http://rt.cpan.org/Ticket/Display.html?id=39599 + # http://rt.cpan.org/Ticket/Display.html?id=39946 (these are dups) + #using safe mode with masking signals still breaks the masking of signals! + $act->safe($attrs->{safe}) if defined $attrs->{safe}; + return $act; +} + + +sub set_sigaction($$) +{ + my ( $sig ,$action ) = @_; + die 'set_sigaction() requires perl 5.8.0 or later' if $] < 5.008; + die '$sig is not defined' if not defined $sig; + die '$action is not a POSIX::SigAction' if not UNIVERSAL::isa( $action ,'POSIX::SigAction' ); + $sig = sig_number( $sig ); + if ( defined wantarray ) + { + my $oact = POSIX::SigAction->new(); + sigaction( $sig ,$action ,$oact ); + return Sys::SigAction->new( $sig ,$oact ); + } + else + { + sigaction( $sig ,$action ); + } +} + +use constant TIMEDOUT => {}; +sub timeout_call( $$;$ ) +{ + my ( $timeout ,$code ) = @_; + my $timed_out = 0; + my $ex; + eval { + #lab-20060625 unecessary: my $h = sub { $timed_out = 1; die TIMEDOUT; }; + my $sa = set_sig_handler( SIGALRM ,sub { $timed_out = 1; die TIMEDOUT; } ); + alarm( $timeout ); + &$code; + alarm(0); + }; + alarm(0); + if ($@) + { + #print "$@\n" ; + die $@ if not ref $@; + die $@ if $@ != TIMEDOUT; + } + return $timed_out; +} +sub new { + my ($class,$sig,$act) = @_; + bless { SIG=>$sig ,ACT => $act } ,$class ; +} +sub DESTROY +{ + if ( $use_sigaction ) + { + set_sigaction( $_[0]->{'SIG'} ,$_[0]->{'ACT'} ); + } + else + { + #set it to default if not defined (suppress undefined warning) + $SIG{$_[0]->{'SIG'}} = defined $_[0]->{'ACT'} ? $_[0]->{'ACT'} : 'DEFAULT' ; + } + return; +} + +1; + +__END__ + +=head1 NAME + +Sys::SigAction - Perl extension for Consistent Signal Handling + +=head1 SYNOPSYS + + #do something non-interupt able + use Sys::SigAction qw( set_sig_handler ); + { + my $h = set_sig_handler( 'INT' ,'mysubname' ,{ flags => SA_RESTART } ); + ... do stuff non-interupt able + } #signal handler is reset when $h goes out of scope + +or + + #timeout a system call: + use Sys::SigAction qw( set_sig_handler ); + eval { + my $h = set_sig_handler( 'ALRM' ,\&mysubname ,{ mask=>[ 'ALRM' ] ,safe=>1 } ); + alarm(2) + ... do something you want to timeout + alarm(0); + }; #signal handler is reset when $h goes out of scope + alarm(0); + if ( $@ ) ... + +or + + use Sys::SigAction; + my $alarm = 0; + eval { + my $h = Sys::SigAction::set_sig_handler( 'ALRM' ,sub { $alarm = 1; } ); + alarm(2) + ... do something you want to timeout + alarm(0); + }; + alarm(0); + if ( $@ or $alarm ) ... + +or + + use Sys::SigAction; + my $alarm = 0; + Sys::SigAction::set_sig_handler( 'TERM' ,sub { "DUMMY" } ); + #code from here on uses new handler.... (old handler is forgotten) + +or + + use Sys::SigAction qw( timeout_call ); + if ( timeout_call( 5 ,sub { $retval = DoSomething( @args ); } ) + { + print "DoSomething() timed out\n" ; + } + +=head1 ABSTRACT + +This module implements C, which sets up a signal +handler and (optionally) returns an object which causes the signal +handler to be reset to the previous value, when it goes out of scope. + +Also implemented is C which takes a timeout value and +a code reference, and executes the code reference wrapped with an +alarm timeout. + +Finally, two convenience routines are defined which allow one to get the +signal name from the number -- C, and get the signal number +from the name -- C. + +=head1 DESCRIPTION + +Prior to version 5.8.0 perl implemented 'unsafe' signal handling. +The reason it is consider unsafe, is that there is a risk that a +signal will arrive, and be handled while perl is changing internal +data structures. This can result in all kinds of subtle and not so +subtle problems. For this reason it has always been recommended that +one do as little as possible in a signal handler, and only variables +that already exist be manipulated. + +Perl 5.8.0 and later versions implements 'safe' signal handling +on platforms which support the POSIX sigaction() function. This is +accomplished by having perl note that a signal has arrived, but deferring +the execution of the signal handler until such time as it is safe to do +so. Unfortunately these changes can break some existing scripts, if they +depended on a system routine being interupted by the signal's arrival. +The perl 5.8.0 implementation was modified further in version 5.8.2. + +From the perl 5.8.2 B man page: + + The default delivery policy of signals changed in Perl 5.8.0 + from immediate (also known as "unsafe") to deferred, also + known as "safe signals". + + +The implementation of this changed the C with which +the signal handler is installed by perl, and it causes some +system routines (like connect()) to return EINTR, instead of another error +when the signal arrives. The problem comes when the code that made +the system call sees the EINTR code and decides it's going to call it +again before returning. Perl doesn't do this but some libraries do, including for +instance, the Oracle OCI library. + +Thus the 'deferred signal' approach (as implemented by default in +perl 5.8 and later) results in some system calls being +retried prior to the signal handler being called by perl. +This breaks timeout logic for DBD-Oracle which works with +earlier versions of perl. This can be particularly vexing, +the host on which a database resides is not available: Cconnect()> +hangs for minutes before returning an error (and cannot even be interupted +with control-C, even when the intended timeout is only seconds). +This is because SIGINT appears to be deferred as well. The +result is that it is impossible to implement open timeouts with code +that looks like this in perl 5.8.0 and later: + + eval { + local $SIG{ALRM} = sub { die "timeout" }; + alarm 2; + $sth = DBI->connect(...); + alarm 0; + }; + alarm 0; + die if $@; + +The solution, if your system has the POSIX sigaction() function, +is to use perl's C to install the signal handler. +With C, one gets control over both the signal mask, and the +C that are used to install the handler. Further, with perl +5.8.2 and later, a 'safe' switch is provided which can be used to ask +for safe(r) signal handling. + +Using sigaction() ensures that the system call won't be +resumed after it's interrupted, so long as die is called +within the signal handler. This is no longer the case when +one uses C<$SIG{name}> to set signal +handlers in perls >= 5.8.0. + +The usage of sigaction() is not well documented however, and in perl +versions less than 5.8.0, it does not work at all. (But that's OK, because +just setting C<$SIG> does work in that case.) Using sigaction() requires +approximately 4 or 5 lines of code where previously one only had to set +a code reference into the %SIG hash. + +Unfortunately, at least with perl 5.8.0, the result is that doing this +effectively reverts to the 'unsafe' signals behavior. It is not clear +whether this would be the case in perl 5.8.2, since the safe flag can be used +to ask for safe signal handling. I suspect this separates the logic +which uses the C to install the handler, and whether deferred +signal handling is used. + +The reader should also note, that the behavior of the 'safe' +attribute is not consistent with what this author expected. +Specifically, it appears to disable signal masking. This can be +examined further in the t/safe.t and the t/mask.t regression tests. +Never-the-less, Sys::SigAction provides an easy mechanism for +the user to recover the pre-5.8.0 behavior for signal handling, and the +mask attribute clearly works. (see t/mask.t) If one is looking for +specific safe signal handling behavior that is considered broken, +and the breakage can be demonstrated, then a patch to t/safe.t would be +most welcome. + +This module wraps up the POSIX:: routines and objects necessary to call +sigaction() in a way that is as efficient from a coding perspective as just +setting a localized C<$SIG{SIGNAL}> with a code reference. Further, the +user has control over the C passed to sigaction(). By default, +if no additional args are passed to sigaction(), then the signal handler +will be called when a signal (such as SIGALRM) is delivered. + +Since sigaction() is not fully functional in perl versions less than +5.8, this module implements equivalent behavior using the standard +C<%SIG> array. The version checking and implementation of the 'right' +code is handled by this module, so the user does not have to write perl +version dependent code. The attrs hashref argument to set_sig_handler() +is silently ignored, in perl versions less than 5.8. This module has +been tested with perls as old as 5.005 on solaris. + +It is hoped that with the use of this module, your signal handling +behavior can be coded in a way that does not change from one perl version +to the next, and that sigaction() will be easier for you to use. + +=head1 FUNCTIONS + +=head2 set_sig_handler() + + $sig ,$handler ,$attrs + + +Install a new signal handler and (if not called in a void context) +returning a Sys::SigAction object containing the old signal handler, +which will be restored on object destruction. + + $sig is a signal name (without the 'SIG') or number. + + $handler is either the name (string) of a signal handler + function or a subroutine CODE reference. + + $attrs if defined is a hash reference containing the + following keys: + + flags => the flags the passed sigaction + + ex: SA_RESTART (defined in your signal.h) + + mask => the array reference: signals you + do not want delivered while the signal + handler is executing + + ex: [ SIGINT SIGUSR1 ] or + ex: [ qw( INT USR1 ] + + safe => A boolean value requesting 'safe' signal + handling (only in 5.8.2 and greater) + earlier versions will issue a warning if + you use this + + NOTE: This breaks the signal masking + +=head2 timeout_call() + + $timeout ,$coderef + +Given a code reference, and a timeout value (in seconds), timeout() +will (in an eval) setup a signal handler for SIGALRM (which will die), +set an alarm clock, and execute the code reference. + +If the alarm goes off the code will be interupted. The alarm is +canceled if the code returns before the alarm is fired. The routine +returns true if the code being executed timed out. (was interrupted). +Exceptions thrown by the code executed are propagated out. + +The original signal handler is restored, prior to returning to the caller. + +=head2 sig_name() + +Return the signal name (string) from a signal number. + +ex: + + sig_name( SIGINT ) returns 'INT' + + +=head2 sig_number() + +Return the signal number (integer) from a signal name (minus the SIG part). + +ex: + + sig_number( 'INT' ) returns the integer value of SIGINT; + + +=head1 AUTHOR + + Lincoln A. Baxter + +=head1 COPYRIGHT + + Copyright (c) 2004-2009 Lincoln A. Baxter + All rights reserved. + + You may distribute under the terms of either the GNU General Public + License or the Artistic License, as specified in the Perl README file, + + +=head1 SEE ALSO + + perldoc perlvar + perldoc POSIX + +The dbd-oracle-timeout.pod file included with this module. This includes a DBD-Oracle +test script, which illustrates the use of this module with the DBI with the DBD-Oracle +driver. + diff --git a/dbm-services/mysql/db-tools/mysql-table-checksum/pkg/checker/run_command.go b/dbm-services/mysql/db-tools/mysql-table-checksum/pkg/checker/run_command.go index bcf33eb626..0567298b30 100644 --- a/dbm-services/mysql/db-tools/mysql-table-checksum/pkg/checker/run_command.go +++ b/dbm-services/mysql/db-tools/mysql-table-checksum/pkg/checker/run_command.go @@ -1,6 +1,7 @@ package checker import ( + "bufio" "bytes" "context" "errors" @@ -8,6 +9,8 @@ import ( "log/slog" "os" "os/exec" + "path/filepath" + "strings" "time" "dbm-services/mysql/db-tools/mysql-table-checksum/pkg/config" @@ -16,19 +19,6 @@ import ( var roundStartStr = "_dba_fake_round_start" func (r *Checker) Run() error { - //isEmptyResultTbl, err := r.isEmptyResultTbl() - //if err != nil { - // return err - //} - //if isEmptyResultTbl { - // err := r.writeFakeResult(roundStartStr, roundStartStr) - // if err != nil { - // slog.Error("write round start", slog.String("error", err.Error())) - // return err - // } - // slog.Info("round start") - //} - stackDepth := 0 RunCheckLabel: @@ -186,7 +176,13 @@ func (r *Checker) run() (output *Output, err error, pterr error) { r.cancel = cancel // stderr.Reset() - command := exec.CommandContext(ctx, r.Config.PtChecksum.Path, r.args...) + extLibDir := filepath.Join(filepath.Dir(r.Config.PtChecksum.Path), "lib") + //command := exec.CommandContext(ctx,"perl", r.Config.PtChecksum.Path, r.args...) + command := exec.CommandContext(ctx, "perl", append( + []string{ + extLibDir, + r.Config.PtChecksum.Path, + }, r.args...)...) command.Stdout = &stdout command.Stderr = &stderr slog.Info("build command", slog.String("pt-table-checksum command", command.String())) @@ -244,10 +240,17 @@ func (r *Checker) run() (output *Output, err error, pterr error) { 1, 2, 4 肯定要当错误, 其他的先扔回去? */ + var eLines []string if stderr.Len() > 0 { - err = errors.New(stderr.String()) - slog.Error("run pt-table-checksum got un-docoument error", slog.String("error", err.Error())) - return nil, err, nil + scanner := bufio.NewScanner(strings.NewReader(stderr.String())) + scanner.Split(bufio.ScanLines) + for scanner.Scan() { + line := scanner.Text() + line = strings.TrimSpace(line) + if line != "" && !strings.Contains(line, "There is no good index and the table is oversized") { + eLines = append(eLines, line) + } + } } ptFlags := make([]PtExitFlag, 0) @@ -274,9 +277,13 @@ func (r *Checker) run() (output *Output, err error, pterr error) { if ptErr != nil && (ptErr.ExitCode()&1 != 0 || ptErr.ExitCode()&2 != 0 || ptErr.ExitCode()&4 != 0) { pterr = errors.New(output.String()) - slog.Error("run pt-table-checksum bad flag found", slog.String("error", err.Error())) - _, _ = fmt.Fprintf(os.Stderr, output.String()) - return output, nil, pterr + if len(eLines) > 0 { + slog.Error( + "run pt-table-checksum bad flag found", + slog.String("error", strings.Join(eLines, "\n"))) + _, _ = fmt.Fprintf(os.Stderr, output.String()) + return output, nil, pterr + } } return output, nil, nil diff --git a/dbm-services/mysql/db-tools/mysql-table-checksum/pt-table-checksum b/dbm-services/mysql/db-tools/mysql-table-checksum/pt-table-checksum index ac64f31f93..30c67a62ee 100755 --- a/dbm-services/mysql/db-tools/mysql-table-checksum/pt-table-checksum +++ b/dbm-services/mysql/db-tools/mysql-table-checksum/pt-table-checksum @@ -4,8 +4,41 @@ # See "COPYRIGHT, LICENSE, AND WARRANTY" at the end of this file for legal # notices and disclaimers. +use FindBin qw($Bin); +BEGIN { + my $Speclib = $Bin; + my $libPath; + my $arch=`/bin/uname -p`; + if ($arch =~ 'x86_64') { + if ( $] eq '5.016003' ){#perl version 5.16 ,do nothing,default DBI is ok + print "perl version 5.16 and add libpath perllib516\n"; + $libPath="$Speclib/../lib/perllib516"; + } + elsif ( $] =~ '5.01' ){ # perl version 5.10.0 or 5.10.1 or greater + #$libPath="$Speclib/../lib/5.10.0-64bit"; + } + elsif ( $] eq '5.008008' ){ + $libPath="$Speclib/../lib/5.8.8-64bit"; + } + } + else { + if ( $] eq '5.008008' ) { + $libPath="$Speclib/../lib/5.8.8"; + } + elsif ( $] eq '5.008006' ) { + $libPath="$Speclib/../lib/5.8.6"; + } + else { + $libPath="$Speclib/../lib/5.6.1"; + } + } + unshift( @INC, $libPath ); + unshift( @INC, "$Speclib/../lib" ); +} + use strict; use warnings FATAL => 'all'; +use Sys::SigAction qw( set_sig_handler ); # This tool is "fat-packed": most of its dependent modules are embedded # in this file. Setting %INC to this file for each module makes Perl aware @@ -39,7 +72,6 @@ BEGIN { Transformers Progress ReplicaLagWaiter - MySQLConfig MySQLStatusWaiter WeightedAvgRate IndexLength @@ -58,7 +90,7 @@ BEGIN { { package Percona::Toolkit; -our $VERSION = '3.3.2'; +our $VERSION = '3.0.4'; use strict; use warnings FATAL => 'all'; @@ -342,7 +374,7 @@ sub _split_url { or die(qq/SSL certificate not valid for $host\n/); } } - + $self->{host} = $host; $self->{port} = $port; @@ -797,16 +829,15 @@ eval { require HTTP::Micro; }; -my $home = $ENV{HOME} || $ENV{HOMEPATH} || $ENV{USERPROFILE} || '.'; -my @vc_dirs = ( - '/etc/percona', - '/etc/percona-toolkit', - '/tmp', - "$home", -); - { my $file = 'percona-version-check'; + my $home = $ENV{HOME} || $ENV{HOMEPATH} || $ENV{USERPROFILE} || '.'; + my @vc_dirs = ( + '/etc/percona', + '/etc/percona-toolkit', + '/tmp', + "$home", + ); sub version_check_file { foreach my $dir ( @vc_dirs ) { @@ -817,7 +848,7 @@ my @vc_dirs = ( } PTDEBUG && _d('Version check file', $file, 'in', $ENV{PWD}); return $file; # in the CWD - } + } } sub version_check_time_limit { @@ -834,11 +865,11 @@ sub version_check { PTDEBUG && _d('FindBin::Bin:', $FindBin::Bin); if ( !$args{force} ) { if ( $FindBin::Bin - && (-d "$FindBin::Bin/../.bzr" || + && (-d "$FindBin::Bin/../.bzr" || -d "$FindBin::Bin/../../.bzr" || - -d "$FindBin::Bin/../.git" || - -d "$FindBin::Bin/../../.git" - ) + -d "$FindBin::Bin/../.git" || + -d "$FindBin::Bin/../../.git" + ) ) { PTDEBUG && _d("$FindBin::Bin/../.bzr disables --version-check"); return; @@ -862,7 +893,7 @@ sub version_check { PTDEBUG && _d(scalar @$instances_to_check, 'instances to check'); return unless @$instances_to_check; - my $protocol = 'https'; + my $protocol = 'https'; eval { require IO::Socket::SSL; }; if ( $EVAL_ERROR ) { PTDEBUG && _d($EVAL_ERROR); @@ -1023,46 +1054,6 @@ sub get_instance_id { } -sub get_uuid { - my $uuid_file = '/.percona-toolkit.uuid'; - foreach my $dir (@vc_dirs) { - my $filename = $dir.$uuid_file; - my $uuid=_read_uuid($filename); - return $uuid if $uuid; - } - - my $filename = $ENV{"HOME"} . $uuid_file; - my $uuid = _generate_uuid(); - - open(my $fh, '>', $filename) or die "Could not open file '$filename' $!"; - print $fh $uuid; - close $fh; - - return $uuid; -} - -sub _generate_uuid { - return sprintf+($}="%04x")."$}-$}-$}-$}-".$}x3,map rand 65537,0..7; -} - -sub _read_uuid { - my $filename = shift; - my $fh; - - eval { - open($fh, '<:encoding(UTF-8)', $filename); - }; - return if ($EVAL_ERROR); - - my $uuid; - eval { $uuid = <$fh>; }; - return if ($EVAL_ERROR); - - chomp $uuid; - return $uuid; -} - - sub pingback { my (%args) = @_; my @required_args = qw(url instances); @@ -1088,7 +1079,7 @@ sub pingback { ); die "Failed to parse server requested programs: $response->{content}" if !scalar keys %$items; - + my $versions = get_versions( items => $items, instances => $instances, @@ -1099,7 +1090,7 @@ sub pingback { my $client_content = encode_client_response( items => $items, versions => $versions, - general_id => get_uuid(), + general_id => md5_hex( hostname() ), ); my $client_response = { @@ -1347,7 +1338,7 @@ sub get_from_mysql { if ($item->{item} eq 'MySQL' && $item->{type} eq 'mysql_variable') { @{$item->{vars}} = grep { $_ eq 'version' || $_ eq 'version_comment' } @{$item->{vars}}; } - + my @versions; my %version_for; @@ -1477,7 +1468,7 @@ sub parse { foreach my $key ( keys %$opts ) { PTDEBUG && _d('Finding value for', $key); $final_props{$key} = $given_props{$key}; - if ( !defined $final_props{$key} + if ( !defined $final_props{$key} && defined $prev->{$key} && $opts->{$key}->{copy} ) { $final_props{$key} = $prev->{$key}; @@ -1593,7 +1584,8 @@ sub get_dbh { RaiseError => 1, PrintError => 0, ShowErrorStatement => 1, - mysql_enable_utf8 => ($cxn_string =~ m/charset=utf8/i ? 1 : 0), + #mysql_enable_utf8 => ($cxn_string =~ m/charset=utf8/i ? 1 : 0), + mysql_enable_utf8 => 1, }; @{$defaults}{ keys %$opts } = values %$opts; if (delete $defaults->{L}) { # L for LOAD DATA LOCAL INFILE, our own extension @@ -1617,7 +1609,7 @@ sub get_dbh { my $dbh; my $tries = 2; while ( !$dbh && $tries-- ) { - PTDEBUG && _d($cxn_string, ' ', $user, ' ', $pass, + PTDEBUG && _d($cxn_string, ' ', $user, ' ', $pass, join(', ', map { "$_=>$defaults->{$_}" } keys %$defaults )); $dbh = eval { DBI->connect($cxn_string, $user, $pass, $defaults) }; @@ -1666,9 +1658,9 @@ sub get_dbh { $self->set_vars($dbh, $vars); } - $sql = 'SELECT @@SQL_MODE'; + $sql = 'show variables like \'SQL_MODE\';'; PTDEBUG && _d($dbh, $sql); - my ($sql_mode) = eval { $dbh->selectrow_array($sql) }; + my ($sql_mode) = eval { ${$dbh->selectrow_arrayref($sql)}[1] }; if ( $EVAL_ERROR ) { die "Error getting the current SQL_MODE: $EVAL_ERROR"; } @@ -1685,28 +1677,6 @@ sub get_dbh { . ": $EVAL_ERROR"; } } - my ($mysql_version) = eval { $dbh->selectrow_array('SELECT VERSION()') }; - if ($EVAL_ERROR) { - die "Cannot get MySQL version: $EVAL_ERROR"; - } - - my (undef, $character_set_server) = eval { $dbh->selectrow_array("SHOW VARIABLES LIKE 'character_set_server'") }; - if ($EVAL_ERROR) { - die "Cannot get MySQL var character_set_server: $EVAL_ERROR"; - } - - if ($mysql_version =~ m/^(\d+)\.(\d)\.(\d+).*/) { - if ($1 >= 8 && $character_set_server =~ m/^utf8/) { - $dbh->{mysql_enable_utf8} = 1; - my $msg = "MySQL version $mysql_version >= 8 and character_set_server = $character_set_server\n". - "Setting: SET NAMES $character_set_server"; - PTDEBUG && _d($msg); - eval { $dbh->do("SET NAMES 'utf8mb4'") }; - if ($EVAL_ERROR) { - die "Cannot SET NAMES $character_set_server: $EVAL_ERROR"; - } - } - } PTDEBUG && _d('DBH info: ', $dbh, @@ -1774,6 +1744,7 @@ sub set_vars { foreach my $var ( sort keys %$vars ) { my $val = $vars->{$var}->{val}; + my $version_hint = $vars->{$var}->{version_hint}; (my $quoted_var = $var) =~ s/_/\\_/; my ($var_exists, $current_val); @@ -1797,8 +1768,13 @@ sub set_vars { 'is already', $val); next; } - - my $sql = "SET SESSION $var=$val"; + + my $sql=""; + if($version_hint){ + $sql = "/*!$version_hint SET SESSION $var=$val */"; + }else{ + $sql = "SET SESSION $var=$val"; + } PTDEBUG && _d($dbh, $sql); eval { $dbh->do($sql) }; if ( my $set_error = $EVAL_ERROR ) { @@ -1815,7 +1791,7 @@ sub set_vars { } } - return; + return; } sub _d { @@ -1896,7 +1872,7 @@ sub new { rules => [], # desc of rules for --help mutex => [], # rule: opts are mutually exclusive atleast1 => [], # rule: at least one opt is required - disables => {}, # rule: opt disables other opts + disables => {}, # rule: opt disables other opts defaults_to => {}, # rule: opt defaults to value of other opt DSNParser => undef, default_files => [ @@ -2059,7 +2035,7 @@ sub _pod_to_specs { } push @specs, { - spec => $self->{parse_attributes}->($self, $option, \%attribs), + spec => $self->{parse_attributes}->($self, $option, \%attribs), desc => $para . (defined $attribs{default} ? " (default $attribs{default})" : ''), group => ($attribs{'group'} ? $attribs{'group'} : 'default'), @@ -2150,7 +2126,7 @@ sub _parse_specs { $self->{opts}->{$long} = $opt; } else { # It's an option rule, not a spec. - PTDEBUG && _d('Parsing rule:', $opt); + PTDEBUG && _d('Parsing rule:', $opt); push @{$self->{rules}}, $opt; my @participants = $self->_get_participants($opt); my $rule_ok = 0; @@ -2195,7 +2171,7 @@ sub _parse_specs { PTDEBUG && _d('Option', $long, 'disables', @participants); } - return; + return; } sub _get_participants { @@ -2282,7 +2258,7 @@ sub _set_option { } sub get_opts { - my ( $self ) = @_; + my ( $self ) = @_; foreach my $long ( keys %{$self->{opts}} ) { $self->{opts}->{$long}->{got} = 0; @@ -2413,7 +2389,7 @@ sub _check_opts { else { $err = join(', ', map { "--$self->{opts}->{$_}->{long}" } - grep { $_ } + grep { $_ } @restricted_opts[0..scalar(@restricted_opts) - 2] ) . ' or --'.$self->{opts}->{$restricted_opts[-1]}->{long}; @@ -2423,7 +2399,7 @@ sub _check_opts { } } - elsif ( $opt->{is_required} ) { + elsif ( $opt->{is_required} ) { $self->save_error("Required option --$long must be specified"); } @@ -2807,7 +2783,7 @@ sub clone { $clone{$scalar} = $self->{$scalar}; } - return bless \%clone; + return bless \%clone; } sub _parse_size { @@ -2902,11 +2878,15 @@ sub set_vars { if ( $default_vars ) { %default_vars = map { my $var_val = $_; - my ($var, $val) = $var_val =~ m/([^\s=]+)=(\S+)/; + #such as:innodb_lock_wait_timeout=1 /*!50524 */; + #the sql that pt will run is '/*!50524 set SESSION innodb_lock_wait_timeout=1 /' + #it means that only the version gt mysql 5.5.24 will run 'set SESSION innodb_lock_wait_timeout=1' + my ($var, $val,$verion_info,$version_hint) = $var_val =~ m/([^\s=]+)=(\S+?)\s*(\/\*\!(\d+)\s*\*\/)?$/; die "Invalid --set-vars value: $var_val\n" unless $var && defined $val; $var => { val => $val, default => 1, + version_hint=>$version_hint }; } split("\n", $default_vars); } @@ -3321,7 +3301,7 @@ sub extends { sub _load_module { my ($class) = @_; - + (my $file = $class) =~ s{::|'}{/}g; $file .= '.pm'; { local $@; eval { require "$file" } } # or warn $@; @@ -3352,7 +3332,7 @@ sub has { my $caller = scalar caller(); my $class_metadata = Lmo::Meta->metadata_for($caller); - + for my $attribute ( ref $names ? @$names : $names ) { my %args = @_; my $method = ($args{is} || '') eq 'ro' @@ -3371,16 +3351,16 @@ sub has { if ( my $type_check = $args{isa} ) { my $check_name = $type_check; - + if ( my ($aggregate_type, $inner_type) = $type_check =~ /\A(ArrayRef|Maybe)\[(.*)\]\z/ ) { $type_check = Lmo::Types::_nested_constraints($attribute, $aggregate_type, $inner_type); } - + my $check_sub = sub { my ($new_val) = @_; Lmo::Types::check_type_constaints($attribute, $type_check, $check_name, $new_val); }; - + $class_metadata->{$attribute}{isa} = [$check_name, $check_sub]; my $orig_method = $method; $method = sub { @@ -3759,7 +3739,7 @@ sub get_id { my $sql = q{SHOW STATUS LIKE 'wsrep\_local\_index'}; my (undef, $wsrep_local_index) = $cxn->dbh->selectrow_array($sql); PTDEBUG && _d("Got cluster wsrep_local_index: ",$wsrep_local_index); - $unique_id = $wsrep_local_index."|"; + $unique_id = $wsrep_local_index."|"; foreach my $val ('server\_id', 'wsrep\_sst\_receive\_address', 'wsrep\_node\_name', 'wsrep\_node\_address') { my $sql = "SHOW VARIABLES LIKE '$val'"; PTDEBUG && _d($cxn->name, $sql); @@ -3789,7 +3769,7 @@ sub is_cluster_node { PTDEBUG && _d($sql); #don't invoke name() if it's not a Cxn! } else { - $dbh = $cxn->dbh(); + $dbh = $cxn->dbh(); PTDEBUG && _d($cxn->name, $sql); } @@ -3921,7 +3901,7 @@ sub find_cluster_nodes { my $dp = $args{DSNParser}; my $make_cxn = $args{make_cxn}; - + my $sql = q{SHOW STATUS LIKE 'wsrep\_incoming\_addresses'}; PTDEBUG && _d($sql); my (undef, $addresses) = $dbh->selectrow_array($sql); @@ -4001,7 +3981,7 @@ sub autodetect_nodes { my $new_nodes = []; return $new_nodes unless @$nodes; - + for my $node ( @$nodes ) { my $nodes_found = $self->find_cluster_nodes( dbh => $node->dbh(), @@ -4033,12 +4013,12 @@ sub autodetect_nodes { ); my @new_slave_nodes = grep { $self->is_cluster_node($_) } @$new_slaves; - + my $slaves_of_slaves = $self->autodetect_nodes( %args, nodes => \@new_slave_nodes, ); - + my @autodetected_nodes = ( @$new_nodes, @$new_slaves, @$slaves_of_slaves ); return \@autodetected_nodes; } @@ -4116,7 +4096,7 @@ sub split_unquote { s/`\z//; s/``/`/g; } - + return ($db, $tbl); } @@ -4499,7 +4479,7 @@ sub parse { my ($name) = $ddl =~ m/CREATE (?:TEMPORARY )?TABLE\s+(`.+?`)/; (undef, $name) = $self->{Quoter}->split_unquote($name) if $name; - $ddl =~ s/(`[^`\n]+`)/\L$1/gm; + $ddl =~ s/(`[^`]+`)/\L$1/g; my $engine = $self->get_engine($ddl); @@ -4510,8 +4490,8 @@ sub parse { my %def_for; @def_for{@cols} = @defs; - my (@nums, @null, @non_generated); - my (%type_for, %is_nullable, %is_numeric, %is_autoinc, %is_generated); + my (@nums, @null); + my (%type_for, %is_nullable, %is_numeric, %is_autoinc); foreach my $col ( @cols ) { my $def = $def_for{$col}; @@ -4528,11 +4508,6 @@ sub parse { push @null, $col; $is_nullable{$col} = 1; } - if ( remove_quoted_text($def) =~ m/\WGENERATED\W/i ) { - $is_generated{$col} = 1; - } else { - push @non_generated, $col; - } $is_autoinc{$col} = $def =~ m/AUTO_INCREMENT/i ? 1 : 0; } @@ -4541,35 +4516,24 @@ sub parse { my ($charset) = $ddl =~ m/DEFAULT CHARSET=(\w+)/; return { - name => $name, - cols => \@cols, - col_posn => { map { $cols[$_] => $_ } 0..$#cols }, - is_col => { map { $_ => 1 } @non_generated }, - null_cols => \@null, - is_nullable => \%is_nullable, - non_generated_cols => \@non_generated, - is_autoinc => \%is_autoinc, - is_generated => \%is_generated, - clustered_key => $clustered_key, - keys => $keys, - defs => \%def_for, - numeric_cols => \@nums, - is_numeric => \%is_numeric, - engine => $engine, - type_for => \%type_for, - charset => $charset, + name => $name, + cols => \@cols, + col_posn => { map { $cols[$_] => $_ } 0..$#cols }, + is_col => { map { $_ => 1 } @cols }, + null_cols => \@null, + is_nullable => \%is_nullable, + is_autoinc => \%is_autoinc, + clustered_key => $clustered_key, + keys => $keys, + defs => \%def_for, + numeric_cols => \@nums, + is_numeric => \%is_numeric, + engine => $engine, + type_for => \%type_for, + charset => $charset, }; } -sub remove_quoted_text { - my ($string) = @_; - $string =~ s/\\['"]//g; - $string =~ s/`[^`]*?`//g; - $string =~ s/"[^"]*?"//g; - $string =~ s/'[^']*?'//g; - return $string; -} - sub sort_indexes { my ( $self, $tbl ) = @_; @@ -4873,7 +4837,7 @@ sub generate_asc_stmt { die "Index '$index' does not exist in table" unless exists $tbl_struct->{keys}->{$index}; - PTDEBUG && _d('Will ascend index', $index); + PTDEBUG && _d('Will ascend index', $index); my @asc_cols = @{$tbl_struct->{keys}->{$index}->{cols}}; if ( $args{asc_first} ) { @@ -4915,7 +4879,6 @@ sub generate_asc_stmt { cols => \@cols, quoter => $q, is_nullable => $tbl_struct->{is_nullable}, - type_for => $tbl_struct->{type_for}, ); $asc_stmt->{boundaries}->{$cmp} = $cmp_where->{where}; } @@ -4936,7 +4899,6 @@ sub generate_cmp_where { my @slice = @{$args{slice}}; my @cols = @{$args{cols}}; my $is_nullable = $args{is_nullable}; - my $type_for = $args{type_for}; my $type = $args{type}; my $q = $self->{Quoter}; @@ -4953,14 +4915,13 @@ sub generate_cmp_where { my $ord = $slice[$j]; my $col = $cols[$ord]; my $quo = $q->quote($col); - my $val = ($col && ($type_for->{$col} || '')) eq 'enum' ? "CAST(? AS UNSIGNED)" : "?"; if ( $is_nullable->{$col} ) { - push @clause, "(($val IS NULL AND $quo IS NULL) OR ($quo = $val))"; + push @clause, "((? IS NULL AND $quo IS NULL) OR ($quo = ?))"; push @r_slice, $ord, $ord; push @r_scols, $col, $col; } else { - push @clause, "$quo = $val"; + push @clause, "$quo = ?"; push @r_slice, $ord; push @r_scols, $col; } @@ -4970,16 +4931,15 @@ sub generate_cmp_where { my $col = $cols[$ord]; my $quo = $q->quote($col); my $end = $i == $#slice; # Last clause of the whole group. - my $val = ($col && ($type_for->{$col} || '')) eq 'enum' ? "CAST(? AS UNSIGNED)" : "?"; if ( $is_nullable->{$col} ) { if ( $type =~ m/=/ && $end ) { - push @clause, "($val IS NULL OR $quo $type $val)"; + push @clause, "(? IS NULL OR $quo $type ?)"; } elsif ( $type =~ m/>/ ) { - push @clause, "($val IS NULL AND $quo IS NOT NULL) OR ($quo $cmp $val)"; + push @clause, "((? IS NULL AND $quo IS NOT NULL) OR ($quo $cmp ?))"; } else { # If $type =~ m/ 'all'; use English qw(-no_match_vars); use constant PTDEBUG => $ENV{PTDEBUG} || 0; -sub check_recursion_method { +sub check_recursion_method { my ($methods) = @_; - if ( @$methods != 1 ) { - if ( grep({ !m/processlist|hosts/i } @$methods) - && $methods->[0] !~ /^dsn=/i ) - { - die "Invalid combination of recursion methods: " - . join(", ", map { defined($_) ? $_ : 'undef' } @$methods) . ". " - . "Only hosts and processlist may be combined.\n" - } - } - else { + if ( @$methods != 1 ) { + if ( grep({ !m/processlist|hosts/i } @$methods) + && $methods->[0] !~ /^dsn=/i ) + { + die "Invalid combination of recursion methods: " + . join(", ", map { defined($_) ? $_ : 'undef' } @$methods) . ". " + . "Only hosts and processlist may be combined.\n" + } + } + else { my ($method) = @$methods; - die "Invalid recursion method: " . ( $method || 'undef' ) - unless $method && $method =~ m/^(?:processlist$|hosts$|none$|cluster$|dsn=)/i; - } + die "Invalid recursion method: " . ( $method || 'undef' ) + unless $method && $method =~ m/^(?:processlist$|hosts$|none$|cluster$|dsn=)/i; + } } sub new { @@ -5161,7 +5121,7 @@ sub get_slaves { my $methods = $self->_resolve_recursion_methods($args{dsn}); return $slaves unless @$methods; - + if ( grep { m/processlist|hosts/i } @$methods ) { my @required_args = qw(dbh dsn); foreach my $arg ( @required_args ) { @@ -5174,7 +5134,7 @@ sub get_slaves { { dbh => $dbh, dsn => $dsn, slave_user => $o->got('slave-user') ? $o->get('slave-user') : '', - slave_password => $o->got('slave-password') ? $o->get('slave-password') : '', + slave_password => $o->got('slave-password') ? $o->get('slave-password') : '', callback => sub { my ( $dsn, $dbh, $level, $parent ) = @_; return unless $level; @@ -5193,7 +5153,8 @@ sub get_slaves { }, } ); - } elsif ( $methods->[0] =~ m/^dsn=/i ) { + } + elsif ( $methods->[0] =~ m/^dsn=/i ) { (my $dsn_table_dsn = join ",", @$methods) =~ s/^dsn=//i; $slaves = $self->get_cxn_from_dsn_table( %args, @@ -5206,7 +5167,7 @@ sub get_slaves { else { die "Unexpected recursion methods: @$methods"; } - + return $slaves; } @@ -5317,13 +5278,7 @@ sub find_slave_hosts { sub _find_slaves_by_processlist { my ( $self, $dsn_parser, $dbh, $dsn ) = @_; - my @connected_slaves = $self->get_connected_slaves($dbh); - my @slaves = $self->_process_slaves_list($dsn_parser, $dsn, \@connected_slaves); - return @slaves; -} -sub _process_slaves_list { - my ($self, $dsn_parser, $dsn, $connected_slaves) = @_; my @slaves = map { my $slave = $dsn_parser->parse("h=$_", $dsn); $slave->{source} = 'processlist'; @@ -5331,15 +5286,12 @@ sub _process_slaves_list { } grep { $_ } map { - my ( $host ) = $_->{host} =~ m/^(.*):\d+$/; + my ( $host ) = $_->{host} =~ m/^([^:]+):/; if ( $host eq 'localhost' ) { $host = '127.0.0.1'; # Replication never uses sockets. } - if ($host =~ m/::/) { - $host = '['.$host.']'; - } $host; - } @$connected_slaves; + } $self->get_connected_slaves($dbh); return @slaves; } @@ -5464,54 +5416,21 @@ sub get_master_dsn { sub get_slave_status { my ( $self, $dbh ) = @_; - if ( !$self->{not_a_slave}->{$dbh} ) { my $sth = $self->{sths}->{$dbh}->{SLAVE_STATUS} ||= $dbh->prepare('SHOW SLAVE STATUS'); PTDEBUG && _d($dbh, 'SHOW SLAVE STATUS'); $sth->execute(); - my ($sss_rows) = $sth->fetchall_arrayref({}); # Show Slave Status rows - - my $ss; - if ( $sss_rows && @$sss_rows ) { - if (scalar @$sss_rows > 1) { - if (!$self->{channel}) { - die 'This server returned more than one row for SHOW SLAVE STATUS but "channel" was not specified on the command line'; - } - my $slave_use_channels; - for my $row (@$sss_rows) { - $row = { map { lc($_) => $row->{$_} } keys %$row }; # lowercase the keys - if ($row->{channel_name}) { - $slave_use_channels = 1; - } - if ($row->{channel_name} eq $self->{channel}) { - $ss = $row; - last; - } - } - if (!$ss && $slave_use_channels) { - die 'This server is using replication channels but "channel" was not specified on the command line'; - } - } else { - if ($sss_rows->[0]->{channel_name} && $sss_rows->[0]->{channel_name} ne $self->{channel}) { - die 'This server is using replication channels but "channel" was not specified on the command line'; - } else { - $ss = $sss_rows->[0]; - } - } + my ($ss) = @{$sth->fetchall_arrayref({})}; - if ( $ss && %$ss ) { - $ss = { map { lc($_) => $ss->{$_} } keys %$ss }; # lowercase the keys - return $ss; - } - if (!$ss && $self->{channel}) { - die "Specified channel name is invalid"; - } + if ( $ss && %$ss ) { + $ss = { map { lc($_) => $ss->{$_} } keys %$ss }; # lowercase the keys + return $ss; } PTDEBUG && _d('This server returns nothing for SHOW SLAVE STATUS'); $self->{not_a_slave}->{$dbh}++; - } + } } sub get_master_status { @@ -5551,20 +5470,8 @@ sub wait_for_master { my $result; my $waited; if ( $master_status ) { - my $slave_status; - eval { - $slave_status = $self->get_slave_status($slave_dbh); - }; - if ($EVAL_ERROR) { - return { - result => undef, - waited => 0, - error =>'Wait for master: this is a multi-master slave but "channel" was not specified on the command line', - }; - } - my $server_version = VersionParser->new($slave_dbh); - my $channel_sql = $server_version > '5.6' && $self->{channel} ? ", '$self->{channel}'" : ''; - my $sql = "SELECT MASTER_POS_WAIT('$master_status->{file}', $master_status->{position}, $timeout $channel_sql)"; + my $sql = "SELECT MASTER_POS_WAIT('$master_status->{file}', " + . "$master_status->{position}, $timeout)"; PTDEBUG && _d($slave_dbh, $sql); my $start = time; ($result) = $slave_dbh->selectrow_array($sql); @@ -5630,9 +5537,6 @@ sub catchup_to_master { timeout => $timeout, master_status => $master_status ); - if ($result->{error}) { - die $result->{error}; - } if ( !defined $result->{result} ) { $slave_status = $self->get_slave_status($slave); if ( !$self->slave_is_running($slave_status) ) { @@ -5743,7 +5647,7 @@ sub short_host { } sub is_replication_thread { - my ( $self, $query, %args ) = @_; + my ( $self, $query, %args ) = @_; return unless $query; my $type = lc($args{type} || 'all'); @@ -5758,7 +5662,7 @@ sub is_replication_thread { if ( !$match ) { if ( ($query->{User} || $query->{user} || '') eq "system user" ) { PTDEBUG && _d("Slave replication thread"); - if ( $type ne 'all' ) { + if ( $type ne 'all' ) { my $state = $query->{State} || $query->{state} || ''; if ( $state =~ m/^init|end$/ ) { @@ -5771,7 +5675,7 @@ sub is_replication_thread { |Reading\sevent\sfrom\sthe\srelay\slog |Has\sread\sall\srelay\slog;\swaiting |Making\stemp\sfile - |Waiting\sfor\sslave\smutex\son\sexit)/xi; + |Waiting\sfor\sslave\smutex\son\sexit)/xi; $match = $type eq 'slave_sql' && $slave_sql ? 1 : $type eq 'slave_io' && !$slave_sql ? 1 @@ -5835,7 +5739,7 @@ sub get_replication_filters { replicate_do_db replicate_ignore_db replicate_do_table - replicate_ignore_table + replicate_ignore_table replicate_wild_do_table replicate_wild_ignore_table ); @@ -5846,7 +5750,7 @@ sub get_replication_filters { $filters{slave_skip_errors} = $row->[1] if $row->[1] && $row->[1] ne 'OFF'; } - return \%filters; + return \%filters; } @@ -5963,11 +5867,11 @@ sub make_row_checksum { die "all columns are excluded by --columns or --ignore-columns" unless @{$cols->{select}}; - + my $query; if ( !$args{no_cols} ) { $query = join(', ', - map { + map { my $col = $_; if ( $col =~ m/UNIX_TIMESTAMP/ ) { my ($real_col) = /^UNIX_TIMESTAMP\((.+?)\)/; @@ -5992,7 +5896,7 @@ sub make_row_checksum { my $colname = $col; $colname =~ s/`//g; my $type = $tbl_struct->{type_for}->{$colname} || ''; - if ($type =~ m/^(CHAR|VARCHAR|BINARY|VARBINARY|BLOB|TEXT|ENUM|SET|JSON)$/i) { + if (($type =~ m/^(CHAR|VARCHAR|BINARY|VARBINARY|BLOB|TEXT|ENUM|SET|JSON)$/i) and (VersionParser->new($args{dbh}) >= '5.5.3')) { push @converted_cols, "convert($col using utf8mb4)"; } else { push @converted_cols, "$col"; @@ -6111,7 +6015,7 @@ sub get_crc_args { my $func = $args{func} || $self->_get_hash_func(%args); my $crc_width = $args{crc_width}|| $self->_get_crc_width(%args, func=>$func); my $crc_type = $args{crc_type} || $self->_get_crc_type(%args, func=>$func); - my $opt_slice; + my $opt_slice; if ( $args{dbh} && $crc_type !~ m/int$/ ) { $opt_slice = $self->_optimize_xor(%args, func=>$func); } @@ -6191,10 +6095,7 @@ sub _get_crc_type { $type = $sth->{mysql_type_name}->[0]; $length = $sth->{mysql_length}->[0]; PTDEBUG && _d($sql, $type, $length); - if ( $type eq 'integer' && $length < 11 ) { - $type = 'int'; - } - elsif ( $type eq 'bigint' && $length < 20 ) { + if ( $type eq 'bigint' && $length < 20 ) { $type = 'int'; } }; @@ -6287,9 +6188,9 @@ sub find_replication_differences { } my ($dbh, $repl_table) = @args{@required_args}; - my $tries = $self->{'OptionParser'}->get('replicate-check-retries') || 1; + + my $tries = $self->{'OptionParser'}->get('replicate-check-retries') || 1; my $diffs; - while ($tries--) { my $sql = "SELECT CONCAT(db, '.', tbl) AS `table`, " @@ -6307,7 +6208,7 @@ sub find_replication_differences { if (!@$diffs || !$tries) { # if no differences are found OR we are out of tries left... last; # get out now } - sleep 1; + sleep 1; } return $diffs; } @@ -6341,6 +6242,7 @@ use strict; use warnings FATAL => 'all'; use English qw(-no_match_vars); use constant PTDEBUG => $ENV{PTDEBUG} || 0; +use Sys::SigAction qw( set_sig_handler ); use Data::Dumper; $Data::Dumper::Indent = 1; @@ -6378,128 +6280,58 @@ sub new { my @cols = grep { !$ignore_col->{$_} } @$all_cols; my $self; if ( $nibble_params->{one_nibble} ) { - my $params = _one_nibble(\%args, \@cols, $where, $tbl, \%comments); - $self = { - %args, - one_nibble => 1, - limit => 0, - nibble_sql => $params->{nibble_sql}, - explain_nibble_sql => $params->{explain_nibble_sql}, - }; - } else { - my $params = _nibble_params($nibble_params, $tbl, \%args, \@cols, $chunk_size, $where, \%comments, $q); - $self = { - %args, - index => $params->{index}, - limit => $params->{limit}, - first_lb_sql => $params->{first_lb_sql}, - last_ub_sql => $params->{last_ub_sql}, - ub_sql => $params->{ub_sql}, - nibble_sql => $params->{nibble_sql}, - explain_first_lb_sql => $params->{explain_first_lb_sql}, - explain_ub_sql => $params->{explain_ub_sql}, - explain_nibble_sql => $params->{explain_nibble_sql}, - resume_lb_sql => $params->{resume_lb_sql}, - sql => $params->{sql}, - }; - } - - $self->{row_est} = $nibble_params->{row_est}, - $self->{nibbleno} = 0; - $self->{have_rows} = 0; - $self->{rowno} = 0; - $self->{oktonibble} = 1; - $self->{pause_file} = $nibble_params->{pause_file}; - $self->{sleep} = $args{sleep} || 60; - - $self->{nibble_params} = $nibble_params; - $self->{tbl} = $tbl; - $self->{args} = \%args; - $self->{cols} = \@cols; - $self->{chunk_size} = $chunk_size; - $self->{where} = $where; - $self->{comments} = \%comments; - - return bless $self, $class; -} - -sub switch_to_nibble { - my $self = shift; - my $params = _nibble_params($self->{nibble_params}, $self->{tbl}, $self->{args}, $self->{cols}, - $self->{chunk_size}, $self->{where}, $self->{comments}, $self->{Quoter}); - - $self->{one_nibble} = 0; - $self->{index} = $params->{index}; - $self->{limit} = $params->{limit}; - $self->{first_lb_sql} = $params->{first_lb_sql}; - $self->{last_ub_sql} = $params->{last_ub_sql}; - $self->{ub_sql} = $params->{ub_sql}; - $self->{nibble_sql} = $params->{nibble_sql}; - $self->{explain_first_lb_sql} = $params->{explain_first_lb_sql}; - $self->{explain_ub_sql} = $params->{explain_ub_sql}; - $self->{explain_nibble_sql} = $params->{explain_nibble_sql}; - $self->{resume_lb_sql} = $params->{resume_lb_sql}; - $self->{sql} = $params->{sql}; - $self->_get_bounds(); - $self->_prepare_sths(); -} - -sub _one_nibble { - my ($args, $cols, $where, $tbl, $comments) = @_; - my $q = new Quoter(); - my $nibble_sql - = ($args->{dml} ? "$args->{dml} " : "SELECT ") - . ($args->{select} ? $args->{select} - : join(', ', map{ $tbl->{tbl_struct}->{type_for}->{$_} eq 'enum' ? - "CAST(".$q->quote($_)." AS UNSIGNED)" : $q->quote($_) } @$cols)) + = ($args{dml} ? "$args{dml} " : "SELECT ") + . ($args{select} ? $args{select} + : join(', ', map { $q->quote($_) } @cols)) . " FROM $tbl->{name}" . ($where ? " WHERE $where" : '') - . ($args->{lock_in_share_mode} ? " LOCK IN SHARE MODE" : "") - . " /*$comments->{bite}*/"; + . ($args{lock_in_share_mode} ? " LOCK IN SHARE MODE" : "") + . " /*$comments{bite}*/"; PTDEBUG && _d('One nibble statement:', $nibble_sql); my $explain_nibble_sql = "EXPLAIN SELECT " - . ($args->{select} ? $args->{select} - : join(', ', map{ $tbl->{tbl_struct}->{type_for}->{$_} eq 'enum' - ? "CAST(".$q->quote($_)." AS UNSIGNED)" : $q->quote($_) } @$cols)) + . ($args{select} ? $args{select} + : join(', ', map { $q->quote($_) } @cols)) . " FROM $tbl->{name}" . ($where ? " WHERE $where" : '') - . ($args->{lock_in_share_mode} ? " LOCK IN SHARE MODE" : "") - . " /*explain $comments->{bite}*/"; + . ($args{lock_in_share_mode} ? " LOCK IN SHARE MODE" : "") + . " /*explain $comments{bite}*/"; PTDEBUG && _d('Explain one nibble statement:', $explain_nibble_sql); - return { + $self = { + %args, one_nibble => 1, limit => 0, nibble_sql => $nibble_sql, explain_nibble_sql => $explain_nibble_sql, }; -} - -sub _nibble_params { - my ($nibble_params, $tbl, $args, $cols, $chunk_size, $where, $comments, $q) = @_; + } + else { my $index = $nibble_params->{index}; # brevity my $index_cols = $tbl->{tbl_struct}->{keys}->{$index}->{cols}; - my $asc = $args->{TableNibbler}->generate_asc_stmt( - %$args, + my $asc = $args{TableNibbler}->generate_asc_stmt( + %args, tbl_struct => $tbl->{tbl_struct}, index => $index, - n_index_cols => $args->{n_chunk_index_cols}, - cols => $cols, + n_index_cols => $args{n_chunk_index_cols}, + cols => \@cols, asc_only => 1, ); PTDEBUG && _d('Ascend params:', Dumper($asc)); my $from = "$tbl->{name} FORCE INDEX(`$index`)"; - my $order_by = join(', ', map {$q->quote($_)} @{$index_cols}); - my $order_by_dec = join(' DESC,', map {$q->quote($_)} @{$index_cols}); + my $order_by = join(', ', map { $tbl->{tbl_struct}->{type_for}->{$_} eq 'enum' + ? "CONCAT(".$q->quote($_).")" : $q->quote($_)} @{$index_cols}); + + my $order_by_dec = join(' DESC,', map { $tbl->{tbl_struct}->{type_for}->{$_} eq 'enum' + ? "CONCAT(".$q->quote($_).")" : $q->quote($_)} @{$index_cols}); my $first_lb_sql = "SELECT /*!40001 SQL_NO_CACHE */ " - . join(', ', map { $tbl->{tbl_struct}->{type_for}->{$_} eq 'enum' ? "CAST(".$q->quote($_)." AS UNSIGNED)" : $q->quote($_)} @{$asc->{scols}}) + . join(', ', map { $q->quote($_) } @{$asc->{scols}}) . " FROM $from" . ($where ? " WHERE $where" : '') . " ORDER BY $order_by" @@ -6508,10 +6340,10 @@ sub _nibble_params { PTDEBUG && _d('First lower boundary statement:', $first_lb_sql); my $resume_lb_sql; - if ( $args->{resume} ) { + if ( $args{resume} ) { $resume_lb_sql = "SELECT /*!40001 SQL_NO_CACHE */ " - . join(', ', map { $tbl->{tbl_struct}->{type_for}->{$_} eq 'enum' ? "CAST(".$q->quote($_)." AS UNSIGNED)" : $q->quote($_)} @{$asc->{scols}}) + . join(', ', map { $q->quote($_) } @{$asc->{scols}}) . " FROM $from" . " WHERE " . $asc->{boundaries}->{'>'} . ($where ? " AND ($where)" : '') @@ -6523,7 +6355,7 @@ sub _nibble_params { my $last_ub_sql = "SELECT /*!40001 SQL_NO_CACHE */ " - . join(', ', map { $tbl->{tbl_struct}->{type_for}->{$_} eq 'enum' ? "CAST(".$q->quote($_)." AS UNSIGNED)" : $q->quote($_)} @{$asc->{scols}}) + . join(', ', map { $q->quote($_) } @{$asc->{scols}}) . " FROM $from" . ($where ? " WHERE $where" : '') . " ORDER BY " @@ -6534,7 +6366,7 @@ sub _nibble_params { my $ub_sql = "SELECT /*!40001 SQL_NO_CACHE */ " - . join(', ', map { $tbl->{tbl_struct}->{type_for}->{$_} eq 'enum' ? "CAST(".$q->quote($_)." AS UNSIGNED)" : $q->quote($_)} @{$asc->{scols}}) + . join(', ', map { $q->quote($_) } @{$asc->{scols}}) . " FROM $from" . " WHERE " . $asc->{boundaries}->{'>='} . ($where ? " AND ($where)" : '') @@ -6544,36 +6376,36 @@ sub _nibble_params { PTDEBUG && _d('Upper boundary statement:', $ub_sql); my $nibble_sql - = ($args->{dml} ? "$args->{dml} " : "SELECT ") - . ($args->{select} ? $args->{select} - : join(', ', map { $tbl->{tbl_struct}->{type_for}->{$_} eq 'enum' ? "CAST(".$q->quote($_)." AS UNSIGNED)" : $q->quote($_)} @{$asc->{cols}})) + = ($args{dml} ? "$args{dml} " : "SELECT ") + . ($args{select} ? $args{select} + : join(', ', map { $q->quote($_) } @{$asc->{cols}})) . " FROM $from" . " WHERE " . $asc->{boundaries}->{'>='} # lower boundary . " AND " . $asc->{boundaries}->{'<='} # upper boundary . ($where ? " AND ($where)" : '') - . ($args->{order_by} ? " ORDER BY $order_by" : "") - . ($args->{lock_in_share_mode} ? " LOCK IN SHARE MODE" : "") - . " /*$comments->{nibble}*/"; + . ($args{order_by} ? " ORDER BY $order_by" : "") + . ($args{lock_in_share_mode} ? " LOCK IN SHARE MODE" : "") + . " /*$comments{nibble}*/"; PTDEBUG && _d('Nibble statement:', $nibble_sql); - my $explain_nibble_sql + my $explain_nibble_sql = "EXPLAIN SELECT " - . ($args->{select} ? $args->{select} + . ($args{select} ? $args{select} : join(', ', map { $q->quote($_) } @{$asc->{cols}})) . " FROM $from" . " WHERE " . $asc->{boundaries}->{'>='} # lower boundary . " AND " . $asc->{boundaries}->{'<='} # upper boundary . ($where ? " AND ($where)" : '') - . ($args->{order_by} ? " ORDER BY $order_by" : "") - . ($args->{lock_in_share_mode} ? " LOCK IN SHARE MODE" : "") - . " /*explain $comments->{nibble}*/"; + . ($args{order_by} ? " ORDER BY $order_by" : "") + . ($args{lock_in_share_mode} ? " LOCK IN SHARE MODE" : "") + . " /*explain $comments{nibble}*/"; PTDEBUG && _d('Explain nibble statement:', $explain_nibble_sql); - my $limit = 999; + my $limit = $chunk_size - 1; PTDEBUG && _d('Initial chunk size (LIMIT):', $limit); - my $params = { - one_nibble => 0, + $self = { + %args, index => $index, limit => $limit, first_lb_sql => $first_lb_sql, @@ -6592,7 +6424,17 @@ sub _nibble_params { order_by => $order_by, }, }; - return $params; + } + + $self->{row_est} = $nibble_params->{row_est}, + $self->{nibbleno} = 0; + $self->{have_rows} = 0; + $self->{rowno} = 0; + $self->{oktonibble} = 1; + $self->{pause_file} = $nibble_params->{pause_file}; + $self->{sleep} = $args{sleep} || 60; + + return bless $self, $class; } sub next { @@ -6607,6 +6449,7 @@ sub next { Cxn => $self->{Cxn}, tbl => $self->{tbl}, NibbleIterator => $self, + OptionParser => $self->{OptionParser}, ); if ($self->{nibbleno} == 0) { @@ -6629,6 +6472,7 @@ sub next { NIBBLE: while ( $self->{have_rows} || $self->_next_boundaries() ) { + if ($self->{pause_file}) { while(-f $self->{pause_file}) { print "Sleeping $self->{sleep} seconds because $self->{pause_file} exists\n"; @@ -6645,7 +6489,7 @@ sub next { sleep($self->{sleep}); } } - + if ( !$self->{have_rows} ) { $self->{nibbleno}++; PTDEBUG && _d('Nibble:', $self->{nibble_sth}->{Statement}, 'params:', @@ -6675,7 +6519,7 @@ sub next { } $self->{rowno} = 0; $self->{have_rows} = 0; - + } PTDEBUG && _d('Done nibbling'); @@ -6773,9 +6617,69 @@ sub row_estimate { return $self->{row_est}; } +sub get_limit1{ + my (%args) = @_; + my @required_args = qw(Cxn tbl chunk_size OptionParser Quoter limit1_index); + foreach my $arg ( @required_args ) { + die "I need a $arg argument" unless $args{$arg}; + } + my ($cxn, $tbl, $chunk_size, $o, $q,$limit1_index) = @args{@required_args}; + + my $where = $o->get('where') ? "WHERE ".$o->get('where') : ''; + my $sql=""; + if($limit1_index ne 'no index'){ + $sql="select /*!40001 SQL_NO_CACHE */ 1 " + ."FROM $tbl->{name} FORCE INDEX (".$q->quote($limit1_index).") " + ." $where limit 1"; + }else{ + $sql="select /*!40001 SQL_NO_CACHE */ 1 " + ."FROM $tbl->{name} $where limit 1"; + } + PTDEBUG && _d($sql); + my $vals; + my $execute_timeout=$o->has('execute-timeout')?$o->get('execute-timeout'):30.0; + my $sth; + eval { +# ################################################################### +# # If the sql executes timeout,we will kill it and then skip the table checksumming. +# # added by DBA 2018-04-10 +# # ################################################################### + my $SIG_ALRM=set_sig_handler('ALRM',sub { + $cxn->dbh()->clone()->do("KILL QUERY ".$cxn->dbh()->{"mysql_thread_id"}); + die "get_limit1 execute sql::$sql timeout ${execute_timeout}s\n"; + }); + alarm $execute_timeout; + $vals = $cxn->dbh()->selectrow_arrayref($sql); + alarm 0; + }; + alarm 0; + if ( $EVAL_ERROR ) { + my $error_info="$EVAL_ERROR"; + + my $times=10; + my $i=1; + my $r=undef; + while($times!=0){ + eval{ + $r=$cxn->dbh()->selectrow_hashref("select $i"); + }; + if(defined $r->{$i} and $i==$r->{$i}){ + last; + }else{ + PTDEBUG && _d("get_limit1 kill mysql_thread_id:".$cxn->dbh()->{"mysql_thread_id"}); + $cxn->dbh()->clone()->do("KILL QUERY ".$cxn->dbh()->{"mysql_thread_id"}); + } + --$times; + ++$i; + } + die "$error_info"; + } + return $vals; +} + sub can_nibble { my (%args) = @_; - my @required_args = qw(Cxn tbl chunk_size OptionParser TableParser); + my @required_args = qw(Cxn tbl chunk_size OptionParser Quoter TableParser); foreach my $arg ( @required_args ) { die "I need a $arg argument" unless $args{$arg}; } @@ -6788,15 +6692,24 @@ sub can_nibble { tbl => $tbl, where => $where, ); - if ( !$where ) { $mysql_index = undef; } + + my $index=_find_best_index(%args, mysql_index => $mysql_index); + $args{'limit1_index'} = $index ?"$index":'no index'; + + my $vals=get_limit1(%args); + my $chunk_size_limit = $o->get('chunk-size-limit') || 1; my $one_nibble = !defined $args{one_nibble} || $args{one_nibble} - ? $row_est <= 999 * $chunk_size_limit + ? $row_est <= $chunk_size * $chunk_size_limit : 0; + unless($vals){ + PTDEBUG && _d("SELECT ... LIMIT 1 no value returned.We would checksum $tbl->{name} one nibble"); + $one_nibble=1; + } PTDEBUG && _d('One nibble:', $one_nibble ? 'yes' : 'no'); if ( $args{resume} @@ -6806,13 +6719,12 @@ sub can_nibble { $one_nibble = 1; } - my $index = _find_best_index(%args, mysql_index => $mysql_index); if ( !$index && !$one_nibble ) { die "There is no good index and the table is oversized."; } my $pause_file = ($o->has('pause-file') && $o->get('pause-file')) || undef; - + return { row_est => $row_est, # nibble about this many rows index => $index, # using this index @@ -6857,7 +6769,7 @@ sub _find_best_index { push @possible_indexes, $want_index; } } - + if (!$best_index) { PTDEBUG && _d('Auto-selecting best index'); foreach my $index ( $tp->sort_indexes($tbl_struct) ) { @@ -6955,7 +6867,7 @@ sub _prepare_sths { return; } -sub _get_bounds { +sub _get_bounds { my ($self) = @_; if ( $self->{one_nibble} ) { @@ -6965,32 +6877,136 @@ sub _get_bounds { return; } - my $dbh = $self->{Cxn}->dbh(); - - $self->{first_lower} = $dbh->selectrow_arrayref($self->{first_lb_sql}); - PTDEBUG && _d('First lower boundary:', Dumper($self->{first_lower})); - + my $o=$self->{OptionParser}; + my $timeout = $o->has('execute-timeout')?$o->get('execute-timeout'):30.0; + eval { +# ################################################################### +# If the first_lb_sql executes timeout,we will kill it and then skip the table checksumming. +# added by DBA 2018-04-10 +# ################################################################### + my $SIG_ALRM=set_sig_handler('ALRM',sub { + $self->{Cxn}->dbh()->clone()->do("KILL QUERY ".$self->{Cxn}->dbh()->{"mysql_thread_id"}); + die "_get_bounds execute first_lb_sql::$self->{first_lb_sql} timeout ${timeout}s\n"; + }); + alarm $timeout; + $self->{first_lower} = $self->{Cxn}->dbh()->selectrow_arrayref($self->{first_lb_sql}); + alarm 0; + }; + alarm 0; + if ( $EVAL_ERROR ) { + my $error_info="$EVAL_ERROR"; + + my $times=10; + my $i=1; + my $r=undef; + while($times!=0){ + eval{ + $r=$self->{Cxn}->dbh()->selectrow_hashref("select $i"); + }; + if(defined $r->{$i} and $i==$r->{$i}){ + last; + }else{ + PTDEBUG && _d("_get_bounds execute first_lb_sql,kill mysql_thread_id:".$self->{Cxn}->dbh()->{"mysql_thread_id"}); + $self->{Cxn}->dbh()->clone()->do("KILL QUERY ".$self->{Cxn}->dbh()->{"mysql_thread_id"}); + } + --$times; + ++$i; + } + die "$error_info"; + } + PTDEBUG && _d('First lower boundary:', Dumper($self->{first_lower})); if ( my $nibble = $self->{resume} ) { if ( defined $nibble->{lower_boundary} && defined $nibble->{upper_boundary} ) { - my $sth = $dbh->prepare($self->{resume_lb_sql}); + my $sth = $self->{Cxn}->dbh()->prepare($self->{resume_lb_sql}); my @ub = split ',', $nibble->{upper_boundary}; PTDEBUG && _d($sth->{Statement}, 'params:', @ub); - $sth->execute(@ub); - $self->{next_lower} = $sth->fetchrow_arrayref(); - $sth->finish(); + eval{ +# ################################################################### +# If the resume_lb_sql executes timeout,we will kill it and then skip the table checksumming. +# added by DBA 2018-04-10 +# ################################################################### + my $SIG_ALRM=set_sig_handler('ALRM',sub { + $self->{Cxn}->dbh()->clone()->do("KILL QUERY ".$self->{Cxn}->dbh()->{"mysql_thread_id"}); + die "_get_bounds execute resume_lb_sql::$self->{resume_lb_sql} timeout ${timeout}s\n"; + }); + alarm $timeout; + $sth->execute(@ub); + $self->{next_lower} = $sth->fetchrow_arrayref(); + alarm 0; + }; + alarm 0; + if ( $EVAL_ERROR ) { + if($sth){ + $sth->finish(); + } + my $error_info="$EVAL_ERROR"; + + my $times=10; + my $i=1; + my $r=undef; + while($times!=0){ + eval{ + $r=$self->{Cxn}->dbh()->selectrow_hashref("select $i"); + }; + if(defined $r->{$i} and $i==$r->{$i}){ + last; + }else{ + PTDEBUG && _d("_get_bounds execute resume_lb_sql,kill mysql_thread_id:".$self->{Cxn}->dbh()->{"mysql_thread_id"}); + $self->{Cxn}->dbh()->clone()->do("KILL QUERY ".$self->{Cxn}->dbh()->{"mysql_thread_id"}); + } + --$times; + ++$i; + } + die "$error_info"; + } + $sth->finish(); } } else { - $self->{next_lower} = $self->{first_lower}; + $self->{next_lower} = $self->{first_lower}; } - PTDEBUG && _d('Next lower boundary:', Dumper($self->{next_lower})); + PTDEBUG && _d('Next lower boundary:', Dumper($self->{next_lower})); if ( !$self->{next_lower} ) { PTDEBUG && _d('At end of table, or no more boundaries to resume'); $self->{no_more_boundaries} = 1; - $self->{last_upper} = $dbh->selectrow_arrayref($self->{last_ub_sql}); + eval { +# ################################################################### +# If the last_ub_sql executes timeout,we will kill it and then skip the table checksumming. +# added by DBA 2018-04-10 +# ################################################################### + my $SIG_ALRM=set_sig_handler('ALRM',sub { + $self->{Cxn}->dbh()->clone()->do("KILL QUERY ".$self->{Cxn}->dbh()->{"mysql_thread_id"}); + die "_get_bounds execute last_ub_sql::$self->{last_ub_sql} timeout ${timeout}s\n"; + }); + alarm $timeout; + $self->{last_upper} = $self->{Cxn}->dbh()->selectrow_arrayref($self->{last_ub_sql}); + alarm 0; + }; + alarm 0; + if ( $EVAL_ERROR ) { + my $error_info="$EVAL_ERROR"; + + my $times=10; + my $i=1; + my $r=undef; + while($times!=0){ + eval{ + $r=$self->{Cxn}->dbh()->selectrow_hashref("select $i"); + }; + if(defined $r->{$i} and $i==$r->{$i}){ + last; + }else{ + PTDEBUG && _d("_get_bounds execute last_ub_sql,kill mysql_thread_id:".$self->{Cxn}->dbh()->{"mysql_thread_id"}); + $self->{Cxn}->dbh()->clone()->do("KILL QUERY ".$self->{Cxn}->dbh()->{"mysql_thread_id"}); + } + --$times; + ++$i; + } + die "$error_info"; + } PTDEBUG && _d('Last upper boundary:', Dumper($self->{last_upper})); } @@ -7020,6 +7036,13 @@ sub _next_boundaries { my $n_cols = scalar @{$index->{cols}}; my $chunkno = $self->{nibbleno}; + my $o = $self->{OptionParser}; + my $q=$self->{Quoter}; + my $repl_table = $q->quote($q->split_unquote($o->get('replicate'))); + my $delete_sth = $self->{Cxn}->dbh()->prepare("DELETE FROM $repl_table WHERE db = ? AND tbl = ?"); + PTDEBUG && _d($delete_sth->{Statement}); + $delete_sth->execute($tbl->{db}, $tbl->{tbl}); + die "Possible infinite loop detected! " . "The lower boundary for chunk $chunkno is " . "<" . join(', ', @{$self->{lower}}) . "> and the lower " @@ -7046,31 +7069,106 @@ sub _next_boundaries { } } - + PTDEBUG && _d($self->{ub_sth}->{Statement}, 'params:', join(', ', @{$self->{lower}}), $self->{limit}); - $self->{ub_sth}->execute(@{$self->{lower}}, $self->{limit}); - my $boundary = $self->{ub_sth}->fetchall_arrayref(); - PTDEBUG && _d('Next boundary:', Dumper($boundary)); - if ( $boundary && @$boundary ) { - $self->{upper} = $boundary->[0]; + my $dbh = $self->{Cxn}->dbh(); + my $boundary=undef; + my $o=$self->{OptionParser}; + my $timeout = $o->has('execute-timeout')?$o->get('execute-timeout'):30.0; + eval { +# ################################################################### +# If the sql executes timeout,we will kill it and then skip the table checksumming. +# added by DBA 2018-04-10 +# ################################################################### + my $SIG_ALRM=set_sig_handler('ALRM',sub { + my $statement=$self->{ub_sth}->{Statement}; + my $lower=(); + push @$lower,@{$self->{lower}}; + foreach my $ele(@$lower[0..@$lower-1]){ + $statement=~ s#\?#'$ele'#; + } + $statement=~ s#\?#$self->{limit}#; + $self->{Cxn}->dbh()->clone()->do("KILL QUERY ".$self->{Cxn}->dbh()->{"mysql_thread_id"}); + die "NibbleIterator::_next_boundaries execute ub_sth::$statement timeout ${timeout}s\n"; + }); + alarm $timeout; + $self->{ub_sth}->execute(@{$self->{lower}}, $self->{limit}); + $boundary = $self->{ub_sth}->fetchall_arrayref(); + alarm 0; + }; + alarm 0; + if ( $EVAL_ERROR ) { + my $error_info="$EVAL_ERROR"; + + my $times=10; + my $i=1; + my $r=undef; + while($times!=0){ + eval{ + $r=$self->{Cxn}->dbh()->selectrow_hashref("select $i"); + }; + if(defined $r->{$i} and $i==$r->{$i}){ + last; + }else{ + PTDEBUG && _d("_next_boundaries execute ub_sth,kill mysql_thread_id:".$self->{Cxn}->dbh()->{"mysql_thread_id"}); + $self->{Cxn}->dbh()->clone()->do("KILL QUERY ".$self->{Cxn}->dbh()->{"mysql_thread_id"}); + } + --$times; + ++$i; + } + die "$error_info"; + } + + PTDEBUG && _d('Next boundary:', Dumper($boundary)); + if ( $boundary && @$boundary ) { + $self->{upper} = $boundary->[0]; - if ( $boundary->[1] ) { - $self->{next_lower} = $boundary->[1]; - } - else { - PTDEBUG && _d('End of table boundary:', Dumper($boundary->[0])); - $self->{no_more_boundaries} = 1; # for next call + if ( $boundary->[1] ) { + $self->{next_lower} = $boundary->[1]; + } + else { + PTDEBUG && _d('End of table boundary:', Dumper($boundary->[0])); + $self->{no_more_boundaries} = 1; # for next call - $self->{last_upper} = $boundary->[0]; - } - } + $self->{last_upper} = $boundary->[0]; + } + } else { - my $dbh = $self->{Cxn}->dbh(); - $self->{upper} = $dbh->selectrow_arrayref($self->{last_ub_sql}); - PTDEBUG && _d('Last upper boundary:', Dumper($self->{upper})); + eval { + my $SIG_ALRM=set_sig_handler('ALRM',sub { + $self->{Cxn}->dbh()->clone()->do("KILL QUERY ".$self->{Cxn}->dbh()->{"mysql_thread_id"}); + die "NibbleIterator::_next_boundaries execute last_ub_sql::$self->{last_ub_sql} timeout ${timeout}s\n"; + }); + alarm $timeout; + $self->{upper} = $self->{Cxn}->dbh()->selectrow_arrayref($self->{last_ub_sql}); + alarm 0; + }; + alarm 0; + if ( $EVAL_ERROR ) { + my $error_info="$EVAL_ERROR"; + + my $times=10; + my $i=1; + my $r=undef; + while($times!=0){ + eval{ + $r=$self->{Cxn}->dbh()->selectrow_hashref("select $i"); + }; + if(defined $r->{$i} and $i==$r->{$i}){ + last; + }else{ + PTDEBUG && _d("_next_boundaries execute last_ub_sql,kill mysql_thread_id:".$self->{Cxn}->dbh()->{"mysql_thread_id"}); + $self->{Cxn}->dbh()->clone()->do("KILL QUERY ".$self->{Cxn}->dbh()->{"mysql_thread_id"}); + } + --$times; + ++$i; + } + die "$error_info"; + } + PTDEBUG && _d('Last upper boundary:', Dumper($self->{upper})); $self->{no_more_boundaries} = 1; # for next call - + $self->{last_upper} = $self->{upper}; } $self->{ub_sth}->finish(); @@ -7089,7 +7187,7 @@ sub identical_boundaries { if scalar @$b1 != scalar @$b2; # shouldn't happen my $n_vals = scalar @$b1; for my $i ( 0..($n_vals-1) ) { - return 0 if ($b1->[$i] || '') ne ($b2->[$i] || ''); # diff + return 0 if $b1->[$i] ne $b2->[$i]; # diff } return 1; } @@ -7188,7 +7286,7 @@ sub new { . $tail_sql . " /*past upper chunk*/"; PTDEBUG && _d('Past upper statement:', $past_upper_sql); - + my $explain_past_upper_sql = "EXPLAIN SELECT " . ($args{past_select} @@ -7373,7 +7471,7 @@ sub run { $parent_exit->($child_pid) if $parent_exit; exit 0; } - + POSIX::setsid() or die "Cannot start a new session: $OS_ERROR"; chdir '/' or die "Cannot chdir to /: $OS_ERROR"; @@ -7399,7 +7497,7 @@ sub run { close STDERR; open STDERR, ">&STDOUT" - or die "Cannot dupe STDERR to STDOUT: $OS_ERROR"; + or die "Cannot dupe STDERR to STDOUT: $OS_ERROR"; } else { if ( -t STDOUT ) { @@ -7437,7 +7535,7 @@ sub _make_pid_file { eval { sysopen(PID_FH, $pid_file, O_RDWR|O_CREAT|O_EXCL) or die $OS_ERROR; print PID_FH $PID, "\n"; - close PID_FH; + close PID_FH; }; if ( my $e = $EVAL_ERROR ) { if ( $e =~ m/file exists/i ) { @@ -7620,6 +7718,7 @@ sub new { resume => \%resume, filters => _make_filters(%args), }; + return bless $self, $class; } @@ -7680,6 +7779,7 @@ sub _make_filters { sub next { my ( $self ) = @_; + my $o=$self->{OptionParser}; if ( !$self->{initialized} ) { $self->{initialized} = 1; if ( $self->{resume}->{tbl} ) { @@ -7699,6 +7799,13 @@ sub next { if ( $self->{file_itr} ) { $schema_obj= $self->_iterate_files(); } +######################################################################## +# add --conf-file logic here, when use --conf-file, each row should +# contain DB TABLE, which specify one table to be checksumed. +# ######################################################################## + elsif($o->get('conf-file') ne 'no'){ + $schema_obj= $self->_iterate_conf_file(); + } else { # dbh $schema_obj= $self->_iterate_dbh(); } @@ -7779,6 +7886,111 @@ sub _iterate_files { return $self->_iterate_files(); } +sub _iterate_conf_file{ + my ( $self ) = @_; + my $o = $self->{OptionParser}; + my $q = $self->{Quoter}; + my $tp = $self->{TableParser}; + my $dbh = $self->{dbh}; + my $conf_file=$o->get('conf-file'); + PTDEBUG && _d('Getting next schema object from conf_file', $conf_file); + if (! defined $self->{dbs_tbs}){ + open FH,$conf_file or die "cannot open conf_file:'$conf_file'"; + my @dbs_tbs=(); + while(){ + chomp; + next if($_ =~ m/^\s*$/); + my ($db,$tbl)=split (/\s+/,$_); + if((!$db) or (!$tbl) or (!$db and !$tbl)){ + PTDEBUG && _d("conf_file:'$conf_file' format not complete correct!The line must be 'database table' but now is \"$_\""); + }else{ + push @dbs_tbs,{'db'=>$db,'tbl'=>$tbl}; + } + } + close FH; + $self->{dbs_tbs}=\@dbs_tbs; + } + while (my $db_tb = shift @{$self->{dbs_tbs}}){ + my $db=$db_tb->{'db'}; + my $tbl=$db_tb->{'tbl'}; + $self->{db}=$db; + + if(! $self->_db_exists($db)){ + PTDEBUG && _d("conf_file:'$conf_file',$db not exists! Skipping it!\n"); + $self->{db}=undef; + next; + } + if(! $self->_tbl_exists($db,$tbl)){ + PTDEBUG && _d("conf_file:'$conf_file',table \`$db\`.\`$tbl\` not exists or \`$db\`.\`$tbl\` is a VIEW! Skipping it!\n"); + $self->{db}=undef; + next; + } + if ($self->_resume_from_database($db) && $self->database_is_allowed($db)){ + if($self->_resume_from_table($tbl) && $self->table_is_allowed($db, $tbl)){ + PTDEBUG && _d("Found $tbl in database $db"); + my $ddl = eval { $tp->get_create_table($dbh, $db, $tbl) }; + if ( my $e = $EVAL_ERROR ) { + my $table_name = "$db.$tbl"; + if ( $e =~ /\QTable '$table_name' doesn't exist/ ) { + PTDEBUG && _d("$table_name no longer exists"); + }else{ + warn "Skipping $table_name because SHOW CREATE TABLE failed: $e"; + } + next; + } + + my $tbl_struct = $tp->parse($ddl); + if ( $self->engine_is_allowed($tbl_struct->{engine}) ) { + return { + db=> $self->{db}, + tbl=> $tbl, + name=> $q->quote($db, $tbl), + ddl=> $ddl, + tbl_struct => $tbl_struct, + }; + } + } + } + } + $self->{db}=undef; + return; +} + +sub _db_exists{ + my ($self,$db) =@_; + my $dbh = $self->{dbh}; + my $show_db_sql="SHOW DATABASES LIKE '$db'"; + PTDEBUG && _d($show_db_sql); + my @db_exists=(); + eval { @db_exists=$dbh->selectrow_array($show_db_sql);}; + if($EVAL_ERROR){ + PTDEBUG && _d("ERROR:$EVAL_ERROR"); + return 0; + } + if(!@db_exists){ + return 0; + } + return 1; +} +sub _tbl_exists{ + my ($self,$db,$tbl) =@_; + my $dbh = $self->{dbh}; + my $show_tbl_sql="show /*!50002 FULL*/ tables from \`$db\` like '$tbl'"; + PTDEBUG && _d($show_tbl_sql); + my @tbl_exists=(); + eval {@tbl_exists=$dbh->selectrow_array($show_tbl_sql);}; + if($EVAL_ERROR){ + PTDEBUG && _d("ERROR:$EVAL_ERROR"); + return 0; + } + if(!@tbl_exists){ + return 0; + } + if(@tbl_exists and $tbl_exists[1] eq 'VIEW'){ + return 0; + } + return 1; +} sub _iterate_dbh { my ( $self ) = @_; my $q = $self->{Quoter}; @@ -7806,6 +8018,7 @@ sub _iterate_dbh { } if ( !$self->{tbls} ) { + PTDEBUG && _d('====================', $dbh); my $sql = 'SHOW /*!50002 FULL*/ TABLES FROM ' . $q->quote($self->{db}); PTDEBUG && _d($sql); my @tbls = map { @@ -7820,7 +8033,7 @@ sub _iterate_dbh { eval { @{$dbh->selectall_arrayref($sql)}; }; if ($EVAL_ERROR) { - warn "Skipping $self->{db}..."; + warn "Skipping $self->{db}...$EVAL_ERROR"; $self->{db} = undef; next; } @@ -7921,10 +8134,10 @@ sub table_is_allowed { |slave_master_info |slave_relay_log_info |slave_worker_info - |slow_log + |slow_log )$/x; - if ( $filter->{'ignore-tables'}->{'*'}->{$tbl} + if ( $filter->{'ignore-tables'}->{'*'}->{$tbl} || $filter->{'ignore-tables'}->{$db}->{$tbl}) { PTDEBUG && _d('Table', $tbl, 'is in --ignore-tables list'); return 0; @@ -7937,7 +8150,7 @@ sub table_is_allowed { } if ( $filter->{'tables'} - && (!$filter->{'tables'}->{'*'}->{$tbl} && !$filter->{'tables'}->{$db}->{$tbl}) ) { + && (!$filter->{'tables'}->{'*'}->{$tbl} && !$filter->{'tables'}->{$db}->{$tbl}) ) { PTDEBUG && _d('Table', $tbl, 'is not in --tables list, ignoring'); return 0; } @@ -8421,7 +8634,7 @@ sub value_to_json { my $b_obj = B::svref_2object(\$value); # for round trip problem my $flags = $b_obj->FLAGS; - return $value # as is + return $value # as is if $flags & ( B::SVp_IOK | B::SVp_NOK ) and !( $flags & B::SVp_POK ); # SvTYPE is IV or NV? my $type = ref($value); @@ -8679,9 +8892,6 @@ sub wait { . " seconds on $dsn_name. Waiting.\n"; } else { - if ($self->{fail_on_stopped_replication}) { - die 'replication is stopped'; - } print STDERR "Replica $dsn_name is stopped. Waiting.\n"; } return; @@ -8691,16 +8901,13 @@ sub wait { $pr_first_report = sub { my $dsn_name = $worst->{cxn}->name(); if ( !defined $worst->{lag} ) { - if ($self->{fail_on_stopped_replication}) { - die 'replication is stopped'; - } print STDERR "Replica $dsn_name is stopped. Waiting.\n"; } return; }; } - my @lagged_slaves = map { {cxn=>$_, lag=>undef} } @$slaves; + my @lagged_slaves = map { {cxn=>$_, lag=>undef} } @$slaves; while ( $oktorun->() && @lagged_slaves ) { PTDEBUG && _d('Checking slave lag'); for my $i ( 0..$#lagged_slaves ) { @@ -8756,667 +8963,48 @@ sub _d { # End ReplicaLagWaiter package # ########################################################################### -# This program is copyright 2010-2011 Percona Ireland Ltd. -# Feedback and improvements are welcome. -# -# THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED -# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF -# MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. -# -# This program is free software; you can redistribute it and/or modify it under -# the terms of the GNU General Public License as published by the Free Software -# Foundation, version 2; OR the Perl Artistic License. On UNIX and similar -# systems, you can issue `man perlgpl' or `man perlartistic' to read these -# licenses. -# -# You should have received a copy of the GNU General Public License along with -# this program; if not, write to the Free Software Foundation, Inc., 59 Temple -# Place, Suite 330, Boston, MA 02111-1307 USA. # ########################################################################### -# MySQLConfig package +# MySQLStatusWaiter package +# This package is a copy without comments from the original. The original +# with comments and its test file can be found in the Bazaar repository at, +# lib/MySQLStatusWaiter.pm +# t/lib/MySQLStatusWaiter.t +# See https://launchpad.net/percona-toolkit for more information. # ########################################################################### { -# Package: MySQLConfig -# MySQLConfig parses and encapsulates system variables and values from -# SHOW VARIABLES, option files, mysqld --help --verbose or my_print_defaults. -# A MySQLConfig object represents how MySQL is or would be configured given -# one of those inputs. If the input is SHOW VARIABLES, then the config is -# acive, i.e. MySQL's running config. All other inputs are inactive, i.e. -# how MySQL should or would be running if started with the config. -# -# Inactive configs are made to mimic SHOW VARIABLES so that MySQLConfig -# objects can be reliably compared with MySQLConfigComparer. This is -# necessary because the inputs are different in how they list values, -# how they treat variables with optional values, etc. -# -# Only variables present in the input are saved in the MySQLConfig object. -# So if returns false, then the variable did not appear in the input. -package MySQLConfig; +package MySQLStatusWaiter; use strict; use warnings FATAL => 'all'; +use POSIX qw( ceil ); use English qw(-no_match_vars); use constant PTDEBUG => $ENV{PTDEBUG} || 0; -my %can_be_duplicate = ( - replicate_wild_do_table => 1, - replicate_wild_ignore_table => 1, - replicate_rewrite_db => 1, - replicate_ignore_table => 1, - replicate_ignore_db => 1, - replicate_do_table => 1, - replicate_do_db => 1, -); - -# Sub: new -# -# Parameters: -# %args - Arguments -# -# Arguments: -# file - Filename of an option file, or containing output of -# mysqld --help --verbose, my_print_defaults or SHOW VARIABLES -# output - Text output of one of ^ if you want to slurp the file manually -# result_set - Arrayref of SHOW VARIABLES -# dbh - dbh to get SHOW VARIABLES from -# TextResultSetParser - object if file or output -# arg is given -# -# Returns: -# MySQLConfig object sub new { my ( $class, %args ) = @_; - my @requires_one_of = qw(file output result_set dbh); - my $required_arg = grep { $args{$_} } @requires_one_of; - if ( !$required_arg ) { - die "I need a " . join(', ', @requires_one_of[0..$#requires_one_of-1]) - . " or " . $requires_one_of[-1] . " argument"; - } - if ( $required_arg > 1 ) { - die "Specify only one " - . join(', ', @requires_one_of[0..$#requires_one_of-1]) - . " or " . $requires_one_of[-1] . " argument"; + my @required_args = qw(max_spec get_status sleep oktorun); + foreach my $arg ( @required_args ) { + die "I need a $arg argument" unless defined $args{$arg}; } - if ( $args{file} || $args{output} ) { - die "I need a TextResultSetParser argument" - unless $args{TextResultSetParser}; + + PTDEBUG && _d('Parsing spec for max thresholds'); + my $max_val_for = _parse_spec($args{max_spec}); + if ( $max_val_for ) { + _check_and_set_vals( + vars => $max_val_for, + get_status => $args{get_status}, + threshold_factor => 0.2, # +20% + ); } - if ( $args{file} ) { - $args{output} = _slurp_file($args{file}); - } - - my %config_data = _parse_config(%args); - - my $self = { - %args, - %config_data, - }; - - return bless $self, $class; -} - -sub _parse_config { - my ( %args ) = @_; - - my %config_data; - if ( $args{output} ) { - %config_data = _parse_config_output(%args); - } - elsif ( my $rows = $args{result_set} ) { - $config_data{format} = $args{format} || 'show_variables'; - $config_data{vars} = { map { @$_ } @$rows }; - } - elsif ( my $dbh = $args{dbh} ) { - $config_data{format} = $args{format} || 'show_variables'; - my $sql = "SHOW /*!40103 GLOBAL*/ VARIABLES"; - PTDEBUG && _d($dbh, $sql); - my $rows = $dbh->selectall_arrayref($sql); - $config_data{vars} = { map { @$_ } @$rows }; - $config_data{mysql_version} = _get_version($dbh); - } - else { - die "Unknown config source"; - } - - handle_special_vars(\%config_data); - - return %config_data; -} - -sub handle_special_vars { - my ($config_data) = @_; - - if ( $config_data->{vars}->{wsrep_provider_options} ) { - my $vars = $config_data->{vars}; - my $dupes = $config_data->{duplicate_vars}; - for my $wpo ( $vars->{wsrep_provider_options}, @{$dupes->{wsrep_provider_options} || [] } ) { - my %opts = $wpo =~ /(\S+)\s*=\s*(\S*)(?:;|;?$)/g; - while ( my ($var, $val) = each %opts ) { - $val =~ s/;$//; - if ( exists $vars->{$var} ) { - push @{$dupes->{$var} ||= []}, $val; - } - $vars->{$var} = $val; - } - } - # Delete from vars, but not from dupes, since we still want that - delete $vars->{wsrep_provider_options}; - } - - return; -} - -sub _parse_config_output { - my ( %args ) = @_; - my @required_args = qw(output TextResultSetParser); - foreach my $arg ( @required_args ) { - die "I need a $arg arugment" unless $args{$arg}; - } - my ($output) = @args{@required_args}; - PTDEBUG && _d("Parsing config output"); - - my $format = $args{format} || detect_config_output_format(%args); - if ( !$format ) { - die "Cannot auto-detect the MySQL config format"; - } - - my $vars; # variables hashref - my $dupes; # duplicate vars hashref - my $opt_files; # option files arrayref - if ( $format eq 'show_variables' ) { - $vars = parse_show_variables(%args); - } - elsif ( $format eq 'mysqld' ) { - ($vars, $opt_files) = parse_mysqld(%args); - } - elsif ( $format eq 'my_print_defaults' ) { - ($vars, $dupes) = parse_my_print_defaults(%args); - } - elsif ( $format eq 'option_file' ) { - ($vars, $dupes) = parse_option_file(%args); - } - else { - die "Invalid MySQL config format: $format"; - } - - die "Failed to parse MySQL config" unless $vars && keys %$vars; - - if ( $format ne 'show_variables' ) { - _mimic_show_variables( - %args, - format => $format, - vars => $vars, - ); - } - - return ( - format => $format, - vars => $vars, - option_files => $opt_files, - duplicate_vars => $dupes, - ); -} - -sub detect_config_output_format { - my ( %args ) = @_; - my @required_args = qw(output); - foreach my $arg ( @required_args ) { - die "I need a $arg arugment" unless $args{$arg}; - } - my ($output) = @args{@required_args}; - - my $format; - if ( $output =~ m/\|\s+\w+\s+\|\s+.+?\|/ - || $output =~ m/\*+ \d/ - || $output =~ m/Variable_name:\s+\w+/ - || $output =~ m/Variable_name\s+Value$/m ) - { - PTDEBUG && _d('show variables format'); - $format = 'show_variables'; - } - elsif ( $output =~ m/Starts the MySQL database server/ - || $output =~ m/Default options are read from / - || $output =~ m/^help\s+TRUE /m ) - { - PTDEBUG && _d('mysqld format'); - $format = 'mysqld'; - } - elsif ( $output =~ m/^--\w+/m ) { - PTDEBUG && _d('my_print_defaults format'); - $format = 'my_print_defaults'; - } - elsif ( $output =~ m/^\s*\[[a-zA-Z]+\]\s*$/m ) { - PTDEBUG && _d('option file format'); - $format = 'option_file', - } - - return $format; -} - -sub parse_show_variables { - my ( %args ) = @_; - my @required_args = qw(output TextResultSetParser); - foreach my $arg ( @required_args ) { - die "I need a $arg arugment" unless $args{$arg}; - } - my ($output, $trp) = @args{@required_args}; - - my %config = map { - $_->{Variable_name} => $_->{Value} - } @{ $trp->parse($output) }; - - return \%config; -} - -# Parse "mysqld --help --verbose" and return a hashref of variable=>values -# and an arrayref of default defaults files if possible. The "default -# defaults files" are the defaults file that mysqld reads by default if no -# defaults file is explicitly given by --default-file. -sub parse_mysqld { - my ( %args ) = @_; - my @required_args = qw(output); - foreach my $arg ( @required_args ) { - die "I need a $arg arugment" unless $args{$arg}; - } - my ($output) = @args{@required_args}; - - # First look for the list of option files like - # Default options are read from the following files in the given order: - # /etc/my.cnf /usr/local/mysql/etc/my.cnf ~/.my.cnf - my @opt_files; - if ( $output =~ m/^Default options are read.+\n/mg ) { - my ($opt_files) = $output =~ m/\G^(.+)\n/m; - my %seen; - my @opt_files = grep { !$seen{$_} } split(' ', $opt_files); - PTDEBUG && _d('Option files:', @opt_files); - } - else { - PTDEBUG && _d("mysqld help output doesn't list option files"); - } - - # The list of sys vars and their default vals begins like: - # Variables (--variable-name=value) - # and boolean options {FALSE|TRUE} Value (after reading options) - # --------------------------------- ----------------------------- - # help TRUE - # abort-slave-event-count 0 - # So we search for that line of hypens. - # - # It also ends with something like - # - # wait_timeout 28800 - # - # To see what values a running MySQL server is using, type - # 'mysqladmin variables' instead of 'mysqld --verbose --help'. - # - # So try to find it by locating a double newline, and strip it away - if ( $output !~ m/^-+ -+$(.+?)(?:\n\n.+)?\z/sm ) { - PTDEBUG && _d("mysqld help output doesn't list vars and vals"); - return; - } - - # Grab the varval list. - my $varvals = $1; - - # Parse the "var val" lines. 2nd retval is duplicates but there - # shouldn't be any with mysqld. - my ($config, undef) = _parse_varvals( - qr/^(\S+)(.*)$/, - $varvals, - ); - - return $config, \@opt_files; -} - -# Parse "my_print_defaults" output and return a hashref of variable=>values -# and a hashref of any duplicated variables. -sub parse_my_print_defaults { - my ( %args ) = @_; - my @required_args = qw(output); - foreach my $arg ( @required_args ) { - die "I need a $arg arugment" unless $args{$arg}; - } - my ($output) = @args{@required_args}; - - # Parse the "--var=val" lines. - my ($config, $dupes) = _parse_varvals( - qr/^--([^=]+)(?:=(.*))?$/, - $output, - ); - - return $config, $dupes; -} - -# Parse the [mysqld] section of an option file and return a hashref of -# variable=>values and a hashref of any duplicated variables. -sub parse_option_file { - my ( %args ) = @_; - my @required_args = qw(output); - foreach my $arg ( @required_args ) { - die "I need a $arg arugment" unless $args{$arg}; - } - my ($output) = @args{@required_args}; - - my ($mysqld_section) = $output =~ m/\[mysqld\](.+?)(?:^\s*\[\w+\]|\Z)/xms; - die "Failed to parse the [mysqld] section" unless $mysqld_section; - - # Parse the "var=val" lines. - my ($config, $dupes) = _parse_varvals( - qr/^([^=]+)(?:=(.*))?$/, - $mysqld_section, - ); - - return $config, $dupes; -} - -# Called by _parse_varvals(), takes two arguments: a regex, and -# a string to match against. The string will be split in lines, -# and each line will be matched against the regex. -# The regex must return to captures, although the second doesn't -# have to match anything. -# Returns a hashref of arrayrefs ala -# { port => [ 12345, 12346 ], key_buffer_size => [ "16M" ] } -sub _preprocess_varvals { - my ($re, $to_parse) = @_; - - my %vars; - LINE: - foreach my $line ( split /\n/, $to_parse ) { - next LINE if $line =~ m/^\s*$/; # no empty lines - next LINE if $line =~ /^\s*[#;]/; # no # or ; comment lines - - if ( $line !~ $re ) { - PTDEBUG && _d("Line <", $line, "> didn't match $re"); - next LINE; - } - - my ($var, $val) = ($1, $2); - - # Variable names are usually specified like "log-bin" - # but in SHOW VARIABLES they're all like "log_bin". - $var =~ tr/-/_/; - - # Remove trailing comments - $var =~ s/\s*#.*$//; - - if ( !defined $val ) { - $val = ''; - } - - # Strip leading and trailing whitespace. - for my $item ($var, $val) { - $item =~ s/^\s+//; - $item =~ s/\s+$//; - } - - push @{$vars{$var} ||= []}, $val - } - - return \%vars; -} - -# Parses a string of variables and their values ("varvals"), returns two -# hashrefs: one with normalized variable=>value, the other with duplicate -# vars. -sub _parse_varvals { - my ( $vars ) = _preprocess_varvals(@_); - - # Config built from parsing the given varvals. - my %config; - - # Discover duplicate vars. - my %duplicates; - - while ( my ($var, $vals) = each %$vars ) { - my $val = _process_val( pop @$vals ); - # If the variable has duplicates, then @$vals will contain - # the rest of the values - if ( @$vals && !$can_be_duplicate{$var} ) { - # The var is a duplicate (in the bad sense, i.e. where user is - # probably unaware that there's two different values for this var - # but only the last is used). - PTDEBUG && _d("Duplicate var:", $var); - foreach my $current_val ( map { _process_val($_) } @$vals ) { - push @{$duplicates{$var} ||= []}, $current_val; - } - } - - PTDEBUG && _d("Var:", $var, "val:", $val); - - # Save this var-val. - $config{$var} = $val; - } - - return \%config, \%duplicates; -} - -my $quote_re = qr/ - \A # Start of value - (['"]) # Opening quote - (.*) # Value - \1 # Closing quote - \s*(?:\#.*)? # End of line comment - [\n\r]*\z # End of value -/x; -sub _process_val { - my ($val) = @_; - - if ( $val =~ $quote_re ) { - # If it matches the quote re, then $2 holds the value - $val = $2; - } - else { - # Otherwise, remove possible trailing comments - $val =~ s/\s*#.*//; - } - - if ( my ($num, $factor) = $val =~ m/(\d+)([KMGT])b?$/i ) { - # value is a size like 1k, 16M, etc. - my %factor_for = ( - k => 1_024, - m => 1_048_576, - g => 1_073_741_824, - t => 1_099_511_627_776, - ); - $val = $num * $factor_for{lc $factor}; - } - elsif ( $val =~ m/No default/ ) { - $val = ''; - } - return $val; -} - -# Sub: _mimic_show_variables -# Make the variables' values mimic SHOW VARIABLES. Different output formats -# list values differently. To make comparisons easier, outputs are made to -# mimic SHOW VARIABLES. -# -# Parameters: -# %args - Arguments -# -# Required Arguments: -# vars - Hashref of variables-values -# format - Config output format (mysqld, option_file, etc.) -sub _mimic_show_variables { - my ( %args ) = @_; - my @required_args = qw(vars format); - foreach my $arg ( @required_args ) { - die "I need a $arg arugment" unless $args{$arg}; - } - my ($vars, $format) = @args{@required_args}; - - foreach my $var ( keys %$vars ) { - if ( $vars->{$var} eq '' ) { - if ( $format eq 'mysqld' ) { - # mysqld lists "(No default value)" for certain variables - # that are not set/configured. _parse_varvals() turns this - # into a blank string. For most vars this means there's no - # value and SHOW VARIABLES will similarly show no value. - # But for log*, skip* and ignore* vars, SHOW VARIABLES will - # show OFF. But, log_error is an exception--it's practically - # always on. - if ( $var ne 'log_error' && $var =~ m/^(?:log|skip|ignore)/ ) { - $vars->{$var} = 'OFF'; - } - } - else { - # Output formats other than mysqld (e.g. option file), if - # a variable is listed then it's enabled, like --skip-federated. - # SHOW VARIBLES will show ON for these. - $vars->{$var} = 'ON'; - } - } - } - - return; -} - -sub _slurp_file { - my ( $file ) = @_; - die "I need a file argument" unless $file; - PTDEBUG && _d("Reading", $file); - open my $fh, '<', $file or die "Cannot open $file: $OS_ERROR"; - my $contents = do { local $/ = undef; <$fh> }; - close $fh; - return $contents; -} - -sub _get_version { - my ( $dbh ) = @_; - return unless $dbh; - my $version = $dbh->selectrow_arrayref('SELECT VERSION()')->[0]; - $version =~ s/(\d\.\d{1,2}.\d{1,2})/$1/; - PTDEBUG && _d('MySQL version', $version); - return $version; -} - -# ############################################################################# -# Accessor methods. -# ############################################################################# - -# Returns true if this MySQLConfig obj has the given variable. -sub has { - my ( $self, $var ) = @_; - return exists $self->{vars}->{$var}; -} - -# Return the value of the given variable. -sub value_of { - my ( $self, $var ) = @_; - return unless $var; - return $self->{vars}->{$var}; -} - -# Return hashref of all variables. -sub variables { - my ( $self, %args ) = @_; - return $self->{vars}; -} - -# Return hashref of duplicate variables. -sub duplicate_variables { - my ( $self ) = @_; - return $self->{duplicate_vars}; -} - -# Return arrayref of option files. -sub option_files { - my ( $self ) = @_; - return $self->{option_files}; -} - -# Return MySQL version. -sub mysql_version { - my ( $self ) = @_; - return $self->{mysql_version}; -} - -# Return the config file format (mysqld, option file, etc.) -sub format { - my ( $self ) = @_; - return $self->{format}; -} - -# Return true if the config is active (i.e. the effective config -# that MySQL is using; only true if config is from SHOW VARIABLES). -sub is_active { - my ( $self ) = @_; - return $self->{dbh} ? 1 : 0; -} - -sub has_engine { - my ($self, $engine) = @_; - if (!$self->{dbh}) { - die "invalid dbh in has_engine method"; - } - - my $rows = $self->{dbh}->selectall_arrayref('SHOW ENGINES', {Slice=>{}}); - my $is_enabled; - for my $row (@$rows) { - if ($row->{engine} eq 'ROCKSDB') { - $is_enabled = 1; - last; - } - } - return $is_enabled; -} - -sub _d { - my ($package, undef, $line) = caller 0; - @_ = map { (my $temp = $_) =~ s/\n/\n# /g; $temp; } - map { defined $_ ? $_ : 'undef' } - @_; - print STDERR "# $package:$line $PID ", join(' ', @_), "\n"; -} - -1; -} -# ########################################################################### -# End MySQLConfig package -# ########################################################################### -# ########################################################################### -# MySQLStatusWaiter package -# This package is a copy without comments from the original. The original -# with comments and its test file can be found in the Bazaar repository at, -# lib/MySQLStatusWaiter.pm -# t/lib/MySQLStatusWaiter.t -# See https://launchpad.net/percona-toolkit for more information. -# ########################################################################### -{ -package MySQLStatusWaiter; - -use strict; -use warnings FATAL => 'all'; -use POSIX qw( ceil ); -use English qw(-no_match_vars); -use constant PTDEBUG => $ENV{PTDEBUG} || 0; - -sub new { - my ( $class, %args ) = @_; - my @required_args = qw(max_spec get_status sleep oktorun); - foreach my $arg ( @required_args ) { - die "I need a $arg argument" unless defined $args{$arg}; - } - - PTDEBUG && _d('Parsing spec for max thresholds'); - my $max_val_for = _parse_spec($args{max_spec}); - if ( $max_val_for ) { - _check_and_set_vals( - vars => $max_val_for, - get_status => $args{get_status}, - threshold_factor => 0.2, # +20% - ); - } - - PTDEBUG && _d('Parsing spec for critical thresholds'); - my $critical_val_for = _parse_spec($args{critical_spec} || []); - if ( $critical_val_for ) { - _check_and_set_vals( - vars => $critical_val_for, - get_status => $args{get_status}, - threshold_factor => 1.0, # double (x2; +100%) - ); + PTDEBUG && _d('Parsing spec for critical thresholds'); + my $critical_val_for = _parse_spec($args{critical_spec} || []); + if ( $critical_val_for ) { + _check_and_set_vals( + vars => $critical_val_for, + get_status => $args{get_status}, + threshold_factor => 1.0, # double (x2; +100%) + ); } my $self = { @@ -9456,7 +9044,7 @@ sub _parse_spec { } } - return \%max_val_for; + return \%max_val_for; } sub max_values { @@ -9509,7 +9097,7 @@ sub wait { die "$var=$val exceeds its critical threshold " . "$self->{critical_val_for}->{$var}\n"; } - if ( $val >= $self->{max_val_for}->{$var} ) { + if ( !$val || $val >= $self->{max_val_for}->{$var} ) { $vals_too_high{$var} = $val; } else { @@ -9662,7 +9250,7 @@ use English qw(-no_match_vars); use constant PTDEBUG => $ENV{PTDEBUG} || 0; use Data::Dumper; -use Carp; +use Sys::SigAction qw( set_sig_handler ); $Data::Dumper::Indent = 1; $Data::Dumper::Sortkeys = 1; $Data::Dumper::Quotekeys = 0; @@ -9675,7 +9263,7 @@ sub new { } my $self = { - Quoter => $args{Quoter}, + Quoter => $args{Quoter}, }; return bless $self, $class; @@ -9722,39 +9310,65 @@ sub index_length { sub _get_first_values { my ($self, %args) = @_; - my @required_args = qw(Cxn tbl index n_index_cols); + my @required_args = qw(Cxn tbl index n_index_cols execute_timeout); foreach my $arg ( @required_args ) { die "I need a $arg argument" unless $args{$arg}; } - my ($cxn, $tbl, $index, $n_index_cols) = @args{@required_args}; + my ($cxn, $tbl, $index, $n_index_cols, $execute_timeout) = @args{@required_args}; my $q = $self->{Quoter}; my $index_struct = $tbl->{tbl_struct}->{keys}->{$index}; my $index_cols = $index_struct->{cols}; - my $index_columns; - eval { - $index_columns = join (', ', + my $index_columns = join (', ', map { $q->quote($_) } @{$index_cols}[0..($n_index_cols - 1)]); - }; - if ($EVAL_ERROR) { - confess "$EVAL_ERROR"; - } - - my @where; foreach my $col ( @{$index_cols}[0..($n_index_cols - 1)] ) { push @where, $q->quote($col) . " IS NOT NULL" } - my $sql = "SELECT /*!40001 SQL_NO_CACHE */ $index_columns " . "FROM $tbl->{name} FORCE INDEX (" . $q->quote($index) . ") " . "WHERE " . join(' AND ', @where) . " ORDER BY $index_columns " . "LIMIT 1 /*key_len*/"; # only need 1 row PTDEBUG && _d($sql); - my $vals = $cxn->dbh()->selectrow_arrayref($sql); + + my $vals; + eval { +# ################################################################### +# If the sql executes timeout,we will kill it and then skip the table checksumming. +# ################################################################### + my $SIG_ALRM=set_sig_handler('ALRM',sub { + $cxn->dbh()->clone()->do("KILL QUERY ".$cxn->dbh()->{"mysql_thread_id"}); + die "_get_first_values execute sql::$sql timeout ${execute_timeout}s\n"; + }); + alarm $execute_timeout; + $vals = $cxn->dbh()->selectrow_arrayref($sql); + alarm 0; + }; + alarm 0; + if ( $EVAL_ERROR ) { + my $error_info="$EVAL_ERROR"; + + my $times=10; + my $i=1; + my $r=undef; + while($times!=0){ + eval{ + $r=$cxn->dbh()->selectrow_hashref("select $i"); + }; + if(defined $r->{$i} and $i==$r->{$i}){ + last; + }else{ + PTDEBUG && _d("_get_first_values execute sql,kill mysql_thread_id:".$cxn->dbh()->{"mysql_thread_id"}); + $cxn->dbh()->clone()->do("KILL QUERY ".$cxn->dbh()->{"mysql_thread_id"}); + } + --$times; + ++$i; + } + die "$error_info"; + } return $vals; } @@ -9775,15 +9389,14 @@ sub _make_range_query { if ( $n_index_cols > 1 ) { foreach my $n ( 0..($n_index_cols - 2) ) { my $col = $index_cols->[$n]; - my $val = $tbl->{tbl_struct}->{type_for}->{$col} eq 'enum' ? "CAST(? AS UNSIGNED)" : "?"; - push @where, $q->quote($col) . " = " . $val; + my $val = $vals->[$n]; + push @where, $q->quote($col) . " = ?"; } } my $col = $index_cols->[$n_index_cols - 1]; my $val = $vals->[-1]; # should only be as many vals as cols - my $condition = $tbl->{tbl_struct}->{type_for}->{$col} eq 'enum' ? "CAST(? AS UNSIGNED)" : "?"; - push @where, $q->quote($col) . " >= " . $condition; + push @where, $q->quote($col) . " >= ?"; my $sql = "EXPLAIN SELECT /*!40001 SQL_NO_CACHE */ * " . "FROM $tbl->{name} FORCE INDEX (" . $q->quote($index) . ") " @@ -9959,8 +9572,8 @@ use constant PTDEBUG => $ENV{PTDEBUG} || 0; use POSIX qw(signal_h); use List::Util qw(max); use Time::HiRes qw(sleep time); +use Sys::SigAction qw( set_sig_handler ); use Data::Dumper; -use Carp; $Data::Dumper::Indent = 1; $Data::Dumper::Sortkeys = 1; $Data::Dumper::Quotekeys = 0; @@ -9970,22 +9583,20 @@ use sigtrap 'handler', \&sig_int, 'normal-signals'; my $oktorun = 1; my $print_header = 1; my $exit_status = 0; -my $original_qrt_plugin_master_status = undef; # "exit codes 1 - 2, 126 - 165, and 255 [1] have special meanings, # and should therefore be avoided for user-specified exit parameters" # http://www.tldp.org/LDP/abs/html/exitcodes.html our %PTC_EXIT_STATUS = ( # General flags: - ERROR => 1, - ALREADY_RUNNING => 2, - CAUGHT_SIGNAL => 4, - NO_SLAVES_FOUND => 8, + ERROR => 1, + ALREADY_RUNNING => 2, + CAUGHT_SIGNAL => 4, + NO_SLAVES_FOUND => 8, # Tool-specific flags: - TABLE_DIFF => 16, - SKIP_CHUNK => 32, - SKIP_TABLE => 64, - REPLICATION_STOPPED => 128, + TABLE_DIFF => 16, + SKIP_CHUNK => 32, + SKIP_TABLE => 64, ); # The following two hashes are used in exec_nibble(). @@ -9995,11 +9606,10 @@ our %PTC_EXIT_STATUS = ( # Completely ignore these error codes. my %ignore_code = ( # Error: 1592 SQLSTATE: HY000 (ER_BINLOG_UNSAFE_STATEMENT) - # Message: Statement may not be safe to log in statement format. + # Message: Statement may not be safe to log in statement format. # Ignore this warning because we have purposely set statement-based # replication. 1592 => 1, - 1300 => 1, ); # Warn once per-table for these error codes if the error message @@ -10020,7 +9630,7 @@ my %warn_code = ( sub main { # Reset global vars else tests will fail in strange ways. local @ARGV = @_; - $oktorun = 1; + $oktorun = 1; $print_header = 1; $exit_status = 0; @@ -10157,49 +9767,62 @@ sub main { # sql_mode ONLY_FULL_GROUP_BY often raises error even when query is # safe and deterministic. It's best to turn it off for the session # at this point. - $sql = 'SELECT @@SQL_MODE'; + $sql = 'show variables like \'SQL_MODE\';'; PTDEBUG && _d($dbh, $sql); - my ($sql_mode) = eval { $dbh->selectrow_array($sql) }; + my ($sql_mode) = eval { ${$dbh->selectrow_arrayref($sql)}[1] }; if ( $EVAL_ERROR ) { die "Error getting the current SQL_MODE: $EVAL_ERROR"; } $sql_mode =~ s/ONLY_FULL_GROUP_BY//i; - $sql = qq[SET SQL_MODE='$sql_mode']; + $sql = qq[ /*!40101 SET SQL_MODE='$sql_mode' */ ]; PTDEBUG && _d($dbh, $sql); eval { $dbh->do($sql) }; if ( $EVAL_ERROR ) { die "Error setting SQL_MODE" . ": $EVAL_ERROR"; } + # added by DBA + if ( VersionParser->new($dbh) <= '5.6.3' ) { + $sql = 'SELECT @@log_warnings=0'; + eval{ + PTDEBUG && _d($dbh, $sql); + $dbh->do($sql); + }; + if( $EVAL_ERROR ) { + PTDEBUG && _d("Ignoring warning! Failed to $sql: $EVAL_ERROR"); + warn "Failed to $sql: $EVAL_ERROR"; + } + } - - # https://bugs.launchpad.net/percona-toolkit/+bug/919352 - # The tool shouldn't blindly attempt to change binlog_format; - # instead, it should check if it's already set to STATEMENT. - # This is becase starting with MySQL 5.1.29, changing the format - # requires a SUPER user. - if ( VersionParser->new($dbh) >= '5.1.5' ) { - $sql = 'SELECT @@binlog_format'; - PTDEBUG && _d($dbh, $sql); - my ($original_binlog_format) = $dbh->selectrow_array($sql); - PTDEBUG && _d('Original binlog_format:', $original_binlog_format); - if ( $original_binlog_format !~ /STATEMENT/i ) { - $sql = q{/*!50108 SET @@binlog_format := 'STATEMENT'*/}; - eval { - PTDEBUG && _d($dbh, $sql); - $dbh->do($sql); - }; - if ( $EVAL_ERROR ) { - die "Failed to $sql: $EVAL_ERROR\n" - . "This tool requires binlog_format=STATEMENT, " - . "but the current binlog_format is set to " - ."$original_binlog_format and an error occurred while " - . "attempting to change it. If running MySQL 5.1.29 or newer, " - . "setting binlog_format requires the SUPER privilege. " - . "You will need to manually set binlog_format to 'STATEMENT' " - . "before running this tool.\n"; - } - } + if ( $o->get('check-binlog-format') ) { + # https://bugs.launchpad.net/percona-toolkit/+bug/919352 + # The tool shouldn't blindly attempt to change binlog_format; + # instead, it should check if it's already set to STATEMENT. + # This is becase starting with MySQL 5.1.29, changing the format + # requires a SUPER user. + if ( VersionParser->new($dbh) >= '5.1.5' ) { + $sql = 'SELECT @@binlog_format'; + PTDEBUG && _d($dbh, $sql); + my ($original_binlog_format) = $dbh->selectrow_array($sql); + PTDEBUG && _d('Original binlog_format:', $original_binlog_format); + if ( $original_binlog_format !~ /STATEMENT/i ) { + $sql = q{/*!50108 SET @@binlog_format := 'STATEMENT'*/}; + eval { + PTDEBUG && _d($dbh, $sql); + $dbh->do($sql); + }; + if ( $EVAL_ERROR ) { + die "Failed to $sql: $EVAL_ERROR\n" + . "This tool requires binlog_format=STATEMENT, " + . "but the current binlog_format is set to " + ."$original_binlog_format and an error occurred while " + . "attempting to change it. If running MySQL 5.1.29 or newer, " + . "setting binlog_format requires the SUPER privilege. " + . "You will need to manually set binlog_format to 'STATEMENT' " + . "before running this tool.\n"; + } + } + } } # Set transaction isolation level. We set binlog_format to STATEMENT, @@ -10227,7 +9850,6 @@ sub main { . "level to REPEATABLE-READ.\n"; } - return; }; @@ -10256,59 +9878,6 @@ sub main { my $master_dbh = $master_cxn->dbh(); # just for brevity my $master_dsn = $master_cxn->dsn(); # just for brevity - if ($o->get('disable-qrt-plugin')) { - eval { - $master_dbh->selectrow_arrayref('SELECT @@query_response_time_session_stats' ); - }; - if ($EVAL_ERROR) { - $original_qrt_plugin_master_status = undef; - PTDEBUG && _d('QRT plugin is not installed: '.$EVAL_ERROR); - } else { - ($original_qrt_plugin_master_status) = $master_dbh->selectrow_arrayref('SELECT @@query_response_time_stats' ); - PTDEBUG && _d("Disabling qrt plugin on master server"); - $master_dbh->do('SET GLOBAL query_response_time_stats = off'); - } - } - - my @ignored_engines = keys %{$o->get('ignore-engines')}; - my @rocksdb_ignored = grep(/^ROCKSDB$/i, @ignored_engines); - if (!@rocksdb_ignored) { - print STDOUT "Checking if all tables can be checksummed ...\n"; - my $mysql_config = MySQLConfig->new(dbh => $master_dbh); - my $has_rocksdb = $mysql_config->has_engine('ROCKSDB'); - if ($has_rocksdb) { - my $sql = "SELECT DISTINCT `table_name`, `table_schema`, `engine` FROM `information_schema`.`tables` " . - " WHERE `table_schema` NOT IN ('mysql', 'information_schema', 'performance_schema') " . - " AND `engine` LIKE 'ROCKSDB'"; - my $rows = $master_dbh->selectall_arrayref($sql, {Slice=>{}}); - my $not_ignored_rocks_db_tables_count= scalar @$rows; - if (@$rows) { - my ($tables_list, $separator) = ('', ''); - for my $row (@$rows) { - $tables_list .= $separator.$row->{table_schema}.".".$row->{table_name}; - $separator = ", "; - if ($o->get('ignore-tables')->{"$row->{table_schema}.$row->{table_name}"}) { - $not_ignored_rocks_db_tables_count--; - } - } - if ($not_ignored_rocks_db_tables_count > 0) { - print STDERR "\nThe RocksDB storage engine is not supported with pt-table-checksum " . - "since RocksDB does not support binlog_format=STATEMENT.\n". - "We have identified the following tables using MyRocks storage engine:\n"; - for my $row (@$rows) { - print "$row->{table_schema}.$row->{table_name}\n"; - } - print STDERR "\nPlease add ROCKSDB to the list of --ignore-engines\n"; - print STDERR "--ignore-engines=FEDERATED,MRG_MyISAM,RocksDB\n"; - print STDERR "\nConversely exclude the MyRocks tables explicitly:\n"; - print STDERR "--ignore-tables=$tables_list\n\n"; - print STDERR "Aborting"; - exit($PTC_EXIT_STATUS{SKIP_TABLE}); - } - } - } - print STDOUT "Starting checksum ...\n"; - } # ######################################################################## # Set up the run time, if any. Anything that waits should check this # between waits, else this will happen: @@ -10316,6 +9885,7 @@ sub main { # ######################################################################## my $have_time; if ( my $run_time = $o->get('run-time') ) { + PTDEBUG && _d("run-time set to:", $run_time); my $rt = Runtime->new( now => sub { return time; }, run_time => $run_time, @@ -10361,7 +9931,6 @@ sub main { OptionParser => $o, DSNParser => $dp, Quoter => $q, - channel => $o->get('channel') ); my $slaves = []; # all slaves (that we can find) @@ -10369,7 +9938,7 @@ sub main { # ######################################################################## # Create --plugin. - # ######################################################################## + # ######################################################################## my $plugin; if ( my $file = $o->get('plugin') ) { die "--plugin file $file does not exist\n" unless -f $file; @@ -10470,7 +10039,7 @@ sub main { } } - +=pod # https://bugs.launchpad.net/percona-toolkit/+bug/938068 if ( $o->get('check-binlog-format') ) { my $master_binlog = 'STATEMENT'; @@ -10502,6 +10071,7 @@ sub main { } die $err if $err; } +=cut if ( $cluster_name_for{$master_cxn} ) { if ( !@$slaves ) { @@ -10509,7 +10079,7 @@ sub main { die $master_cxn->name() . " is a cluster node but no other nodes " . "or regular replicas were found. Use --recursion-method=dsn " . "to specify the other nodes in the cluster.\n"; - } + } } # Make sure the master and all node are in the same cluster. @@ -10590,23 +10160,6 @@ sub main { } } - for my $slave (@$slaves) { - my $qrt_plugin_status; - eval { - ($qrt_plugin_status) = $slave->{dbh}->selectrow_arrayref('SELECT @@QUERY_RESPONSE_TIME_SESSION_STATS' ); - }; - if ($EVAL_ERROR) { - PTDEBUG && _d('QRT plugin is not installed on slave '.$slave->{dsn_name}); - $slave->{qrt_plugin_status} = undef; - next; - } - $slave->{qrt_plugin_status} = $qrt_plugin_status->[0]; - if ($slave->{qrt_plugin_status}) { - PTDEBUG && _d("Disabling qrt plugin state on slave ".$slave->{dsn_name}); - $slave->{dbh}->do('SET GLOBAL query_response_time_stats = off'); - } - } - if ( $o->get('check-slave-lag') ) { PTDEBUG && _d('Will use --check-slave-lag to check for slave lag'); my $cxn = $make_cxn->( @@ -10671,7 +10224,7 @@ sub main { # ##################################################################### if ( $o->get('replicate-check') && $o->get('replicate-check-only') ) { PTDEBUG && _d('Will --replicate-check and exit'); - + # --plugin hook if ( $plugin && $plugin->can('before_replicate_check') ) { $plugin->before_replicate_check(); @@ -10687,7 +10240,7 @@ sub main { $diffs = filter_tables_replicate_check_only($diffs, $o); if ( @$diffs ) { $exit_status |= $PTC_EXIT_STATUS{TABLE_DIFF}; - if ( $o->get('quiet') < 2 ) { + if ( $o->get('quiet') < 2 ) { print_checksum_diffs( cxn => $slave, diffs => $diffs, @@ -10781,8 +10334,8 @@ sub main { }; my $get_lag; - # The plugin is able to override the slavelag check so tools like - # pt-heartbeat or other replicators (Tungsten...) can be used to + # The plugin is able to override the slavelag check so tools like + # pt-heartbeat or other replicators (Tungsten...) can be used to # measure replication lag if ( $plugin && $plugin->can('get_slave_lag') ) { $get_lag = $plugin->get_slave_lag(oktorun => \$oktorun); @@ -10812,14 +10365,13 @@ sub main { return $slave_lag; }; } - + $replica_lag = new ReplicaLagWaiter( slaves => $slave_lag_cxns, max_lag => $o->get('max-lag'), oktorun => sub { return $oktorun && $have_time->(); }, get_lag => $get_lag, sleep => $sleep, - fail_on_stopped_replication => $o->get('fail-on-stopped-replication'), ); my $get_status; @@ -10852,7 +10404,7 @@ sub main { . "SHOW GLOBAL STATUS. Current value for this option is:\n" . " --max-load " . (join(',', @{$o->get('max-load')})) . "\n"; } - + if ( $o->get('progress') ) { $replica_lag_pr = new Progress( jobsize => scalar @$slaves, @@ -10902,7 +10454,7 @@ sub main { . " lower_boundary, upper_boundary, this_cnt, this_crc) " . "SELECT" . ($cluster->is_cluster_node($master_cxn) ? ' /*!99997*/' : '') - . " ?, ?, ?, ?, ?, ?, ?, ?,"; + . "?, ?, ?, ?, ?, ?, ?, ?,"; my $past_cols = " COUNT(*), '0'"; # ######################################################################## @@ -10942,7 +10494,7 @@ sub main { my $total_rate = 0; my $tn = new TableNibbler(TableParser => $tp, Quoter => $q); my $retry = new Retry(); - + # --chunk-size-limit has two purposes. The 1st, as documented, is # to prevent oversized chunks when the chunk index is not unique. # The 2nd is to determine if the table can be processed in one chunk @@ -10986,7 +10538,7 @@ sub main { print "Resuming from $tbl->{db}.$tbl->{tbl} chunk " . "$last_chunk->{chunk}, timestamp $last_chunk->{ts}\n"; } - } + } else { # Problem resuming or no next lower boundary. PTDEBUG && _d('No more chunks; resuming from next table'); @@ -11119,6 +10671,7 @@ sub main { tbl => $tbl, index => $nibble_iter->nibble_index(), n_index_cols => $o->get('chunk-index-columns'), + execute_timeout => $o->has('execute-timeout')?$o->get('execute-timeout'):30.0, ); if ( !$key || lc($key) ne lc($nibble_iter->nibble_index()) ) { die "Cannot determine the key_len of the chunk index " @@ -11132,7 +10685,7 @@ sub main { elsif ( !$key_len ) { die "The key_len of the $key index is " . (defined $key_len ? "zero" : "NULL") - . ", but this should not be possible. " + . ", but this should not be possible. " . "See --[no]check-plan in the documentation for more " . "information."; } @@ -11148,7 +10701,7 @@ sub main { Quoter => $q, ); PTDEBUG && _d($delete_sth->{Statement}); - $delete_sth->execute($o->get('host'), $o->get('port'), $tbl->{db}, $tbl->{tbl}); + $delete_sth->execute($tbl->{db}, $tbl->{tbl}); } # USE the correct db while checksumming this table. The "correct" @@ -11273,7 +10826,8 @@ sub main { my (%args) = @_; my $tbl = $args{tbl}; my $nibble_iter = $args{NibbleIterator}; - + my $o = $args{OptionParser}; + # Don't need to do anything here if we're just --explain'ing. return if $o->get('explain'); @@ -11299,6 +10853,10 @@ sub main { my ($crc, $cnt) = $fetch_sth->fetchrow_array(); $tbl->{checksum_results}->{n_rows} += $cnt || 0; + if($cnt >= 1 and $cnt <=10){ + $tbl->{checksum_results}->{fewrows_times}+=1; + } + #$tbl->{checksum_results}->{n_time} += $tbl->{nibble_time} || 0.0; # We're working on the master, so update the checksum's master_cnt # and master_crc. @@ -11309,7 +10867,7 @@ sub main { $cnt, # master_cnt # WHERE $o->get('host'), - $o->get('port'), + $o->get('port'), $tbl->{db}, $tbl->{tbl}, $chunk, @@ -11357,7 +10915,6 @@ sub main { # Update chunk-size based on rows/s checksum rate. $nibble_iter->set_chunk_size($tbl->{chunk_size}); - PTDEBUG && _d('Updated chunk size: '.$tbl->{chunk_size}); } # Every table should have a Progress obj; update it. @@ -11374,6 +10931,28 @@ sub main { $sys_load_pr->start() if $sys_load_pr; $sys_load->wait(Progress => $sys_load_pr); +# ####################################################################### +# When we run pt-table-checksum on production environment, +# we found that the efficiency of some tables chunk index is so slowly,--chunk-size even automatically reduce less 10. +# These tables are always large,even 10 000 000 rows+, will never finish checksumming. +# So we use --check-few-rows-times-limit to control that when --chunk-size has been automatically reduced less 10. +# a table will continue nibbing --check-few-rows-times-limit times at most. +# added by DBA 2018-04-26. +# ####################################################################### + my $check_few_rows_times_limit=$o->has('check-few-rows-times-limit')?$o->get('check-few-rows-times-limit'):10; + if($check_few_rows_times_limit!=0 and defined $tbl->{checksum_results}->{fewrows_times} and $tbl->{checksum_results}->{fewrows_times} > $check_few_rows_times_limit){ + # ####################################################################### + # if dba found that checksumming result of the table in the $replicate_table is ok,dba would think the table data are consistent. + # However in this case,only a part of table data has been checksumed,it's easy to lead to misleading. + # So we thought that deleting the checksuming result of the table in the $replicate_table and printing error info would be good. + # ####################################################################### + $delete_sth = $master_dbh->prepare( + "DELETE FROM $repl_table WHERE db = ? AND tbl = ?"); + PTDEBUG && _d($delete_sth->{Statement}); + $delete_sth->execute($tbl->{db}, $tbl->{tbl}); + die "chunk-size=1 more than $check_few_rows_times_limit times.Maybe the efficiency of chunk index is so slow.Now deleting it's checksum results and skiping it."; + } + return; }, done => sub { # done nibbling table @@ -11401,12 +10980,6 @@ sub main { # Wait for the last checksum of this table to replicate # to each slave. - # MySQL 8+ replication is slower than 5.7 and the old wait_for_last_checksum alone - # was failing. The new wait_for_slaves checks that Read_Master_Log_Pos on slaves is - # greather or equal Position in the master - if (!$args{Cxn}->is_cluster_node()) { - wait_for_slaves(master_dbh => $args{Cxn}->dbh(), master_slave => $ms, slaves => $slaves); - } wait_for_last_checksum( tbl => $tbl, repl_table => $repl_table, @@ -11437,13 +11010,6 @@ sub main { map { $diff_chunks{ $_->{chunk} }++ } @$diffs; $exit_status |= $PTC_EXIT_STATUS{TABLE_DIFF}; } - - my $max_cnt_diff=0; - for my $diff (@$diffs) { - if (abs($diff->{cnt_diff}) > $max_cnt_diff) { - $tbl->{checksum_results}->{max_rows_cnt_diff} = abs($diff->{cnt_diff}); - } - } }; if ($EVAL_ERROR) { if ( $o->get('quiet') < 2 ) { @@ -11473,7 +11039,7 @@ sub main { # ######################################################################## # Init the --plugin. - # ######################################################################## + # ######################################################################## # --plugin hook if ( $plugin && $plugin->can('init') ) { @@ -11503,10 +11069,23 @@ sub main { # small, like 0.001, then Perl int() will probably round the # chunk size to zero, which is invalid, so we default to 1. my $chunk_time = $o->get('chunk-time'); - my $chunk_size = $chunk_time && $total_rate - ? int($total_rate * $chunk_time) || 1 - : $o->get('chunk-size'); - $tbl->{chunk_size} = $chunk_size; + # ####################################################################### + # When we run pt-table-checksum on production environment, + # we found that if the tables checksumed at the beginning were some little tables which's avg_row_length is small,and then $total_rate would be so large. + # Initial chunk_size value of next table would be large too. + # And now if next table was a large table which's avg_row_length & rows was large, + # the first chunk of this large table checksuming would execute a long time,even reach 100s+. + # So we use --init-chunk-size-without-total-rate to control initial chunk_size of every table with $total_rate*$chunk_time or with 1000. + # added by DBA 2017-10-26 17:22. + # ####################################################################### + if($o->get('init-chunk-size-without-total-rate')){ + $tbl->{chunk_size} =$o->get('chunk-size') ? $o->get('chunk-size') : 1000; + }else{ + $tbl->{chunk_size} = $chunk_time && $total_rate + ? int($total_rate * $chunk_time) || 1 + : $o->get('chunk-size'); + } + #$tbl->{chunk_size} = $chunk_size; # Make a nibble iterator for this table. This should only fail # if the table has no indexes and is too large to checksum in @@ -11582,7 +11161,7 @@ sub main { # TODO: this now happens in 3 places, search for 'columns'. my $tbl_struct = $tbl->{tbl_struct}; my $ignore_col = $o->get('ignore-columns') || {}; - my $all_cols = $o->get('columns') || $tbl_struct->{non_generated_cols}; + my $all_cols = $o->get('columns') || $tbl_struct->{cols}; my @cols = map { lc $_ } grep { !$ignore_col->{$_} } @$all_cols; @@ -11602,7 +11181,7 @@ sub main { # from the done callback, uses this start time. $tbl->{checksum_results}->{start_time} = time; 1 while $nibble_iter->next(); - + # --plugin hook if ( $plugin && $plugin->can('after_checksum_table') ) { $plugin->after_checksum_table(); @@ -11610,9 +11189,6 @@ sub main { } }; if ( $EVAL_ERROR ) { - if ($EVAL_ERROR =~ m/replication/) { - exit($PTC_EXIT_STATUS{REPLICATION_STOPPED}); - } # This should not happen. If it does, it's probably some bug # or error that we're not catching. warn ts(($oktorun ? "Error " : "Fatal error ") @@ -11631,25 +11207,6 @@ sub main { } } - # Restore origin QRT pligin state - if ($o->get('disable-qrt-plugin')) { - eval { - if ($original_qrt_plugin_master_status) { - PTDEBUG && _d("Restoring qrt plugin state on master server"); - $master_dbh->do("SET GLOBAL query_response_time_stats = $original_qrt_plugin_master_status->[0]"); - } - for my $slave (@$slaves) { - if ($slave->{qrt_plugin_status}) { - PTDEBUG && _d("Restoring qrt plugin state on slave ".$slave->{dsn_name}); - $slave->{dbh}->do("SET GLOBAL query_response_time_stats = $slave->{qrt_plugin_status}"); - } - } - }; - if ($EVAL_ERROR) { - warn "Cannot restore qrt_plugin status: $EVAL_ERROR"; - } - } - PTDEBUG && _d('Exit status', $exit_status, 'oktorun', $oktorun, 'have time', $have_time->()); @@ -11680,9 +11237,6 @@ sub nibble_is_safe { # See https://bugs.launchpad.net/percona-toolkit/+bug/987393 my $sth = $nibble_iter->statements(); my $boundary = $nibble_iter->boundaries(); - if (!defined($boundary) || !$boundary || (!$boundary->{lower} || !$boundary->{upper})) { - return 0; - } my $expl = explain_statement( tbl => $tbl, sth => $sth->{explain_nibble}, @@ -11691,7 +11245,7 @@ sub nibble_is_safe { # Ensure that MySQL is using the chunk index if the table is being chunked. if ( !$nibble_iter->one_nibble() - && lc($expl->{key} || '') ne lc($nibble_iter->nibble_index() || '') ) { + && lc($expl->{key} || '') ne lc($nibble_iter->nibble_index() || '') ) { if ( !$tbl->{warned}->{not_using_chunk_index}++ && $o->get('quiet') < 2 ) { warn ts("Skipping chunk " . $nibble_iter->nibble_number() @@ -11706,7 +11260,7 @@ sub nibble_is_safe { # Ensure that the chunk isn't too large if there's a --chunk-size-limit. # If single-chunking the table, this has already been checked, so it # shouldn't have changed. If chunking the table with a non-unique key, - # oversize chunks are possible. + # oversize chunks are possible. if ( my $limit = $o->get('chunk-size-limit') ) { my $oversize_chunk = ($expl->{rows} || 0) >= $tbl->{chunk_size} * $limit; if ( $oversize_chunk @@ -11730,7 +11284,14 @@ sub nibble_is_safe { # Ensure that MySQL is still using the entire index. # https://bugs.launchpad.net/percona-toolkit/+bug/1010232 - if ( !$nibble_iter->one_nibble() + # ####################################################### + # We think that nibble SQL must use entire index of the table is unnecessary. + # It's enough to use the desired index. + # So we add option '--[no]skip-check-key-len default=yes' to control this action. + # added by DBA 2017-10-20 20:55 + # ####################################################### + if (!$o->get('skip-check-key-len') + && !$nibble_iter->one_nibble() && $tbl->{key_len} && ($expl->{key_len} || 0) < $tbl->{key_len} ) { if ( !$tbl->{warned}->{key_len}++ @@ -11766,6 +11327,7 @@ sub exec_nibble { my $ub_quoted = $q->serialize_list(@{$boundary->{upper}}); my $chunk = $nibble_iter->nibble_number(); my $chunk_index = $nibble_iter->nibble_index(); + my $timeout = $o->has('execute-timeout')?$o->get('execute-timeout'):30.0; return $retry->retry( tries => $o->get('retries'), @@ -11774,38 +11336,86 @@ sub exec_nibble { # ################################################################### # Start timing the checksum query. # ################################################################### - my $t_start = time; + my $t_start = time; # Execute the REPLACE...SELECT checksum query. # XXX This call and others like it are relying on a Perl oddity. # See https://bugs.launchpad.net/percona-toolkit/+bug/987393 - PTDEBUG && _d($sth->{nibble}->{Statement}, - 'lower boundary:', @{$boundary->{lower}}, - 'upper boundary:', @{$boundary->{upper}}); - $sth->{nibble}->execute( - # REPLACE INTO repl_table SELECT - $o->get('host'), # master ip - $o->get('port'), # master port - $tbl->{db}, # db - $tbl->{tbl}, # tbl - $chunk, # chunk (number) - $chunk_index, # chunk_index - $lb_quoted, # lower_boundary - $ub_quoted, # upper_boundary - # this_cnt, this_crc WHERE - @{$boundary->{lower}}, # upper boundary values - @{$boundary->{upper}}, # lower boundary values - ); - - my $t_end = time; - # ################################################################### - # End timing the checksum query. - # ################################################################### - - # Check if checksum query caused any warnings. - my $sql_warn = 'SHOW WARNINGS'; - PTDEBUG && _d($sql_warn); - my $warnings = $dbh->selectall_arrayref($sql_warn, { Slice => {} } ); + PTDEBUG && _d($sth->{nibble}->{Statement}, + 'lower boundary:', @{$boundary->{lower}}, + 'upper boundary:', @{$boundary->{upper}}); + eval { +# ################################################################### +# If the nibble sql executes timeout,we will kill it and then skip the table checksumming. +# added by DBA 2018-04-10 +# ################################################################### + my $SIG_ALRM=set_sig_handler('ALRM',sub { + my $statement=$sth->{nibble}->{Statement}; + my $boundary_list=(); + push @$boundary_list,$tbl->{db}; + push @$boundary_list,$tbl->{tbl}; + push @$boundary_list,$chunk; + push @$boundary_list,$chunk_index; + push @$boundary_list,$lb_quoted; + push @$boundary_list,$ub_quoted; + push @$boundary_list,@{$boundary->{lower}}; + push @$boundary_list,@{$boundary->{upper}}; + foreach my $ele(@$boundary_list[0..@$boundary_list-1]){ + $statement=~ s#\?#'$ele'#; + } + + $cxn->dbh()->clone()->do("KILL QUERY ".$cxn->dbh()->{"mysql_thread_id"}); + die "exec_nibble execute nibble sql::$statement timeout ${timeout}s\n"; + }); + alarm $timeout; + $sth->{nibble}->execute( +# REPLACE INTO repl_table SELECT + $o->get('host'), + $o->get('port'), + $tbl->{db}, # db + $tbl->{tbl}, # tbl + $chunk, # chunk (number) + $chunk_index, # chunk_index + $lb_quoted, # lower_boundary + $ub_quoted, # upper_boundary +# this_cnt, this_crc WHERE + @{$boundary->{lower}}, # upper boundary values + @{$boundary->{upper}}, # lower boundary values + ); + alarm 0; + }; + alarm 0; + if ( $EVAL_ERROR ) { + my $error_info="$EVAL_ERROR"; + + my $times=10; + my $i=1; + my $r=undef; + while($times!=0){ + eval{ + $r=$cxn->dbh()->selectrow_hashref("select $i"); + }; + if(defined $r->{$i} and $i==$r->{$i}){ + last; + }else{ + PTDEBUG && _d("exec_nibble execute nibble sql,kill mysql_thread_id:".$cxn->dbh()->{"mysql_thread_id"}); + $cxn->dbh()->clone()->do("KILL QUERY ".$cxn->dbh()->{"mysql_thread_id"}); + } + --$times; + ++$i; + } + die "$error_info"; + } + + my $t_end = time; +# ################################################################### +# End timing the checksum query. +# ################################################################### + +# Check if checksum query caused any warnings. + my $sql_warn = 'SHOW WARNINGS'; + PTDEBUG && _d($sql_warn); + my $warnings = $cxn->dbh()->selectall_arrayref($sql_warn, { Slice => {} } ); foreach my $warning ( @$warnings ) { my $code = ($warning->{code} || 0); my $message = $warning->{message}; @@ -11905,8 +11515,8 @@ sub exec_nibble { } { -my $line_fmt = "%14s %6s %6s %8s % 10s %7s %7s %7s %-s\n"; -my @headers = qw(TS ERRORS DIFFS ROWS DIFF_ROWS CHUNKS SKIPPED TIME TABLE); +my $line_fmt = "%14s %6s %6s %8s %7s %7s %7s %-s\n"; +my @headers = qw(TS ERRORS DIFFS ROWS CHUNKS SKIPPED TIME TABLE); sub print_checksum_results { my (%args) = @_; @@ -11927,7 +11537,6 @@ sub print_checksum_results { $res->{errors} || 0, $res->{diffs} || 0, $res->{n_rows} || 0, - $tbl->{checksum_results}->{max_rows_cnt_diff} || 0, $res->{n_chunks} || 0, $res->{skipped} || 0, sprintf('%.3f', $res->{start_time} ? time - $res->{start_time} : 0), @@ -12059,7 +11668,7 @@ sub check_repl_table { } } - + # USE the correct db (probably the repl db, but maybe --replicate-database). use_repl_db(%args); @@ -12173,11 +11782,11 @@ sub check_repl_table { if ( $o->get('binary-index') ) { PTDEBUG && _d('--binary-index : checking if replicate table has binary type columns'); my $create_table = $tp->get_create_table( $dbh, $db, $tbl ); - if ( $create_table !~ /lower_boundary`?\s+BLOB/si - || $create_table !~ /upper_boundary`?\s+BLOB/si ) + if ( $create_table !~ /lower_boundary`?\s+BLOB/si + || $create_table !~ /upper_boundary`?\s+BLOB/si ) { - die "--binary-index was specified but the current checksum table ($db.$tbl) uses" - ." TEXT columns. To use BLOB columns, drop the current checksum table, then recreate" + die "--binary-index was specified but the current checksum table ($db.$tbl) uses" + ." TEXT columns. To use BLOB columns, drop the current checksum table, then recreate" ." it by specifying --create-replicate-table --binary-index."; } } @@ -12365,7 +11974,7 @@ sub create_repl_table { die "I need a $arg argument" unless $args{$arg}; } my ($dbh, $repl_table, $o) = @args{@required_args}; - PTDEBUG && _d('Creating --replicate table', $repl_table); + PTDEBUG && _d('Creating --replicate table', $repl_table); my $sql = $o->read_para_after(__FILE__, qr/MAGIC_create_replicate/); $sql =~ s/CREATE TABLE checksums/CREATE TABLE IF NOT EXISTS $repl_table/; $sql =~ s/;$//; @@ -12407,6 +12016,11 @@ sub explain_statement { PTDEBUG && _d($sth->{Statement}, 'params:', @$vals); $sth->execute(@$vals); $expl = $sth->fetchrow_hashref(); + if($tbl->{name} =~ m/logging_logentry/i){ + print "explain statement==".Dumper($sth->{Statement})."\n"; + print "vals==".Dumper(@$vals)."\n"; + print "expl===".Dumper($expl)."\n"; + } $sth->finish(); }; if ( $EVAL_ERROR ) { @@ -12428,7 +12042,7 @@ sub last_chunk { PTDEBUG && _d('Getting last chunk for --resume'); my $sql = "SELECT * FROM $repl_table FORCE INDEX (ts_db_tbl) " - . "WHERE master_cnt IS NOT NULL AND master_ip = ? AND master_port = ? " + . "WHERE master_cnt IS NOT NULL AND master_ip = ? AND master_port = ?" . "ORDER BY ts DESC, db DESC, tbl DESC LIMIT 1"; PTDEBUG && _d($sql); my $sth = $dbh->prepare($sql); @@ -12467,7 +12081,7 @@ sub have_more_chunks { if (lc($last_chunk->{chunk_index} || '') ne $chunk_index) { warn ts("Cannot resume from table $tbl->{db}.$tbl->{tbl} chunk " . "$last_chunk->{chunk} because the chunk indexes are different: " - . ($last_chunk->{chunk_index} ? $last_chunk->{chunk_index} + . ($last_chunk->{chunk_index} ? $last_chunk->{chunk_index} : "no index") . " was used originally but " . ($chunk_index ? $chunk_index : "no index") @@ -12482,20 +12096,6 @@ sub have_more_chunks { return 1; # more chunks } -sub wait_for_slaves { - my (%args) = @_; - my @required_args = qw(master_dbh master_slave slaves); - foreach my $arg ( @required_args ) { - die "I need a $arg argument" unless $args{$arg}; - } - my ($master_dbh, $ms, $slaves) = @args{@required_args}; - - my $master_status = $ms->get_master_status($master_dbh); - foreach my $slave ( @$slaves ) { - $ms->wait_for_master(master_status => $master_status, slave_dbh => $slave->dbh()); - } -} - sub wait_for_last_checksum { my (%args) = @_; my @required_args = qw(tbl repl_table slaves max_chunk have_time OptionParser); @@ -12506,13 +12106,14 @@ sub wait_for_last_checksum { my $check_pr = $args{check_pr}; my $master_ip = $o->get('host'); my $master_port = $o->get('port'); + # Requiring "AND master_crc IS NOT NULL" avoids a race condition # when the system is fast but replication is slow. In such cases, # we can select on the slave before the update for $update_sth # replicates; this causes a false-positive diff. my $sql = "SELECT MAX(chunk) FROM $repl_table " . "WHERE db='$tbl->{db}' AND tbl='$tbl->{tbl}' " - . "AND master_crc IS NOT NULL AND master_ip='$master_ip' AND master_port=$master_port"; + . "AND master_crc IS NOT NULL AND master_ip = '$master_ip' AND master_port = $master_port"; PTDEBUG && _d($sql); my $sleep_time = 0; @@ -12818,15 +12419,6 @@ can try something like the following: SET boundaries = COALESCE(CONCAT('id BETWEEN ', lower_boundary, ' AND ', upper_boundary), '1=1'); -Take into consideration that by default, pt-table-checksum use C checksums. -C is not a cryptographic algorithm and for that reason it is prone to have -collisions. On the other hand, C algorithm is faster and less CPU-intensive -than C and C. - -Related reading material: -Percona Toolkit UDFs: L -How to avoid hash collisions when using MySQL’s CRC32 function: L - =head1 LIMITATIONS =over @@ -12870,8 +12462,7 @@ nodes. =item Single cluster -The simple -st PXC setup is a single cluster: all servers are cluster nodes, +The simplest PXC setup is a single cluster: all servers are cluster nodes, and there are no regular replicas. If all nodes are specified in the DSN table (see L<"--recursion-method">), then you can run the tool on any node and any diffs on any other nodes will be detected. @@ -12925,23 +12516,17 @@ The tool warns when it detects this setup to remind you that it only works when used as described above. These warnings do not affect the exit status of the tool; they're only reminders to help avoid false-positive results. -=item RocksDB support - -Due to the limitations in the RocksDB engine like not suporting binlog_format=STATEMENT -or they way RocksDB handles Gap locks, pt-table-cheksum will skip tables using RocksDB engine. -More Information: (L) - =back =head1 OUTPUT The tool prints tabular results, one line per table: - TS ERRORS DIFFS ROWS DIFF_ROWS CHUNKS SKIPPED TIME TABLE - 10-20T08:36:50 0 0 200 0 1 0 0.005 db1.tbl1 - 10-20T08:36:50 0 0 603 3 7 0 0.035 db1.tbl2 - 10-20T08:36:50 0 0 16 0 1 0 0.003 db2.tbl3 - 10-20T08:36:50 0 0 600 0 6 0 0.024 db2.tbl4 + TS ERRORS DIFFS ROWS CHUNKS SKIPPED TIME TABLE + 10-20T08:36:50 0 0 200 1 0 0.005 db1.tbl1 + 10-20T08:36:50 0 0 603 7 0 0.035 db1.tbl2 + 10-20T08:36:50 0 0 16 1 0 0.003 db2.tbl3 + 10-20T08:36:50 0 0 600 6 0 0.024 db2.tbl4 Errors, warnings, and progress reports are printed to standard error. See also L<"--quiet">. @@ -12973,11 +12558,6 @@ are printed. The number of rows selected and checksummed from the table. It might be different from the number of rows in the table if you use the --where option. -=item DIFF_ROWS - -The maximum number of differences per chunk. If a chunk has 2 different rows and -another chunk has 3 different rows, this value will be 3. - =item CHUNKS The number of chunks into which the table was divided. @@ -13101,18 +12681,6 @@ group: Connection Prompt for a password when connecting to MySQL. -=item --channel - -type: string - -Channel name used when connected to a server using replication channels. -Suppose you have two masters, master_a at port 12345, master_b at port 1236 and -a slave connected to both masters using channels chan_master_a and chan_master_b. -If you want to run pt-table-sync to syncronize the slave against master_a, pt-table-sync -won't be able to determine what's the correct master since SHOW SLAVE STATUS -will return 2 rows. In this case, you can use --channel=chan_master_a to specify -the channel name to use in the SHOW SLAVE STATUS command. - =item --[no]check-binlog-format default: yes @@ -13121,12 +12689,52 @@ Check that the C is the same on all servers. See "Replicas using row-based replication" under L<"LIMITATIONS">. +=item --[no]skip-check-key-len + +default: yes + +Skip checking how much of the index MySQL reports that it will use for the query. + +When "--check-plan" is specified the tool remembers the largest key_len seen, and skips chunks where MySQL reports that it will use a smaller prefix of the index. + +When "--skip-check-key-len" is specified, the tool will skip this behavior,and only check whether MySQL intends to use the desired index to access the rows. + +If you think that checking how much of the index MySQL reports that it will use for the query is necessary,please use "--no-skip-check-key-len". + +=item --[no]init-chunk-size-without-total-rate + +default: yes + +By default,"--init-chunk-size-without-total-rate" the number of initialization table chunk size is 1000.If using "--no-init-chunk-size-without-total-rate" the code init the chunk size of a table with total checksumming rate. + +=item --execute-timeout + +type: float; default: 30.0 + +The length of time in seconds a sql execute before timeout. + +Although the code would check whether the right keys were used or not before executing sql, + +however some sqls would cost much time,even 1000s+.It would have a bad influence on development enviroment. + +So we add --execute-timeout option to kill SQL when it execute too much time,and then skip the table checksumming. + +=item --check-few-rows-times-limit + +type: int; default: 10 + +The limit of a table nibble times when --chunk-size has been automatically reduced to 1, + +When --chunk-size has been automatically reduced to 1,a table would continue nibbing --check-few-rows-times-limit times at most. + +At the same time,we will delete checksumming result of a table before skip it. + =item --binary-index This option modifies the behavior of L<"--create-replicate-table"> such that the -replicate table's upper and lower boundary columns are created with the BLOB +replicate table's upper and lower boundary columns are created with the BLOB data type. -This is useful in cases where you have trouble checksuming tables with keys that +This is useful in cases where you have trouble checksuming tables with keys that include a binary data type or that have non-standard character sets. See L<"--replicate">. @@ -13335,8 +12943,15 @@ first option on the command line. See the L<"--help"> output for a list of default config files. -=item --create-replicate-table -=item --no-create-replicate-table +=item --conf-file + +type: string; default: no; group: Filter + +This option is used to add chunk tables per line to pt-table-checksum, we always use argument --tables to checksum specify tables, but + when the database have many tables, 40000 etc, we will encouter "Argumeng list too long" error and pt-table-checksum failed.At the same time,it make command unreadable. +Use this --conf-file should solve this problem. + +=item --[no]create-replicate-table default: yes @@ -13363,10 +12978,6 @@ short form: -F; type: string; group: Connection Only read mysql options from the given file. You must give an absolute pathname. -=item --disable-qrt-plugin - -Disable the QRT (Query Response Time) plugin if it is enabled. - =item --[no]empty-replicate-table default: yes @@ -13398,11 +13009,6 @@ L<"--[no]empty-replicate-table">). If specified twice, the tool actually iterates through the chunking algorithm, printing the upper and lower boundary values for each chunk, but not executing the checksum queries. -=item --fail-on-stopped-replication - -If replication is stopped, fail with an error (exit status 128) instead of waiting -until replication is restarted. - =item --float-precision type: int @@ -13545,7 +13151,7 @@ If password contains commas they must be escaped with a backslash: "exam\,ple" =item --pause-file -type: string +type: string Execution will be paused while the file specified by this param exists. @@ -13617,7 +13223,7 @@ performs several L<"REPLICA CHECKS"> before and while running. Although replicas are not required to run pt-table-checksum, the tool cannot detect diffs on slaves that it cannot discover. Therefore, -a warning is printed and the L<"EXIT STATUS"> is non-zero if no replicas +a warning is printed and the L<"EXIT STATUS"> is non-zero if no replicas are found and the method is not C. If this happens, try a different recursion method, or use the C method to specify the replicas to check. @@ -13665,12 +13271,12 @@ DSNs are ordered by C, but C and C are otherwise ignored. The C column contains a replica DSN like it would be given on the command line, for example: C<"h=replica_host,u=repl_user,p=repl_pass">. -The C method makes the tool ignore all slaves and cluster nodes. This -method is not recommended because it effectively disables the -L<"REPLICA CHECKS"> and no differences can be found. It is useful, however, if -you only need to write checksums on the master or a single cluster node. The -safer alternative is C<--no-replicate-check>: the tool finds replicas and -cluster nodes, performs the L<"REPLICA CHECKS">, but does not check for +The C method makes the tool ignore all slaves and cluster nodes. This +method is not recommended because it effectively disables the +L<"REPLICA CHECKS"> and no differences can be found. It is useful, however, if +you only need to write checksums on the master or a single cluster node. The +safer alternative is C<--no-replicate-check>: the tool finds replicas and +cluster nodes, performs the L<"REPLICA CHECKS">, but does not check for differences. See L<"--[no]replicate-check">. =item --replicate @@ -13696,12 +13302,13 @@ structure (MAGIC_create_replicate): master_cnt INT NULL, ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (master_ip, master_port, db, tbl, chunk), + INDEX db_tbl_chunk (db, tbl, chunk), INDEX ts_db_tbl (ts, db, tbl) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; Note: lower_boundary and upper_boundary data type can be BLOB. See L<"--binary-index">. -By default, L<"--create-replicate-table"> is true, so the database and +By default, L<"--[no]create-replicate-table"> is true, so the database and the table specified by this option are created automatically if they do not exist. @@ -13741,7 +13348,7 @@ type: int; default: 1 Retry checksum comparison this many times when a difference is encountered. Only when a difference persists after this number of checks is it considered valid. -Using this option with a value of 2 or more alleviates spurious differences that +Using this option with a value of 2 or more alleviates spurious differences that arise when using the --resume option. =item --replicate-database @@ -13823,7 +13430,8 @@ By default, the tool sets: MAGIC_set_vars wait_timeout=10000 - innodb_lock_wait_timeout=1 + innodb_lock_wait_timeout=5 /*!50524 */ + lock_wait_timeout=60 /*!50503 */ Variables specified on the command line override these defaults. For example, specifying C<--set-vars wait_timeout=500> overrides the defaultvalue of C<10000>. @@ -13838,10 +13446,10 @@ Socket file to use for connection. =item --slave-skip-tolerance -type: float; default: 1.0 +type: float; default: 1.0 When a master table is marked to be checksumed in only one chunk but a slave -table exceeds the maximum accepted size for this, the table is skipped. +table exceeds the maximum accepted size for this, the table is skipped. Since number of rows are often rough estimates, many times tables are skipped needlessly for very small differences. This option provides a max row excess tolerance to prevent this. @@ -13864,16 +13472,16 @@ Checksum only tables whose names match this Perl regex. Add TRIM() to VARCHAR columns (helps when comparing 4.1 to >= 5.0). This is useful when you don't care about the trailing space differences between -MySQL versions that vary in their handling of trailing spaces. MySQL 5.0 and -later all retain trailing spaces in VARCHAR, while previous versions would +MySQL versions that vary in their handling of trailing spaces. MySQL 5.0 and +later all retain trailing spaces in VARCHAR, while previous versions would remove them. These differences will cause false checksum differences. =item --truncate-replicate-table Truncate the replicate table before starting the checksum. This parameter differs from L<--empty-replicate-table> which only deletes the rows -for the table being checksumed when starting the checksum for that table, while -L<--truncate-replicate-table> will truncate the replicate table at the beginning of the +for the table being checksumed when starting the checksum for that table, while +L<--truncate-replicate-table> will truncate the replicate table at the beginning of the process and thus, all previous checksum information will be losti, even if the process stops due to an error. @@ -13896,24 +13504,18 @@ default: yes Check for the latest version of Percona Toolkit, MySQL, and other programs. This is a standard "check for updates automatically" feature, with two -additional features. First, the tool checks its own version and also the -versions of the following software: operating system, Percona Monitoring and -Management (PMM), MySQL, Perl, MySQL driver for Perl (DBD::mysql), and -Percona Toolkit. Second, it checks for and warns about versions with known -problems. For example, MySQL 5.5.25 had a critical bug and was re-released +additional features. First, the tool checks the version of other programs +on the local system in addition to its own version. For example, it checks +the version of every MySQL server it connects to, Perl, and the Perl module +DBD::mysql. Second, it checks for and warns about versions with known +problems. For example, MySQL 5.5.25 had a critical bug and was re-released as 5.5.25a. -A secure connection to Percona’s Version Check database server is done to -perform these checks. Each request is logged by the server, including software -version numbers and unique ID of the checked system. The ID is generated by the -Percona Toolkit installation script or when the Version Check database call is -done for the first time. - Any updates or known problems are printed to STDOUT before the tool's normal output. This feature should never interfere with the normal operation of the -tool. +tool. -For more information, visit L. +For more information, visit L. =item --where @@ -14106,11 +13708,6 @@ To enable debugging and capture all output to a file, run the tool like: Be careful: debugging output is voluminous and can generate several megabytes of output. -=head1 ATTENTION - -Using might expose passwords. When debug is enabled, all command line -parameters are shown in the output. - =head1 SYSTEM REQUIREMENTS You need Perl, DBI, DBD::mysql, and some core packages that ought to be @@ -14120,7 +13717,7 @@ installed in any reasonably new version of Perl. For a list of known bugs, see L. -Please report bugs at L. +Please report bugs at L. Include the following information in your bug report: =over @@ -14178,7 +13775,7 @@ software from Percona. =head1 COPYRIGHT, LICENSE, AND WARRANTY -This program is copyright 2011-2021 Percona LLC and/or its affiliates, +This program is copyright 2011-2017 Percona LLC and/or its affiliates, 2007-2011 Baron Schwartz. THIS PROGRAM IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED @@ -14197,6 +13794,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA. =head1 VERSION -pt-table-checksum 3.4.0 +pt-table-checksum 3.0.4 =cut diff --git a/dbm-ui/backend/bk_dataview/bkdbm.ini b/dbm-ui/backend/bk_dataview/bkdbm.ini index 67ec6fe92a..be8e4edd1f 100644 --- a/dbm-ui/backend/bk_dataview/bkdbm.ini +++ b/dbm-ui/backend/bk_dataview/bkdbm.ini @@ -66,4 +66,4 @@ max_connections = 0 enabled = false [plugins] -allow_loading_unsigned_plugins = bkmonitor-timeseries-datasource,bkmonitor-event-datasource \ No newline at end of file +allow_loading_unsigned_plugins = bkmonitor-timeseries-datasource,bkmonitor-event-datasource,bk_log_datasource diff --git a/dbm-ui/backend/bk_dataview/dashboards/json/kafka.json b/dbm-ui/backend/bk_dataview/dashboards/json/kafka.json index ce3483c29f..a7d421dd9e 100644 --- a/dbm-ui/backend/bk_dataview/dashboards/json/kafka.json +++ b/dbm-ui/backend/bk_dataview/dashboards/json/kafka.json @@ -4225,7 +4225,7 @@ "id": "byNames", "options": { "mode": "exclude", - "names": [, + "names": [], "prefix": "All except:", "readOnly": true } diff --git a/dbm-ui/backend/bk_dataview/datasources/bk_monitor_datasource.yaml b/dbm-ui/backend/bk_dataview/datasources/bk_monitor_datasource.yaml index fe5338030f..309adf3fd8 100644 --- a/dbm-ui/backend/bk_dataview/datasources/bk_monitor_datasource.yaml +++ b/dbm-ui/backend/bk_dataview/datasources/bk_monitor_datasource.yaml @@ -29,6 +29,7 @@ datasources: - bk_uid baseUrl: ${BKMONITOR_URL}/rest/v2/grafana/ - name: 日志平台 + uid: bklog type: bk_log_datasource access: proxy isDefault: false diff --git a/dbm-ui/backend/bk_dataview/grafana/provisioning.py b/dbm-ui/backend/bk_dataview/grafana/provisioning.py index 74009ba373..598d21bc19 100644 --- a/dbm-ui/backend/bk_dataview/grafana/provisioning.py +++ b/dbm-ui/backend/bk_dataview/grafana/provisioning.py @@ -13,6 +13,7 @@ import logging import os.path from dataclasses import dataclass +from json import JSONDecodeError from typing import Dict, List, Optional import yaml @@ -77,7 +78,7 @@ def read_conf(self, name, suffix): with open(path, "rb") as fh: conf = fh.read() expand_conf = os.path.expandvars(conf) - ds = yaml.load(expand_conf) + ds = yaml.load(expand_conf, Loader=yaml.FullLoader) yield ds def datasources(self, request, org_name: str, org_id: int) -> List[Datasource]: @@ -112,8 +113,11 @@ def dashboards(self, request, org_name: str, org_id: int) -> List[Dashboard]: file_content = file_content.replace( "{metric_data_id}", str(bkm_dbm_report["metric"]["data_id"]) ) - - dashboard = json.loads(file_content) + try: + dashboard = json.loads(file_content) + except JSONDecodeError as err: + logger.error(f"Failed to load {os.path.basename(path)}") + raise err title = dashboard.get("title") if not title: continue diff --git a/dbm-ui/backend/bk_dataview/grafana/views.py b/dbm-ui/backend/bk_dataview/grafana/views.py index 28f6270721..e803692391 100644 --- a/dbm-ui/backend/bk_dataview/grafana/views.py +++ b/dbm-ui/backend/bk_dataview/grafana/views.py @@ -108,7 +108,7 @@ def check_permissions(self, request): def perform_provisioning(self, request): """默认的数据源, 面板注入""" if len(self.provisioning_classes) == 0: - logger.warning("perform_provisioning: %s", len(self.provisioning_classes)) + logger.warning("perform_provisioning: provisioning_classes len is %s", len(self.provisioning_classes)) return logger.warning("perform_provisioning: %s", self.provisioning_classes) diff --git a/dbm-ui/backend/configuration/constants.py b/dbm-ui/backend/configuration/constants.py index 384ca83be9..60134802b8 100644 --- a/dbm-ui/backend/configuration/constants.py +++ b/dbm-ui/backend/configuration/constants.py @@ -21,7 +21,7 @@ # sqlserver的用户登录admin账号名称 SQLSERVER_ADMIN_USER = "dbm_admin" # TODO: job超时时间最大为86400,后续考虑让job平台调大限制 -MYSQL_DATA_RESTORE_TIME = 86400 +MYSQL_DATA_RESTORE_TIME = 259200 MYSQL_USUAL_JOB_TIME = 7200 MYSQL8_VER_PARSE_NUM = 8000000 diff --git a/dbm-ui/backend/db_meta/models/cluster.py b/dbm-ui/backend/db_meta/models/cluster.py index 1e33c70837..d6eb002a39 100644 --- a/dbm-ui/backend/db_meta/models/cluster.py +++ b/dbm-ui/backend/db_meta/models/cluster.py @@ -236,29 +236,35 @@ def access_port(self) -> int: hdfs: namenode pulsar: broker riak: 固定为8087 - mongo: ? + mongo_cluster: proxy的port + mongo_replicaset: 去存储节点的port + sqlserver: ? """ - if self.cluster_type == ClusterType.TenDBSingle: - return self.storageinstance_set.first().port - elif self.cluster_type in [ClusterType.TenDBHA, *ClusterType.db_type_to_cluster_types(DBType.Redis)]: - return self.proxyinstance_set.first().port - elif self.cluster_type == ClusterType.TenDBCluster: - spider_master_filter = Q(tendbclusterspiderext__spider_role=TenDBClusterSpiderRole.SPIDER_MASTER) - return self.proxyinstance_set.filter(spider_master_filter).first().port - elif self.cluster_type == ClusterType.Es: - return self.storageinstance_set.filter(instance_role=InstanceRole.ES_DATANODE_HOT).first().port - elif self.cluster_type == ClusterType.Kafka: - return self.storageinstance_set.filter(instance_role=InstanceRole.BROKER).first().port - elif self.cluster_type == ClusterType.Hdfs: - return self.storageinstance_set.filter(instance_role=InstanceRole.HDFS_NAME_NODE).first().port - elif self.cluster_type == ClusterType.Pulsar: - return self.storageinstance_set.filter(instance_role=InstanceRole.PULSAR_BROKER).first().port - elif self.cluster_type == ClusterType.Riak: - return DEFAULT_RIAK_PORT - elif self.cluster_type == ClusterType.MongoShardedCluster: - return self.proxyinstance_set.filter(machine_type=MachineType.MONGOS).first().port - elif self.cluster_type == ClusterType.MongoReplicaSet: - return self.storageinstance_set.filter(machine_type=MachineType.MONGODB).first().port + try: + if self.cluster_type == ClusterType.TenDBSingle: + return self.storageinstance_set.first().port + elif self.cluster_type in [ClusterType.TenDBHA, *ClusterType.db_type_to_cluster_types(DBType.Redis)]: + return self.proxyinstance_set.first().port + elif self.cluster_type == ClusterType.TenDBCluster: + spider_master_filter = Q(tendbclusterspiderext__spider_role=TenDBClusterSpiderRole.SPIDER_MASTER) + return self.proxyinstance_set.filter(spider_master_filter).first().port + elif self.cluster_type == ClusterType.Es: + return self.storageinstance_set.filter(instance_role=InstanceRole.ES_MASTER).first().port + elif self.cluster_type == ClusterType.Kafka: + return self.storageinstance_set.filter(instance_role=InstanceRole.BROKER).first().port + elif self.cluster_type == ClusterType.Hdfs: + return self.storageinstance_set.filter(instance_role=InstanceRole.HDFS_NAME_NODE).first().port + elif self.cluster_type == ClusterType.Pulsar: + return self.storageinstance_set.filter(instance_role=InstanceRole.PULSAR_BROKER).first().port + elif self.cluster_type == ClusterType.Riak: + return DEFAULT_RIAK_PORT + elif self.cluster_type == ClusterType.MongoShardedCluster: + return self.proxyinstance_set.filter(machine_type=MachineType.MONGOS).first().port + elif self.cluster_type == ClusterType.MongoReplicaSet: + return self.storageinstance_set.filter(machine_type=MachineType.MONGODB).first().port + except AttributeError: + logger.warning(_("无法访问集群[]的访问端口,请检查实例信息").format(self.name)) + return 0 def get_partition_port(self): """ diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/cloud/\344\272\221\345\214\272\345\237\237\347\273\204\344\273\266 - DNS(named\345\222\214pull-crond)\345\255\230\346\264\273\346\200\247\346\243\200\346\237\245.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/cloud/\344\272\221\345\214\272\345\237\237\347\273\204\344\273\266 - DNS(named\345\222\214pull-crond)\345\255\230\346\264\273\346\200\247\346\243\200\346\237\245.json" index 1d3abd45fb..cbc0478f30 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/cloud/\344\272\221\345\214\272\345\237\237\347\273\204\344\273\266 - DNS(named\345\222\214pull-crond)\345\255\230\346\264\273\346\200\247\346\243\200\346\237\245.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/cloud/\344\272\221\345\214\272\345\237\237\347\273\204\344\273\266 - DNS(named\345\222\214pull-crond)\345\255\230\346\264\273\346\200\247\346\243\200\346\237\245.json" @@ -161,7 +161,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -225,17 +225,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -256,7 +256,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(dns_check_warning-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \344\270\273\346\234\272 CPU \344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \344\270\273\346\234\272 CPU \344\275\277\347\224\250\347\216\207.json" index f74cf9ceee..a600d801d4 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \344\270\273\346\234\272 CPU \344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \344\270\273\346\234\272 CPU \344\275\277\347\224\250\347\216\207.json" @@ -166,7 +166,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -227,17 +227,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -259,7 +259,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(CPU使用率)", - "version": 19, + "version": 22, "alert_source": "time_series", "custom_conditions": [], "export_at": "2024-03-28T21:19:53+08:00" diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \344\270\273\346\234\272\347\243\201\347\233\230IO\345\210\251\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \344\270\273\346\234\272\347\243\201\347\233\230IO\345\210\251\347\224\250\347\216\207.json" index 9506f18620..5db6fa47c1 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \344\270\273\346\234\272\347\243\201\347\233\230IO\345\210\251\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \344\270\273\346\234\272\347\243\201\347\233\230IO\345\210\251\347\224\250\347\216\207.json" @@ -167,7 +167,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -228,17 +228,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -260,7 +260,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(I/O使用率)", - "version": 18, + "version": 22, "alert_source": "time_series", "custom_conditions": [], "export_at": "2024-03-28T21:19:53+08:00" diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \344\270\273\346\234\272\347\243\201\347\233\230\347\251\272\351\227\264\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \344\270\273\346\234\272\347\243\201\347\233\230\347\251\272\351\227\264\344\275\277\347\224\250\347\216\207.json" index 9aea18c556..c76262001a 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \344\270\273\346\234\272\347\243\201\347\233\230\347\251\272\351\227\264\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \344\270\273\346\234\272\347\243\201\347\233\230\347\251\272\351\227\264\344\275\277\347\224\250\347\216\207.json" @@ -202,7 +202,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -263,17 +263,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -295,7 +295,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(磁盘空间使用率)", - "version": 19, + "version": 22, "alert_source": "time_series", "custom_conditions": [], "export_at": "2024-03-28T21:19:53+08:00" diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \344\270\273\346\234\272\347\275\221\347\273\234\345\205\245\346\265\201\351\207\217.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \344\270\273\346\234\272\347\275\221\347\273\234\345\205\245\346\265\201\351\207\217.json" index 76806e5e5d..e2b4affc79 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \344\270\273\346\234\272\347\275\221\347\273\234\345\205\245\346\265\201\351\207\217.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \344\270\273\346\234\272\347\275\221\347\273\234\345\205\245\346\265\201\351\207\217.json" @@ -176,7 +176,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -237,17 +237,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -269,7 +269,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(网卡入流量)", - "version": 18, + "version": 22, "alert_source": "time_series", "custom_conditions": [], "export_at": "2024-03-28T21:19:53+08:00" diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \345\206\231\346\213\222\347\273\235.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \345\206\231\346\213\222\347\273\235.json" index a98f8a66e4..9165b8f86c 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \345\206\231\346\213\222\347\273\235.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \345\206\231\346\213\222\347\273\235.json" @@ -175,7 +175,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -236,17 +236,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -268,7 +268,7 @@ }, "is_enabled": true, "monitor_indicator": "max_without_time(elasticsearch_thread_pool_rejected_count)", - "version": 18, + "version": 22, "alert_source": "time_series", "custom_conditions": [], "export_at": "2024-03-28T21:19:53+08:00" diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \345\206\231\346\216\222\351\230\237.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \345\206\231\346\216\222\351\230\237.json" index 0fa5c7dbb4..3c425b20cb 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \345\206\231\346\216\222\351\230\237.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \345\206\231\346\216\222\351\230\237.json" @@ -165,7 +165,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -226,17 +226,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -258,7 +258,7 @@ }, "is_enabled": true, "monitor_indicator": "MAX(elasticsearch_thread_pool_queue_count)", - "version": 19, + "version": 22, "alert_source": "time_series", "custom_conditions": [], "export_at": "2024-03-28T21:19:53+08:00" diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \346\220\234\347\264\242\346\213\222\347\273\235.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \346\220\234\347\264\242\346\213\222\347\273\235.json" index 78c802800c..e17d04e220 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \346\220\234\347\264\242\346\213\222\347\273\235.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \346\220\234\347\264\242\346\213\222\347\273\235.json" @@ -175,7 +175,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -236,17 +236,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -268,7 +268,7 @@ }, "is_enabled": true, "monitor_indicator": "max_without_time(elasticsearch_thread_pool_rejected_count)", - "version": 3, + "version": 22, "alert_source": "time_series", "custom_conditions": [], "export_at": "2024-03-28T21:19:53+08:00" diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \351\233\206\347\276\244\347\212\266\346\200\201.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \351\233\206\347\276\244\347\212\266\346\200\201.json" index 5ca3c2ebff..2efd93fbed 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \351\233\206\347\276\244\347\212\266\346\200\201.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/es/ES \351\233\206\347\276\244\347\212\266\346\200\201.json" @@ -166,7 +166,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -230,17 +230,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -262,7 +262,7 @@ }, "is_enabled": true, "monitor_indicator": "MAX(elasticsearch_cluster_health_status)", - "version": 19, + "version": 22, "alert_source": "time_series", "custom_conditions": [], "export_at": "2024-03-28T21:19:53+08:00" diff --git a/dbm-ui/backend/db_monitor/tpls/alarm/hdfs/HDFS CorruptBlocks.json b/dbm-ui/backend/db_monitor/tpls/alarm/hdfs/HDFS CorruptBlocks.json index 9c4a937deb..ca3163919a 100644 --- a/dbm-ui/backend/db_monitor/tpls/alarm/hdfs/HDFS CorruptBlocks.json +++ b/dbm-ui/backend/db_monitor/tpls/alarm/hdfs/HDFS CorruptBlocks.json @@ -212,7 +212,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -277,17 +277,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -308,7 +308,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(hadoop_namenode_corrupt_blocks)/MIN(hadoop_namenode_State)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git a/dbm-ui/backend/db_monitor/tpls/alarm/hdfs/HDFS DataNode Last Contact.json b/dbm-ui/backend/db_monitor/tpls/alarm/hdfs/HDFS DataNode Last Contact.json index fe1801b399..56e2db910a 100644 --- a/dbm-ui/backend/db_monitor/tpls/alarm/hdfs/HDFS DataNode Last Contact.json +++ b/dbm-ui/backend/db_monitor/tpls/alarm/hdfs/HDFS DataNode Last Contact.json @@ -143,7 +143,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -204,17 +204,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -235,7 +235,7 @@ }, "is_enabled": true, "monitor_indicator": "[HDFS]-DataNode Last Contact", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git a/dbm-ui/backend/db_monitor/tpls/alarm/hdfs/HDFS EditLogRoll.json b/dbm-ui/backend/db_monitor/tpls/alarm/hdfs/HDFS EditLogRoll.json index 0938e762ee..03aa467c05 100644 --- a/dbm-ui/backend/db_monitor/tpls/alarm/hdfs/HDFS EditLogRoll.json +++ b/dbm-ui/backend/db_monitor/tpls/alarm/hdfs/HDFS EditLogRoll.json @@ -212,7 +212,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -278,17 +278,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -309,7 +309,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(hadoop_namenode_transactions_since_last_checkpoint)/MIN(hadoop_namenode_State)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git a/dbm-ui/backend/db_monitor/tpls/alarm/hdfs/HDFS MissingBlocks.json b/dbm-ui/backend/db_monitor/tpls/alarm/hdfs/HDFS MissingBlocks.json index 6fb8117184..50ec37bb57 100644 --- a/dbm-ui/backend/db_monitor/tpls/alarm/hdfs/HDFS MissingBlocks.json +++ b/dbm-ui/backend/db_monitor/tpls/alarm/hdfs/HDFS MissingBlocks.json @@ -212,7 +212,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -277,17 +277,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -308,7 +308,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(hadoop_namenode_missing_blocks)/MIN(hadoop_namenode_State)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git a/dbm-ui/backend/db_monitor/tpls/alarm/hdfs/HDFS NameNode Failover.json b/dbm-ui/backend/db_monitor/tpls/alarm/hdfs/HDFS NameNode Failover.json index cd61a29aab..7321605abf 100644 --- a/dbm-ui/backend/db_monitor/tpls/alarm/hdfs/HDFS NameNode Failover.json +++ b/dbm-ui/backend/db_monitor/tpls/alarm/hdfs/HDFS NameNode Failover.json @@ -208,7 +208,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -269,17 +269,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -300,7 +300,7 @@ }, "is_enabled": true, "monitor_indicator": "MIN(hadoop_namenode_State)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/hdfs/HDFS \345\256\271\351\207\217\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/hdfs/HDFS \345\256\271\351\207\217\344\275\277\347\224\250\347\216\207.json" index e35d168dc5..a53f4098b5 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/hdfs/HDFS \345\256\271\351\207\217\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/hdfs/HDFS \345\256\271\351\207\217\344\275\277\347\224\250\347\216\207.json" @@ -229,7 +229,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -294,17 +294,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -325,7 +325,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(hadoop_namenode_capacity_used)/AVG(hadoop_namenode_capacity_total)*MIN(hadoop_namenode_State)*100", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB CPU \344\275\277\347\224\250\347\216\207\345\221\212\350\255\246.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB CPU \344\275\277\347\224\250\347\216\207\345\221\212\350\255\246.json" index 230517ac52..6bf33bd369 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB CPU \344\275\277\347\224\250\347\216\207\345\221\212\350\255\246.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB CPU \344\275\277\347\224\250\347\216\207\345\221\212\350\255\246.json" @@ -200,7 +200,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -261,17 +261,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -292,7 +292,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(CPU使用率)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB Series \345\242\236\351\225\277\351\207\217.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB Series \345\242\236\351\225\277\351\207\217.json" index 68a0220716..b71f09d6be 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB Series \345\242\236\351\225\277\351\207\217.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB Series \345\242\236\351\225\277\351\207\217.json" @@ -164,7 +164,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -225,17 +225,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -256,7 +256,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(influxdb_database_numSeries)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB \345\206\205\345\255\230\344\275\277\347\224\250\345\221\212\350\255\246.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB \345\206\205\345\255\230\344\275\277\347\224\250\345\221\212\350\255\246.json" index 9e1d0e9c35..12d986506d 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB \345\206\205\345\255\230\344\275\277\347\224\250\345\221\212\350\255\246.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB \345\206\205\345\255\230\344\275\277\347\224\250\345\221\212\350\255\246.json" @@ -200,7 +200,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -261,17 +261,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -292,7 +292,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(应用程序内存使用占比)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB \345\206\231\345\205\245\345\274\202\345\270\270\345\221\212\350\255\246.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB \345\206\231\345\205\245\345\274\202\345\270\270\345\221\212\350\255\246.json" index 9fe7f8bcb5..33147b17ac 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB \345\206\231\345\205\245\345\274\202\345\270\270\345\221\212\350\255\246.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB \345\206\231\345\205\245\345\274\202\345\270\270\345\221\212\350\255\246.json" @@ -164,7 +164,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -225,17 +225,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -256,7 +256,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(influxdb_httpd_pointsWrittenFail)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB \345\256\236\344\276\213\347\253\257\345\217\243\345\274\202\345\270\270.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB \345\256\236\344\276\213\347\253\257\345\217\243\345\274\202\345\270\270.json" index 87ebab5e43..abae0e8cd5 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB \345\256\236\344\276\213\347\253\257\345\217\243\345\274\202\345\270\270.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB \345\256\236\344\276\213\347\253\257\345\217\243\345\274\202\345\270\270.json" @@ -154,7 +154,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -215,17 +215,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}} : connection_failed", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}} : connection_failed", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -246,7 +246,7 @@ }, "is_enabled": true, "monitor_indicator": "MAX(http_response_result_code)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB \347\243\201\347\233\230 IO \345\210\251\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB \347\243\201\347\233\230 IO \345\210\251\347\224\250\347\216\207.json" index f36e245f67..73863a9620 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB \347\243\201\347\233\230 IO \345\210\251\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB \347\243\201\347\233\230 IO \345\210\251\347\224\250\347\216\207.json" @@ -201,7 +201,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -262,17 +262,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -293,7 +293,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(I/O使用率)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB \347\243\201\347\233\230\347\251\272\351\227\264\345\221\212\350\255\246.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB \347\243\201\347\233\230\347\251\272\351\227\264\345\221\212\350\255\246.json" index 57bb91784b..82ea53da30 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB \347\243\201\347\233\230\347\251\272\351\227\264\345\221\212\350\255\246.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/influxdb/InfluxDB \347\243\201\347\233\230\347\251\272\351\227\264\345\221\212\350\255\246.json" @@ -201,7 +201,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -262,17 +262,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -293,7 +293,7 @@ }, "is_enabled": true, "monitor_indicator": "MAX(磁盘空间使用率)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/kafka/Kafka \344\270\273\346\234\272 CPU \344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/kafka/Kafka \344\270\273\346\234\272 CPU \344\275\277\347\224\250\347\216\207.json" index b908db4ba9..f8854d00ba 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/kafka/Kafka \344\270\273\346\234\272 CPU \344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/kafka/Kafka \344\270\273\346\234\272 CPU \344\275\277\347\224\250\347\216\207.json" @@ -162,7 +162,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -223,17 +223,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -254,7 +254,7 @@ }, "is_enabled": false, "monitor_indicator": "AVG(CPU使用率)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/kafka/Kafka \344\270\273\346\234\272\347\243\201\347\233\230IO\345\210\251\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/kafka/Kafka \344\270\273\346\234\272\347\243\201\347\233\230IO\345\210\251\347\224\250\347\216\207.json" index a7c73d82c6..b21681eeac 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/kafka/Kafka \344\270\273\346\234\272\347\243\201\347\233\230IO\345\210\251\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/kafka/Kafka \344\270\273\346\234\272\347\243\201\347\233\230IO\345\210\251\347\224\250\347\216\207.json" @@ -166,7 +166,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -227,17 +227,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -258,7 +258,7 @@ }, "is_enabled": false, "monitor_indicator": "AVG(I/O使用率)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/kafka/Kafka \344\270\273\346\234\272\347\243\201\347\233\230\347\251\272\351\227\264\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/kafka/Kafka \344\270\273\346\234\272\347\243\201\347\233\230\347\251\272\351\227\264\344\275\277\347\224\250\347\216\207.json" index ffc9e556a0..500b181c78 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/kafka/Kafka \344\270\273\346\234\272\347\243\201\347\233\230\347\251\272\351\227\264\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/kafka/Kafka \344\270\273\346\234\272\347\243\201\347\233\230\347\251\272\351\227\264\344\275\277\347\224\250\347\216\207.json" @@ -201,7 +201,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -262,17 +262,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -293,7 +293,7 @@ }, "is_enabled": false, "monitor_indicator": "AVG(磁盘空间使用率)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/kafka/Kafka \344\270\273\346\234\272\347\275\221\347\273\234\345\205\245\346\265\201\351\207\217.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/kafka/Kafka \344\270\273\346\234\272\347\275\221\347\273\234\345\205\245\346\265\201\351\207\217.json" index 31ba5a49cc..cdc1aecaea 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/kafka/Kafka \344\270\273\346\234\272\347\275\221\347\273\234\345\205\245\346\265\201\351\207\217.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/kafka/Kafka \344\270\273\346\234\272\347\275\221\347\273\234\345\205\245\346\265\201\351\207\217.json" @@ -167,7 +167,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -228,17 +228,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -260,7 +260,7 @@ }, "is_enabled": false, "monitor_indicator": "AVG(网卡入流量)", - "version": 17, + "version": 22, "alert_source": "time_series", "custom_conditions": [], "export_at": "2024-03-28T21:20:51+08:00" diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/kafka/Kafka \346\266\210\350\264\271\347\273\204\345\273\266\350\277\237.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/kafka/Kafka \346\266\210\350\264\271\347\273\204\345\273\266\350\277\237.json" index 3c23f89bd1..f185e0d35d 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/kafka/Kafka \346\266\210\350\264\271\347\273\204\345\273\266\350\277\237.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/kafka/Kafka \346\266\210\350\264\271\347\273\204\345\273\266\350\277\237.json" @@ -174,7 +174,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -235,17 +235,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -266,7 +266,7 @@ }, "is_enabled": false, "monitor_indicator": "avg_without_time(kafka_consumergroup_lag_sum)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [ { diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL Ext3 \346\226\207\344\273\266\350\277\207\345\244\247.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL Ext3 \346\226\207\344\273\266\350\277\207\345\244\247.json" index 694a366b62..01301328a7 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL Ext3 \346\226\207\344\273\266\350\277\207\345\244\247.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL Ext3 \346\226\207\344\273\266\350\277\207\345\244\247.json" @@ -151,7 +151,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -211,17 +211,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -241,7 +241,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(ext3-check)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL InnoDB log waits.json b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL InnoDB log waits.json index 141047fc6b..63001a42f7 100644 --- a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL InnoDB log waits.json +++ b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL InnoDB log waits.json @@ -167,7 +167,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -233,17 +233,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -264,7 +264,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(mysql_global_status_innodb_log_waits)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL Monitor \346\211\247\350\241\214\345\274\202\345\270\270.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL Monitor \346\211\247\350\241\214\345\274\202\345\270\270.json" index 39021b0e62..a5c8efebb9 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL Monitor \346\211\247\350\241\214\345\274\202\345\270\270.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL Monitor \346\211\247\350\241\214\345\274\202\345\270\270.json" @@ -151,7 +151,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -211,17 +211,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -241,7 +241,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(monitor-internal-error)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL Proxy\347\253\257\345\217\243\346\216\242\346\265\213\345\274\202\345\270\270.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL Proxy\347\253\257\345\217\243\346\216\242\346\265\213\345\274\202\345\270\270.json" index a34408013b..3e1ebf172a 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL Proxy\347\253\257\345\217\243\346\216\242\346\265\213\345\274\202\345\270\270.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL Proxy\347\253\257\345\217\243\346\216\242\346\265\213\345\274\202\345\270\270.json" @@ -157,7 +157,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -218,17 +218,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -249,7 +249,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(mysqlproxy_up)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL Routine Definer.json b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL Routine Definer.json index d4609e08d7..ca15bf1e24 100644 --- a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL Routine Definer.json +++ b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL Routine Definer.json @@ -151,7 +151,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -211,17 +211,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -241,7 +241,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(routine-definer)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL Slave \345\220\214\346\255\245\345\274\202\345\270\270.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL Slave \345\220\214\346\255\245\345\274\202\345\270\270.json" index fe40b1e314..258a0e060a 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL Slave \345\220\214\346\255\245\345\274\202\345\270\270.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL Slave \345\220\214\346\255\245\345\274\202\345\270\270.json" @@ -151,7 +151,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -211,17 +211,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -241,7 +241,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(slave-status)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL Trigger Definer.json b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL Trigger Definer.json index 18a40f260d..8c2f0128f6 100644 --- a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL Trigger Definer.json +++ b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL Trigger Definer.json @@ -151,7 +151,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -211,17 +211,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -241,7 +241,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(trigger-definer)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL View Definer.json b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL View Definer.json index b8bce046f4..bfe0b62db3 100644 --- a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL View Definer.json +++ b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL View Definer.json @@ -151,7 +151,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -211,17 +211,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -241,7 +241,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(view-definer)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL int\346\272\242\345\207\272\345\221\212\350\255\246.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL int\346\272\242\345\207\272\345\221\212\350\255\246.json" index 31d4d0d099..49f1e8e375 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL int\346\272\242\345\207\272\345\221\212\350\255\246.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL int\346\272\242\345\207\272\345\221\212\350\255\246.json" @@ -201,7 +201,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -261,17 +261,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -292,7 +292,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(mysql_info_schema_auto_increment_column) / AVG(mysql_info_schema_auto_increment_column_max) * 100", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL restarted.json b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL restarted.json index bac4fc2f72..51b8abe7bb 100644 --- a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL restarted.json +++ b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL restarted.json @@ -157,7 +157,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -217,17 +217,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -248,7 +248,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(mysql_global_status_uptime)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \344\270\273\346\234\272 CPU \350\264\237\350\275\275.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \344\270\273\346\234\272 CPU \350\264\237\350\275\275.json" index 316aac3b48..8b73a30c04 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \344\270\273\346\234\272 CPU \350\264\237\350\275\275.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \344\270\273\346\234\272 CPU \350\264\237\350\275\275.json" @@ -203,7 +203,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -264,17 +264,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -295,7 +295,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(CPU使用率)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \344\270\273\346\234\272\347\243\201\347\233\230IO\345\210\251\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \344\270\273\346\234\272\347\243\201\347\233\230IO\345\210\251\347\224\250\347\216\207.json" index 081d0ccec5..f0d8fb5aea 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \344\270\273\346\234\272\347\243\201\347\233\230IO\345\210\251\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \344\270\273\346\234\272\347\243\201\347\233\230IO\345\210\251\347\224\250\347\216\207.json" @@ -169,7 +169,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -229,17 +229,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -260,7 +260,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(I/O使用率)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \344\270\273\346\234\272\347\243\201\347\233\230\347\251\272\351\227\264\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \344\270\273\346\234\272\347\243\201\347\233\230\347\251\272\351\227\264\344\275\277\347\224\250\347\216\207.json" index 0e149c3fbe..8f3c7b9629 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \344\270\273\346\234\272\347\243\201\347\233\230\347\251\272\351\227\264\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \344\270\273\346\234\272\347\243\201\347\233\230\347\251\272\351\227\264\344\275\277\347\224\250\347\216\207.json" @@ -204,7 +204,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -265,17 +265,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -296,7 +296,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(磁盘空间使用率)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \344\270\273\346\234\272\347\275\221\347\273\234\345\207\272\346\265\201\351\207\217.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \344\270\273\346\234\272\347\275\221\347\273\234\345\207\272\346\265\201\351\207\217.json" index 410e28d6e0..70a30fa5e7 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \344\270\273\346\234\272\347\275\221\347\273\234\345\207\272\346\265\201\351\207\217.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \344\270\273\346\234\272\347\275\221\347\273\234\345\207\272\346\265\201\351\207\217.json" @@ -179,7 +179,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -239,17 +239,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -270,7 +270,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(网卡出流量)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \344\273\216\345\272\223\345\220\214\346\255\245\345\274\202\345\270\270.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \344\273\216\345\272\223\345\220\214\346\255\245\345\274\202\345\270\270.json" index f07a5f8632..6b985340ef 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \344\273\216\345\272\223\345\220\214\346\255\245\345\274\202\345\270\270.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \344\273\216\345\272\223\345\220\214\346\255\245\345\274\202\345\270\270.json" @@ -197,7 +197,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -262,17 +262,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -293,7 +293,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(mysql_slave_status_slave_io_running) + AVG(mysql_slave_status_slave_sql_running)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \344\273\216\345\272\223\345\273\266\350\277\237.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \344\273\216\345\272\223\345\273\266\350\277\237.json" index dfc1b389ca..aa5749a964 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \344\273\216\345\272\223\345\273\266\350\277\237.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \344\273\216\345\272\223\345\273\266\350\277\237.json" @@ -192,7 +192,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -258,17 +258,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -289,7 +289,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(mysql_slave_status_seconds_behind_master)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \345\255\230\345\202\250\345\274\225\346\223\216\346\243\200\346\237\245.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \345\255\230\345\202\250\345\274\225\346\223\216\346\243\200\346\237\245.json" index 422bf5f564..5cfef8bfe8 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \345\255\230\345\202\250\345\274\225\346\223\216\346\243\200\346\237\245.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \345\255\230\345\202\250\345\274\225\346\223\216\346\243\200\346\237\245.json" @@ -151,7 +151,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -211,17 +211,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -241,7 +241,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(engine)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \345\256\236\344\276\213 Threads_running.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \345\256\236\344\276\213 Threads_running.json" index e1bb7f83e5..1e5f16e537 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \345\256\236\344\276\213 Threads_running.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \345\256\236\344\276\213 Threads_running.json" @@ -192,7 +192,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -258,17 +258,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -289,7 +289,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(mysql_global_status_threads_running)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \345\272\223\345\255\227\347\254\246\351\233\206.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \345\272\223\345\255\227\347\254\246\351\233\206.json" index b629e9bbcb..e038538fac 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \345\272\223\345\255\227\347\254\246\351\233\206.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \345\272\223\345\255\227\347\254\246\351\233\206.json" @@ -151,7 +151,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -211,17 +211,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -241,7 +241,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(character-consistency)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \346\227\245\345\277\227\347\233\221\346\216\247-\350\207\264\345\221\275.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \346\227\245\345\277\227\347\233\221\346\216\247-\350\207\264\345\221\275.json" index f3c7ee7cfd..1cd8806784 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \346\227\245\345\277\227\347\233\221\346\216\247-\350\207\264\345\221\275.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \346\227\245\345\277\227\347\233\221\346\216\247-\350\207\264\345\221\275.json" @@ -151,7 +151,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -211,17 +211,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -241,7 +241,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(mysql-err-critical)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \346\227\245\345\277\227\347\233\221\346\216\247-\351\242\204\350\255\246.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \346\227\245\345\277\227\347\233\221\346\216\247-\351\242\204\350\255\246.json" index 3df2be9382..d41951ec29 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \346\227\245\345\277\227\347\233\221\346\216\247-\351\242\204\350\255\246.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \346\227\245\345\277\227\347\233\221\346\216\247-\351\242\204\350\255\246.json" @@ -151,7 +151,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -211,17 +211,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -241,7 +241,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(mysql-err-notice)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \346\263\250\345\205\245.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \346\263\250\345\205\245.json" index 693c4890c2..af50af8570 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \346\263\250\345\205\245.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \346\263\250\345\205\245.json" @@ -151,7 +151,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -211,17 +211,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -241,7 +241,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(mysql-inject)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \347\253\257\345\217\243\346\216\242\346\265\213\345\274\202\345\270\270.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \347\253\257\345\217\243\346\216\242\346\265\213\345\274\202\345\270\270.json" index c58ed93559..0e6bfbc258 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \347\253\257\345\217\243\346\216\242\346\265\213\345\274\202\345\270\270.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \347\253\257\345\217\243\346\216\242\346\265\213\345\274\202\345\270\270.json" @@ -158,7 +158,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -219,17 +219,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -250,7 +250,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(mysql_up)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \350\277\236\346\216\245\345\244\261\350\264\245.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \350\277\236\346\216\245\345\244\261\350\264\245.json" index 923943eb55..82ba6884ca 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \350\277\236\346\216\245\345\244\261\350\264\245.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \350\277\236\346\216\245\345\244\261\350\264\245.json" @@ -151,7 +151,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -211,17 +211,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -241,7 +241,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(db-up)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \350\277\236\346\216\245\346\225\260\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \350\277\236\346\216\245\346\225\260\344\275\277\347\224\250\347\216\207.json" index f30a7aedc9..020b72cbad 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \350\277\236\346\216\245\346\225\260\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \350\277\236\346\216\245\346\225\260\344\275\277\347\224\250\347\216\207.json" @@ -216,7 +216,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -282,12 +282,12 @@ }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -308,7 +308,7 @@ }, "is_enabled": true, "monitor_indicator": "100 * AVG(mysql_global_status_threads_connected) / AVG(mysql_global_variables_max_connections)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \350\277\236\346\216\245\346\227\245\345\277\227\350\277\207\345\244\232.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \350\277\236\346\216\245\346\227\245\345\277\227\350\277\207\345\244\232.json" index 394ca309a4..c8ba7017db 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \350\277\236\346\216\245\346\227\245\345\277\227\350\277\207\345\244\232.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \350\277\236\346\216\245\346\227\245\345\277\227\350\277\207\345\244\232.json" @@ -151,7 +151,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -211,17 +211,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -241,7 +241,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(mysql-connlog-size)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \351\205\215\347\275\256\345\274\202\345\270\270.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \351\205\215\347\275\256\345\274\202\345\270\270.json" index 6a451a6f4f..1e6f4585ed 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \351\205\215\347\275\256\345\274\202\345\270\270.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \351\205\215\347\275\256\345\274\202\345\270\270.json" @@ -151,7 +151,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -211,17 +211,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -241,7 +241,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(mysql-config-diff)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \351\224\201\350\241\250.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \351\224\201\350\241\250.json" index 4117947bdb..ea06c851be 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \351\224\201\350\241\250.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \351\224\201\350\241\250.json" @@ -151,7 +151,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -211,17 +211,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -241,7 +241,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(mysql-lock)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \351\225\277\347\251\272\351\227\262\344\272\213\345\212\241\346\234\252\345\205\263\351\227\255.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \351\225\277\347\251\272\351\227\262\344\272\213\345\212\241\346\234\252\345\205\263\351\227\255.json" index c379a8f4b4..a28c208c0b 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \351\225\277\347\251\272\351\227\262\344\272\213\345\212\241\346\234\252\345\205\263\351\227\255.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/MySQL \351\225\277\347\251\272\351\227\262\344\272\213\345\212\241\346\234\252\345\205\263\351\227\255.json" @@ -157,7 +157,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -217,17 +217,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -248,7 +248,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(mysql_engine_innodb_trx_idle_time_max)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Mysql Partition.json b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Mysql Partition.json index 85f097fed1..0f329a03a5 100644 --- a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Mysql Partition.json +++ b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Mysql Partition.json @@ -150,7 +150,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -213,17 +213,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -244,7 +244,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(partition-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Mysql Partition\346\234\215\345\212\241\347\256\241\347\220\206.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Mysql Partition\346\234\215\345\212\241\347\256\241\347\220\206.json" index 5cdb016c04..b3065caad5 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Mysql Partition\346\234\215\345\212\241\347\256\241\347\220\206.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Mysql Partition\346\234\215\345\212\241\347\256\241\347\220\206.json" @@ -35,7 +35,17 @@ "cluster_domain", "appid" ], - "agg_condition": [], + "agg_condition": [ + { + "key": "target", + "value": [ + "0.0.0.0" + ], + "method": "neq", + "condition": "and", + "dimension_name": "target" + } + ], "custom_event_name": "partition_dev", "name": "partition_dev" } @@ -84,11 +94,12 @@ ], "actions": [], "notice": { - "config_id": 40924, + "config_id": 97534, "user_groups": [], + "user_type": "main", "signal": [ - "no_data", - "abnormal" + "abnormal", + "no_data" ], "options": { "end_time": "23:59:59", @@ -150,44 +161,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, - "sub_converge_config": { - "timedelta": 60, - "count": 2, - "condition": [ - { - "dimension": "bk_biz_id", - "value": [ - "self" - ] - }, - { - "dimension": "notice_receiver", - "value": [ - "self" - ] - }, - { - "dimension": "notice_way", - "value": [ - "self" - ] - }, - { - "dimension": "alert_level", - "value": [ - "self" - ] - }, - { - "dimension": "signal", - "value": [ - "self" - ] - } - ], - "converge_func": "collect_alarm" - } + "need_biz_converge": false }, "chart_image_enabled": true, "exclude_notice_ways": { @@ -211,17 +185,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -236,13 +210,15 @@ "path": "", "priority": 0, "priority_group_key": "", + "edit_allowed": true, "metric_type": "event", "data_source_type": "自定义事件", "is_enabled": true }, "is_enabled": true, "monitor_indicator": "COUNT(partition_dev-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", - "custom_conditions": [] + "custom_conditions": [], + "export_at": "2024-04-02T20:53:39+08:00" } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Mysql crond\347\273\204\344\273\266\345\277\203\350\267\263\347\233\221\346\216\247.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Mysql crond\347\273\204\344\273\266\345\277\203\350\267\263\347\233\221\346\216\247.json" index 567582dd0f..a73e347dd9 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Mysql crond\347\273\204\344\273\266\345\277\203\350\267\263\347\233\221\346\216\247.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Mysql crond\347\273\204\344\273\266\345\277\203\350\267\263\347\233\221\346\216\247.json" @@ -154,7 +154,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -215,17 +215,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -245,7 +245,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(mysql_crond_heart_beat)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Mysql dbha\345\210\207\346\215\242mysql\345\244\261\350\264\245\347\255\226\347\225\245.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Mysql dbha\345\210\207\346\215\242mysql\345\244\261\350\264\245\347\255\226\347\225\245.json" index 59103b64a9..bca1f7345a 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Mysql dbha\345\210\207\346\215\242mysql\345\244\261\350\264\245\347\255\226\347\225\245.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Mysql dbha\345\210\207\346\215\242mysql\345\244\261\350\264\245\347\255\226\347\225\245.json" @@ -158,7 +158,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -219,17 +219,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -249,7 +249,7 @@ }, "is_enabled": true, "monitor_indicator": "a", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Mysql dbha\345\210\207\346\215\242mysql\346\210\220\345\212\237\347\255\226\347\225\245.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Mysql dbha\345\210\207\346\215\242mysql\346\210\220\345\212\237\347\255\226\347\225\245.json" index 684b06078f..811fcd6274 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Mysql dbha\345\210\207\346\215\242mysql\346\210\220\345\212\237\347\255\226\347\225\245.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Mysql dbha\345\210\207\346\215\242mysql\346\210\220\345\212\237\347\255\226\347\225\245.json" @@ -158,7 +158,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -219,17 +219,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -249,7 +249,7 @@ }, "is_enabled": true, "monitor_indicator": "a", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Mysql monitor\347\273\204\344\273\266\345\277\203\350\267\263\347\233\221\346\216\247.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Mysql monitor\347\273\204\344\273\266\345\277\203\350\267\263\347\233\221\346\216\247.json" index 0537ed8a8f..c1250414f7 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Mysql monitor\347\273\204\344\273\266\345\277\203\350\267\263\347\233\221\346\216\247.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Mysql monitor\347\273\204\344\273\266\345\277\203\350\267\263\347\233\221\346\216\247.json" @@ -157,7 +157,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -218,17 +218,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -248,7 +248,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(mysql_monitor_heart_beat)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Proxy \345\220\216\347\253\257.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Proxy \345\220\216\347\253\257.json" index e2db46c752..5365ffa1db 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Proxy \345\220\216\347\253\257.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Proxy \345\220\216\347\253\257.json" @@ -151,7 +151,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -211,17 +211,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -241,7 +241,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(proxy-backend)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Proxy \347\231\275\345\220\215\345\215\225.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Proxy \347\231\275\345\220\215\345\215\225.json" index 22c5b0fb80..82dc7e2e2e 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Proxy \347\231\275\345\220\215\345\215\225.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/mysql/Proxy \347\231\275\345\220\215\345\215\225.json" @@ -151,7 +151,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -211,17 +211,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -241,7 +241,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(proxy-user-list)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/pulsar/Pulsar \344\270\273\346\234\272 CPU \344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/pulsar/Pulsar \344\270\273\346\234\272 CPU \344\275\277\347\224\250\347\216\207.json" index 0f6476e4de..f52573a64b 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/pulsar/Pulsar \344\270\273\346\234\272 CPU \344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/pulsar/Pulsar \344\270\273\346\234\272 CPU \344\275\277\347\224\250\347\216\207.json" @@ -165,7 +165,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -226,17 +226,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -257,7 +257,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(CPU使用率)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/pulsar/Pulsar \344\270\273\346\234\272\347\243\201\347\233\230IO\345\210\251\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/pulsar/Pulsar \344\270\273\346\234\272\347\243\201\347\233\230IO\345\210\251\347\224\250\347\216\207.json" index 742905d2f5..3ed04b2c13 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/pulsar/Pulsar \344\270\273\346\234\272\347\243\201\347\233\230IO\345\210\251\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/pulsar/Pulsar \344\270\273\346\234\272\347\243\201\347\233\230IO\345\210\251\347\224\250\347\216\207.json" @@ -167,7 +167,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -228,17 +228,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -260,7 +260,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(I/O使用率)", - "version": 17, + "version": 22, "alert_source": "time_series", "custom_conditions": [], "export_at": "2024-03-28T21:20:55+08:00" diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/pulsar/Pulsar \344\270\273\346\234\272\347\243\201\347\233\230\347\251\272\351\227\264\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/pulsar/Pulsar \344\270\273\346\234\272\347\243\201\347\233\230\347\251\272\351\227\264\344\275\277\347\224\250\347\216\207.json" index 55f06b8ba2..7685544bca 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/pulsar/Pulsar \344\270\273\346\234\272\347\243\201\347\233\230\347\251\272\351\227\264\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/pulsar/Pulsar \344\270\273\346\234\272\347\243\201\347\233\230\347\251\272\351\227\264\344\275\277\347\224\250\347\216\207.json" @@ -201,7 +201,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -262,17 +262,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -293,7 +293,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(磁盘空间使用率)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/pulsar/Pulsar \344\270\273\346\234\272\347\275\221\347\273\234\345\205\245\346\265\201\351\207\217.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/pulsar/Pulsar \344\270\273\346\234\272\347\275\221\347\273\234\345\205\245\346\265\201\351\207\217.json" index 12a5dcba08..472eb6d93e 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/pulsar/Pulsar \344\270\273\346\234\272\347\275\221\347\273\234\345\205\245\346\265\201\351\207\217.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/pulsar/Pulsar \344\270\273\346\234\272\347\275\221\347\273\234\345\205\245\346\265\201\351\207\217.json" @@ -176,7 +176,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -237,17 +237,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -269,7 +269,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(网卡入流量)", - "version": 17, + "version": 22, "alert_source": "time_series", "custom_conditions": [], "export_at": "2024-03-28T21:20:55+08:00" diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/pulsar/Pulsar \345\273\266\350\277\237\345\221\212\350\255\246.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/pulsar/Pulsar \345\273\266\350\277\237\345\221\212\350\255\246.json" index fc7b1a8993..1ed5947b97 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/pulsar/Pulsar \345\273\266\350\277\237\345\221\212\350\255\246.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/pulsar/Pulsar \345\273\266\350\277\237\345\221\212\350\255\246.json" @@ -175,7 +175,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -236,17 +236,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -266,7 +266,7 @@ }, "is_enabled": true, "monitor_indicator": "SUM(pulsar_msg_backlog)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)Persist\345\274\202\345\270\270critical\344\272\213\344\273\266.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)Persist\345\274\202\345\270\270critical\344\272\213\344\273\266.json" index a5253dd871..24d8137fb6 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)Persist\345\274\202\345\270\270critical\344\272\213\344\273\266.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)Persist\345\274\202\345\270\270critical\344\272\213\344\273\266.json" @@ -179,7 +179,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -240,17 +240,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -270,7 +270,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_persist-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)Persist\345\274\202\345\270\270warning\344\272\213\344\273\266.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)Persist\345\274\202\345\270\270warning\344\272\213\344\273\266.json" index 083ce874e4..68214c5ec1 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)Persist\345\274\202\345\270\270warning\344\272\213\344\273\266.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)Persist\345\274\202\345\270\270warning\344\272\213\344\273\266.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -239,17 +239,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -269,7 +269,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_persist-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)Proxy\347\231\273\345\275\225\345\244\261\350\264\245critical\344\272\213\344\273\266.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)Proxy\347\231\273\345\275\225\345\244\261\350\264\245critical\344\272\213\344\273\266.json" index ca7444456a..cce5655e73 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)Proxy\347\231\273\345\275\225\345\244\261\350\264\245critical\344\272\213\344\273\266.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)Proxy\347\231\273\345\275\225\345\244\261\350\264\245critical\344\272\213\344\273\266.json" @@ -179,7 +179,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -240,17 +240,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -270,7 +270,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(twemproxy_login-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)Proxy\351\207\215\345\220\257warning\344\272\213\344\273\266.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)Proxy\351\207\215\345\220\257warning\344\272\213\344\273\266.json" index 5e285f09e9..be6dc45777 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)Proxy\351\207\215\345\220\257warning\344\272\213\344\273\266.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)Proxy\351\207\215\345\220\257warning\344\272\213\344\273\266.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -239,17 +239,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -269,7 +269,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(twemproxy_restart-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272CPU\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272CPU\344\275\277\347\224\250\347\216\207.json" index 6b1364f1f8..1560398409 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272CPU\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272CPU\344\275\277\347\224\250\347\216\207.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisCache]主机CPU使用率", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272\345\206\205\345\255\230\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272\345\206\205\345\255\230\344\275\277\347\224\250\347\216\207.json" index 0211331302..d6e794c173 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272\345\206\205\345\255\230\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272\345\206\205\345\255\230\344\275\277\347\224\250\347\216\207.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisCache]主机内存使用率", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272\345\215\225\346\240\270CPU\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272\345\215\225\346\240\270CPU\344\275\277\347\224\250\347\216\207.json" index 7e85bb4056..f049047d48 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272\345\215\225\346\240\270CPU\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272\345\215\225\346\240\270CPU\344\275\277\347\224\250\347\216\207.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisCache]主机单核CPU使用率", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272\347\243\201\347\233\230IO\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272\347\243\201\347\233\230IO\344\275\277\347\224\250\347\216\207.json" index ff47cec815..a2f7a87b65 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272\347\243\201\347\233\230IO\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272\347\243\201\347\233\230IO\344\275\277\347\224\250\347\216\207.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisCache]主机磁盘IO使用率", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272\347\243\201\347\233\230\345\256\271\351\207\217\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272\347\243\201\347\233\230\345\256\271\351\207\217\344\275\277\347\224\250\347\216\207.json" index 9d20853a59..9066a1c697 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272\347\243\201\347\233\230\345\256\271\351\207\217\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272\347\243\201\347\233\230\345\256\271\351\207\217\344\275\277\347\224\250\347\216\207.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisCache]主机磁盘容量使用率", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272\347\275\221\347\273\234\345\214\205\351\207\217\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272\347\275\221\347\273\234\345\214\205\351\207\217\344\275\277\347\224\250\347\216\207.json" index 50bb50c66b..3023ba7a88 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272\347\275\221\347\273\234\345\214\205\351\207\217\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272\347\275\221\347\273\234\345\214\205\351\207\217\344\275\277\347\224\250\347\216\207.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisCache]主机网络包量使用率", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272\347\275\221\347\273\234\346\265\201\351\207\217\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272\347\275\221\347\273\234\346\265\201\351\207\217\344\275\277\347\224\250\347\216\207.json" index 4f3f860e45..b697e4c14d 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272\347\275\221\347\273\234\346\265\201\351\207\217\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\344\270\273\346\234\272\347\275\221\347\273\234\346\265\201\351\207\217\344\275\277\347\224\250\347\216\207.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisCache]主机网络流量使用率", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\345\220\214\346\255\245\345\274\202\345\270\270critical\344\272\213\344\273\266.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\345\220\214\346\255\245\345\274\202\345\270\270critical\344\272\213\344\273\266.json" index 6e362e8604..1dcae5fee1 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\345\220\214\346\255\245\345\274\202\345\270\270critical\344\272\213\344\273\266.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\345\220\214\346\255\245\345\274\202\345\270\270critical\344\272\213\344\273\266.json" @@ -179,7 +179,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -240,17 +240,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -270,7 +270,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_sync-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\345\220\214\346\255\245\345\274\202\345\270\270warning\344\272\213\344\273\266.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\345\220\214\346\255\245\345\274\202\345\270\270warning\344\272\213\344\273\266.json" index 22a5765ae7..d39b49bd3c 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\345\220\214\346\255\245\345\274\202\345\270\270warning\344\272\213\344\273\266.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\345\220\214\346\255\245\345\274\202\345\270\270warning\344\272\213\344\273\266.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -239,17 +239,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -269,7 +269,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_sync-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\345\256\236\344\276\213CPU\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\345\256\236\344\276\213CPU\344\275\277\347\224\250\347\216\207.json" index bddb2de06a..37f0fc5b5e 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\345\256\236\344\276\213CPU\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\345\256\236\344\276\213CPU\344\275\277\347\224\250\347\216\207.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisCache]实例CPU使用率", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\345\256\236\344\276\213\345\206\205\345\255\230\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\345\256\236\344\276\213\345\206\205\345\255\230\344\275\277\347\224\250\347\216\207.json" index c241185ac7..963bc382d5 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\345\256\236\344\276\213\345\206\205\345\255\230\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\345\256\236\344\276\213\345\206\205\345\255\230\344\275\277\347\224\250\347\216\207.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisCache]实例内存使用率", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\345\256\236\344\276\213\345\206\231\345\205\245\351\207\217.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\345\256\236\344\276\213\345\206\231\345\205\245\351\207\217.json" index a3c657fca8..09b5abfec4 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\345\256\236\344\276\213\345\206\231\345\205\245\351\207\217.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\345\256\236\344\276\213\345\206\231\345\205\245\351\207\217.json" @@ -165,7 +165,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -228,17 +228,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -258,7 +258,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisCache]实例写入量", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\345\256\236\344\276\213\350\277\236\346\216\245\346\225\260.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\345\256\236\344\276\213\350\277\236\346\216\245\346\225\260.json" index b8876ad7f9..7c88d6e3ea 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\345\256\236\344\276\213\350\277\236\346\216\245\346\225\260.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\345\256\236\344\276\213\350\277\236\346\216\245\346\225\260.json" @@ -165,7 +165,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -228,17 +228,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -258,7 +258,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisCache]实例连接数", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\347\231\273\345\275\225\345\244\261\350\264\245critical\344\272\213\344\273\266.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\347\231\273\345\275\225\345\244\261\350\264\245critical\344\272\213\344\273\266.json" index b82d679004..9886221e6e 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\347\231\273\345\275\225\345\244\261\350\264\245critical\344\272\213\344\273\266.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\347\231\273\345\275\225\345\244\261\350\264\245critical\344\272\213\344\273\266.json" @@ -179,7 +179,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -240,17 +240,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -270,7 +270,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_login-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\351\233\206\347\276\244\345\271\263\345\235\207\345\273\266\350\277\237.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\351\233\206\347\276\244\345\271\263\345\235\207\345\273\266\350\277\237.json" index 9c6adb9ee7..4a0c141c3b 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\351\233\206\347\276\244\345\271\263\345\235\207\345\273\266\350\277\237.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\351\233\206\347\276\244\345\271\263\345\235\207\345\273\266\350\277\237.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisCache]集群平均延迟", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\351\233\206\347\276\244\345\273\266\350\277\237\350\266\205\350\277\2071\347\247\222\347\232\204\350\257\267\346\261\202\346\225\260\351\207\217-\345\210\206\351\222\237.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\351\233\206\347\276\244\345\273\266\350\277\237\350\266\205\350\277\2071\347\247\222\347\232\204\350\257\267\346\261\202\346\225\260\351\207\217-\345\210\206\351\222\237.json" index 5f3e2d8b7d..c5e785fe37 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\351\233\206\347\276\244\345\273\266\350\277\237\350\266\205\350\277\2071\347\247\222\347\232\204\350\257\267\346\261\202\346\225\260\351\207\217-\345\210\206\351\222\237.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisCache)\351\233\206\347\276\244\345\273\266\350\277\237\350\266\205\350\277\2071\347\247\222\347\232\204\350\257\267\346\261\202\346\225\260\351\207\217-\345\210\206\351\222\237.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisCache]集群延迟超过1秒的请求数量/分钟", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)ClusterState\345\274\202\345\270\270critical\344\272\213\344\273\266.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)ClusterState\345\274\202\345\270\270critical\344\272\213\344\273\266.json" index c306803344..76b5b0b02a 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)ClusterState\345\274\202\345\270\270critical\344\272\213\344\273\266.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)ClusterState\345\274\202\345\270\270critical\344\272\213\344\273\266.json" @@ -179,7 +179,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -240,17 +240,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -270,7 +270,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_cluster_state-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)ClusterState\345\274\202\345\270\270warning\344\272\213\344\273\266.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)ClusterState\345\274\202\345\270\270warning\344\272\213\344\273\266.json" index 524c2ae67a..1c674c7bba 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)ClusterState\345\274\202\345\270\270warning\344\272\213\344\273\266.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)ClusterState\345\274\202\345\270\270warning\344\272\213\344\273\266.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -239,17 +239,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -269,7 +269,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_cluster_state-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)Persist\345\274\202\345\270\270critical\344\272\213\344\273\266.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)Persist\345\274\202\345\270\270critical\344\272\213\344\273\266.json" index eebc894890..dd1ec67378 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)Persist\345\274\202\345\270\270critical\344\272\213\344\273\266.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)Persist\345\274\202\345\270\270critical\344\272\213\344\273\266.json" @@ -179,7 +179,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -240,17 +240,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -270,7 +270,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_persist-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)Persist\345\274\202\345\270\270warning\344\272\213\344\273\266.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)Persist\345\274\202\345\270\270warning\344\272\213\344\273\266.json" index dfcf426a49..9cc4c8880d 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)Persist\345\274\202\345\270\270warning\344\272\213\344\273\266.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)Persist\345\274\202\345\270\270warning\344\272\213\344\273\266.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -239,17 +239,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -269,7 +269,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_persist-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)Proxy\347\231\273\345\275\225\345\244\261\350\264\245critical\344\272\213\344\273\266.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)Proxy\347\231\273\345\275\225\345\244\261\350\264\245critical\344\272\213\344\273\266.json" index f99c9874b9..c0fc58bcb8 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)Proxy\347\231\273\345\275\225\345\244\261\350\264\245critical\344\272\213\344\273\266.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)Proxy\347\231\273\345\275\225\345\244\261\350\264\245critical\344\272\213\344\273\266.json" @@ -179,7 +179,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -240,17 +240,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -270,7 +270,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(predixy_login-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)Proxy\351\207\215\345\220\257warning\344\272\213\344\273\266.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)Proxy\351\207\215\345\220\257warning\344\272\213\344\273\266.json" index ec36ffc736..5e9f608b2b 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)Proxy\351\207\215\345\220\257warning\344\272\213\344\273\266.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)Proxy\351\207\215\345\220\257warning\344\272\213\344\273\266.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -239,17 +239,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -269,7 +269,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(predixy_restart-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272CPU\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272CPU\344\275\277\347\224\250\347\216\207.json" index 009f0af62f..f05ab3458a 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272CPU\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272CPU\344\275\277\347\224\250\347\216\207.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisPlus]主机CPU使用率", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272\345\206\205\345\255\230\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272\345\206\205\345\255\230\344\275\277\347\224\250\347\216\207.json" index 998c288025..6bc995ba5a 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272\345\206\205\345\255\230\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272\345\206\205\345\255\230\344\275\277\347\224\250\347\216\207.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisPlus]主机内存使用率", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272\345\215\225\346\240\270CPU\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272\345\215\225\346\240\270CPU\344\275\277\347\224\250\347\216\207.json" index 955296e231..707d76b2aa 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272\345\215\225\346\240\270CPU\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272\345\215\225\346\240\270CPU\344\275\277\347\224\250\347\216\207.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisPlus]主机单核CPU使用率", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272\347\243\201\347\233\230IO\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272\347\243\201\347\233\230IO\344\275\277\347\224\250\347\216\207.json" index 703e1b30a1..8932ccb0b8 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272\347\243\201\347\233\230IO\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272\347\243\201\347\233\230IO\344\275\277\347\224\250\347\216\207.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisPlus]主机磁盘IO使用率", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272\347\243\201\347\233\230\345\256\271\351\207\217\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272\347\243\201\347\233\230\345\256\271\351\207\217\344\275\277\347\224\250\347\216\207.json" index eeffebefc4..194b575e65 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272\347\243\201\347\233\230\345\256\271\351\207\217\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272\347\243\201\347\233\230\345\256\271\351\207\217\344\275\277\347\224\250\347\216\207.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisPlus]主机磁盘容量使用率", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272\347\275\221\347\273\234\345\214\205\351\207\217\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272\347\275\221\347\273\234\345\214\205\351\207\217\344\275\277\347\224\250\347\216\207.json" index 7dc01767d3..9e84fe95f5 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272\347\275\221\347\273\234\345\214\205\351\207\217\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272\347\275\221\347\273\234\345\214\205\351\207\217\344\275\277\347\224\250\347\216\207.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisPlus]主机网络包量使用率", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272\347\275\221\347\273\234\346\265\201\351\207\217\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272\347\275\221\347\273\234\346\265\201\351\207\217\344\275\277\347\224\250\347\216\207.json" index 9988820754..4309d224a9 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272\347\275\221\347\273\234\346\265\201\351\207\217\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\344\270\273\346\234\272\347\275\221\347\273\234\346\265\201\351\207\217\344\275\277\347\224\250\347\216\207.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisPlus]主机网络流量使用率", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\345\220\214\346\255\245\345\274\202\345\270\270critical\344\272\213\344\273\266.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\345\220\214\346\255\245\345\274\202\345\270\270critical\344\272\213\344\273\266.json" index f1931160de..9265fcb77d 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\345\220\214\346\255\245\345\274\202\345\270\270critical\344\272\213\344\273\266.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\345\220\214\346\255\245\345\274\202\345\270\270critical\344\272\213\344\273\266.json" @@ -179,7 +179,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -240,17 +240,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -270,7 +270,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_sync-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\345\220\214\346\255\245\345\274\202\345\270\270warning\344\272\213\344\273\266.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\345\220\214\346\255\245\345\274\202\345\270\270warning\344\272\213\344\273\266.json" index 50d127992f..dcb373491e 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\345\220\214\346\255\245\345\274\202\345\270\270warning\344\272\213\344\273\266.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\345\220\214\346\255\245\345\274\202\345\270\270warning\344\272\213\344\273\266.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -239,17 +239,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -269,7 +269,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_sync-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\345\256\236\344\276\213\345\220\214\346\255\245\350\220\275\345\220\216.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\345\256\236\344\276\213\345\220\214\346\255\245\350\220\275\345\220\216.json" index a124e1bc3d..446b99b978 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\345\256\236\344\276\213\345\220\214\346\255\245\350\220\275\345\220\216.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\345\256\236\344\276\213\345\220\214\346\255\245\350\220\275\345\220\216.json" @@ -165,7 +165,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -228,17 +228,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -258,7 +258,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisPlus]实例同步落后", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\345\256\236\344\276\213\350\277\236\346\216\245\346\225\260.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\345\256\236\344\276\213\350\277\236\346\216\245\346\225\260.json" index ed61565540..4b5d7dad05 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\345\256\236\344\276\213\350\277\236\346\216\245\346\225\260.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\345\256\236\344\276\213\350\277\236\346\216\245\346\225\260.json" @@ -165,7 +165,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -228,17 +228,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -258,7 +258,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisPlus]实例连接数", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\347\231\273\345\275\225\345\244\261\350\264\245critical\344\272\213\344\273\266.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\347\231\273\345\275\225\345\244\261\350\264\245critical\344\272\213\344\273\266.json" index 45faf59ff9..fd569eb91c 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\347\231\273\345\275\225\345\244\261\350\264\245critical\344\272\213\344\273\266.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\347\231\273\345\275\225\345\244\261\350\264\245critical\344\272\213\344\273\266.json" @@ -179,7 +179,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -240,17 +240,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -270,7 +270,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_login-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\351\233\206\347\276\244P99\345\273\266\350\277\237.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\351\233\206\347\276\244P99\345\273\266\350\277\237.json" index 9930ed5ea9..a54aaad13a 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\351\233\206\347\276\244P99\345\273\266\350\277\237.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\351\233\206\347\276\244P99\345\273\266\350\277\237.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisPlus]集群P99延迟", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\351\233\206\347\276\244\345\271\263\345\235\207\345\273\266\350\277\237.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\351\233\206\347\276\244\345\271\263\345\235\207\345\273\266\350\277\237.json" index e7ec6095f7..615285b426 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\351\233\206\347\276\244\345\271\263\345\235\207\345\273\266\350\277\237.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\351\233\206\347\276\244\345\271\263\345\235\207\345\273\266\350\277\237.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisPlus]集群平均延迟", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\351\233\206\347\276\244\345\273\266\350\277\237\350\266\205\350\277\2071\347\247\222\347\232\204\350\257\267\346\261\202\346\225\260\351\207\217-\345\210\206\351\222\237.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\351\233\206\347\276\244\345\273\266\350\277\237\350\266\205\350\277\2071\347\247\222\347\232\204\350\257\267\346\261\202\346\225\260\351\207\217-\345\210\206\351\222\237.json" index fe053cc6a3..b67412114d 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\351\233\206\347\276\244\345\273\266\350\277\237\350\266\205\350\277\2071\347\247\222\347\232\204\350\257\267\346\261\202\346\225\260\351\207\217-\345\210\206\351\222\237.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisPlus)\351\233\206\347\276\244\345\273\266\350\277\237\350\266\205\350\277\2071\347\247\222\347\232\204\350\257\267\346\261\202\346\225\260\351\207\217-\345\210\206\351\222\237.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisPlus]集群延迟超过1秒的请求数量/分钟", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)Persist\345\274\202\345\270\270critical\344\272\213\344\273\266.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)Persist\345\274\202\345\270\270critical\344\272\213\344\273\266.json" index ac52d026a5..646b7b8da6 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)Persist\345\274\202\345\270\270critical\344\272\213\344\273\266.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)Persist\345\274\202\345\270\270critical\344\272\213\344\273\266.json" @@ -179,7 +179,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -240,17 +240,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -270,7 +270,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_persist-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)Persist\345\274\202\345\270\270warning\344\272\213\344\273\266.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)Persist\345\274\202\345\270\270warning\344\272\213\344\273\266.json" index 76b064c521..44f359bd77 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)Persist\345\274\202\345\270\270warning\344\272\213\344\273\266.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)Persist\345\274\202\345\270\270warning\344\272\213\344\273\266.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -239,17 +239,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -269,7 +269,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_persist-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)Proxy\347\231\273\345\275\225\345\244\261\350\264\245critical\344\272\213\344\273\266.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)Proxy\347\231\273\345\275\225\345\244\261\350\264\245critical\344\272\213\344\273\266.json" index 4ab0df602e..7ec58dc0ca 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)Proxy\347\231\273\345\275\225\345\244\261\350\264\245critical\344\272\213\344\273\266.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)Proxy\347\231\273\345\275\225\345\244\261\350\264\245critical\344\272\213\344\273\266.json" @@ -179,7 +179,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -240,17 +240,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -270,7 +270,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(twemproxy_login-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)Proxy\351\207\215\345\220\257warning\344\272\213\344\273\266.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)Proxy\351\207\215\345\220\257warning\344\272\213\344\273\266.json" index ebc78f3935..aa9b26c78e 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)Proxy\351\207\215\345\220\257warning\344\272\213\344\273\266.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)Proxy\351\207\215\345\220\257warning\344\272\213\344\273\266.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -239,17 +239,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -269,7 +269,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(twemproxy_restart-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272BinlogSize-1000.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272BinlogSize-1000.json" index 8b8a17458f..c6289fd495 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272BinlogSize-1000.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272BinlogSize-1000.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisSSD]主机BinlogSize/1000", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272CPU\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272CPU\344\275\277\347\224\250\347\216\207.json" index 5ee2124aa7..df664bf3b8 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272CPU\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272CPU\344\275\277\347\224\250\347\216\207.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisSSD]主机CPU使用率", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272\345\206\205\345\255\230\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272\345\206\205\345\255\230\344\275\277\347\224\250\347\216\207.json" index 941b9f2587..70fc651fdf 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272\345\206\205\345\255\230\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272\345\206\205\345\255\230\344\275\277\347\224\250\347\216\207.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisSSD]主机内存使用率", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272\345\215\225\346\240\270CPU\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272\345\215\225\346\240\270CPU\344\275\277\347\224\250\347\216\207.json" index 01d3c6040e..b0734f0e83 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272\345\215\225\346\240\270CPU\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272\345\215\225\346\240\270CPU\344\275\277\347\224\250\347\216\207.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisSSD]主机单核CPU使用率", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272\347\243\201\347\233\230IO\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272\347\243\201\347\233\230IO\344\275\277\347\224\250\347\216\207.json" index a1f70ed65c..387416d93e 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272\347\243\201\347\233\230IO\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272\347\243\201\347\233\230IO\344\275\277\347\224\250\347\216\207.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisSSD]主机磁盘IO使用率", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272\347\243\201\347\233\230\345\256\271\351\207\217\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272\347\243\201\347\233\230\345\256\271\351\207\217\344\275\277\347\224\250\347\216\207.json" index fa75e53e13..f9ecf87127 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272\347\243\201\347\233\230\345\256\271\351\207\217\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272\347\243\201\347\233\230\345\256\271\351\207\217\344\275\277\347\224\250\347\216\207.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisSSD]主机磁盘容量使用率", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272\347\275\221\347\273\234\345\214\205\351\207\217\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272\347\275\221\347\273\234\345\214\205\351\207\217\344\275\277\347\224\250\347\216\207.json" index 0c1081d967..03f19bf459 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272\347\275\221\347\273\234\345\214\205\351\207\217\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272\347\275\221\347\273\234\345\214\205\351\207\217\344\275\277\347\224\250\347\216\207.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisSSD]主机网络包量使用率", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272\347\275\221\347\273\234\346\265\201\351\207\217\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272\347\275\221\347\273\234\346\265\201\351\207\217\344\275\277\347\224\250\347\216\207.json" index 8996f513a0..1944710c7d 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272\347\275\221\347\273\234\346\265\201\351\207\217\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\344\270\273\346\234\272\347\275\221\347\273\234\346\265\201\351\207\217\344\275\277\347\224\250\347\216\207.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisSSD]主机网络流量使用率", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\345\220\214\346\255\245\345\274\202\345\270\270critical\344\272\213\344\273\266.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\345\220\214\346\255\245\345\274\202\345\270\270critical\344\272\213\344\273\266.json" index 9ffdf5d995..2618fc06c5 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\345\220\214\346\255\245\345\274\202\345\270\270critical\344\272\213\344\273\266.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\345\220\214\346\255\245\345\274\202\345\270\270critical\344\272\213\344\273\266.json" @@ -179,7 +179,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -240,17 +240,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -270,7 +270,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_sync-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\345\220\214\346\255\245\345\274\202\345\270\270warning\344\272\213\344\273\266.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\345\220\214\346\255\245\345\274\202\345\270\270warning\344\272\213\344\273\266.json" index 6abb5d806d..2c9ac02d55 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\345\220\214\346\255\245\345\274\202\345\270\270warning\344\272\213\344\273\266.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\345\220\214\346\255\245\345\274\202\345\270\270warning\344\272\213\344\273\266.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -239,17 +239,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -269,7 +269,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_sync-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\345\256\236\344\276\213CPU\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\345\256\236\344\276\213CPU\344\275\277\347\224\250\347\216\207.json" index ec87a7eb3c..52816e9620 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\345\256\236\344\276\213CPU\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\345\256\236\344\276\213CPU\344\275\277\347\224\250\347\216\207.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisSSD]实例CPU使用率", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\345\256\236\344\276\213\345\206\205\345\255\230\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\345\256\236\344\276\213\345\206\205\345\255\230\344\275\277\347\224\250\347\216\207.json" index 44758cdc4d..f49991119f 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\345\256\236\344\276\213\345\206\205\345\255\230\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\345\256\236\344\276\213\345\206\205\345\255\230\344\275\277\347\224\250\347\216\207.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisSSD]实例内存使用率", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\345\256\236\344\276\213\345\220\214\346\255\245\350\220\275\345\220\216.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\345\256\236\344\276\213\345\220\214\346\255\245\350\220\275\345\220\216.json" index 400fda94b0..5eae528f5d 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\345\256\236\344\276\213\345\220\214\346\255\245\350\220\275\345\220\216.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\345\256\236\344\276\213\345\220\214\346\255\245\350\220\275\345\220\216.json" @@ -165,7 +165,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -228,17 +228,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -258,7 +258,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisSSD]实例同步落后", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\345\256\236\344\276\213\350\277\236\346\216\245\346\225\260.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\345\256\236\344\276\213\350\277\236\346\216\245\346\225\260.json" index a879611cc9..a3ea0c3840 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\345\256\236\344\276\213\350\277\236\346\216\245\346\225\260.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\345\256\236\344\276\213\350\277\236\346\216\245\346\225\260.json" @@ -165,7 +165,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -228,17 +228,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -258,7 +258,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisSSD]实例连接数", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\347\231\273\345\275\225\345\244\261\350\264\245critical\344\272\213\344\273\266.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\347\231\273\345\275\225\345\244\261\350\264\245critical\344\272\213\344\273\266.json" index 36f5cb7ed9..ed46dd3e34 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\347\231\273\345\275\225\345\244\261\350\264\245critical\344\272\213\344\273\266.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\347\231\273\345\275\225\345\244\261\350\264\245critical\344\272\213\344\273\266.json" @@ -179,7 +179,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -240,17 +240,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -270,7 +270,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_login-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\351\233\206\347\276\244P99\345\273\266\350\277\237.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\351\233\206\347\276\244P99\345\273\266\350\277\237.json" index 720ebaf783..1e0dcd2009 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\351\233\206\347\276\244P99\345\273\266\350\277\237.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\351\233\206\347\276\244P99\345\273\266\350\277\237.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisSSD]集群P99延迟", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\351\233\206\347\276\244\345\271\263\345\235\207\345\273\266\350\277\237.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\351\233\206\347\276\244\345\271\263\345\235\207\345\273\266\350\277\237.json" index 9d652c1998..17696ab3d8 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\351\233\206\347\276\244\345\271\263\345\235\207\345\273\266\350\277\237.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\351\233\206\347\276\244\345\271\263\345\235\207\345\273\266\350\277\237.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisSSD]集群平均延迟", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\351\233\206\347\276\244\345\273\266\350\277\237\350\266\205\350\277\2071\347\247\222\347\232\204\350\257\267\346\261\202\346\225\260\351\207\217-\345\210\206\351\222\237.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\351\233\206\347\276\244\345\273\266\350\277\237\350\266\205\350\277\2071\347\247\222\347\232\204\350\257\267\346\261\202\346\225\260\351\207\217-\345\210\206\351\222\237.json" index 37310dc614..9931f1f6bf 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\351\233\206\347\276\244\345\273\266\350\277\237\350\266\205\350\277\2071\347\247\222\347\232\204\350\257\267\346\261\202\346\225\260\351\207\217-\345\210\206\351\222\237.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/Redis(TendisSSD)\351\233\206\347\276\244\345\273\266\350\277\237\350\266\205\350\277\2071\347\247\222\347\232\204\350\257\267\346\261\202\346\225\260\351\207\217-\345\210\206\351\222\237.json" @@ -178,7 +178,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -241,17 +241,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -271,7 +271,7 @@ }, "is_enabled": true, "monitor_indicator": "[TendisSSD]集群延迟超过1秒的请求数量/分钟", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis cluster_state.error\344\272\213\344\273\266\345\221\212\350\255\246.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis cluster_state.error\344\272\213\344\273\266\345\221\212\350\255\246.json" index 26755e1676..93d5a76e9f 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis cluster_state.error\344\272\213\344\273\266\345\221\212\350\255\246.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis cluster_state.error\344\272\213\344\273\266\345\221\212\350\255\246.json" @@ -164,7 +164,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -225,17 +225,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -256,7 +256,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_cluster_state-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis cluster_state.warn\344\272\213\344\273\266\345\221\212\350\255\246.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis cluster_state.warn\344\272\213\344\273\266\345\221\212\350\255\246.json" index 851bdc1bfc..e88b5f8517 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis cluster_state.warn\344\272\213\344\273\266\345\221\212\350\255\246.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis cluster_state.warn\344\272\213\344\273\266\345\221\212\350\255\246.json" @@ -164,7 +164,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -225,17 +225,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -256,7 +256,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_cluster_state-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis dbha\345\210\207\346\215\242redis\345\244\261\350\264\245\347\255\226\347\225\245.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis dbha\345\210\207\346\215\242redis\345\244\261\350\264\245\347\255\226\347\225\245.json" index 3a983be45c..d08db1d919 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis dbha\345\210\207\346\215\242redis\345\244\261\350\264\245\347\255\226\347\225\245.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis dbha\345\210\207\346\215\242redis\345\244\261\350\264\245\347\255\226\347\225\245.json" @@ -158,7 +158,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -219,17 +219,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -249,7 +249,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(dbha_redis_switch_err-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis dbha\345\210\207\346\215\242redis\346\210\220\345\212\237\347\255\226\347\225\245.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis dbha\345\210\207\346\215\242redis\346\210\220\345\212\237\347\255\226\347\225\245.json" index 4694a78a0f..6337d7c76f 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis dbha\345\210\207\346\215\242redis\346\210\220\345\212\237\347\255\226\347\225\245.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis dbha\345\210\207\346\215\242redis\346\210\220\345\212\237\347\255\226\347\225\245.json" @@ -158,7 +158,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -219,17 +219,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -249,7 +249,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(dbha_redis_switch_succ-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis dbha\346\216\242\346\265\213\351\211\264\346\235\203\345\244\261\350\264\245.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis dbha\346\216\242\346\265\213\351\211\264\346\235\203\345\244\261\350\264\245.json" index 99872b8719..313d93dd8e 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis dbha\346\216\242\346\265\213\351\211\264\346\235\203\345\244\261\350\264\245.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis dbha\346\216\242\346\265\213\351\211\264\346\235\203\345\244\261\350\264\245.json" @@ -205,7 +205,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -266,17 +266,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -296,7 +296,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(dbha_detect_auth_fail-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis login\344\272\213\344\273\266\345\221\212\350\255\246.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis login\344\272\213\344\273\266\345\221\212\350\255\246.json" index e814e4d472..5a3f901299 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis login\344\272\213\344\273\266\345\221\212\350\255\246.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis login\344\272\213\344\273\266\345\221\212\350\255\246.json" @@ -154,7 +154,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -215,17 +215,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -246,7 +246,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_login-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis persist.error\344\272\213\344\273\266\345\221\212\350\255\246.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis persist.error\344\272\213\344\273\266\345\221\212\350\255\246.json" index ea42128a5c..7f8c987231 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis persist.error\344\272\213\344\273\266\345\221\212\350\255\246.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis persist.error\344\272\213\344\273\266\345\221\212\350\255\246.json" @@ -165,7 +165,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -226,17 +226,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -257,7 +257,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_persist-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis persist.warning\344\272\213\344\273\266\345\221\212\350\255\246.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis persist.warning\344\272\213\344\273\266\345\221\212\350\255\246.json" index d3edb10d3c..8b1f01d04c 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis persist.warning\344\272\213\344\273\266\345\221\212\350\255\246.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis persist.warning\344\272\213\344\273\266\345\221\212\350\255\246.json" @@ -166,7 +166,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -227,17 +227,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -258,7 +258,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_persist-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis predixy.login\344\272\213\344\273\266\345\221\212\350\255\246.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis predixy.login\344\272\213\344\273\266\345\221\212\350\255\246.json" index 34546f6a2e..1347bbd278 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis predixy.login\344\272\213\344\273\266\345\221\212\350\255\246.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis predixy.login\344\272\213\344\273\266\345\221\212\350\255\246.json" @@ -154,7 +154,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -215,17 +215,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -246,7 +246,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(predixy_login-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis predixy_restart\344\272\213\344\273\266\345\221\212\350\255\246.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis predixy_restart\344\272\213\344\273\266\345\221\212\350\255\246.json" index e2058379cb..489ece8c52 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis predixy_restart\344\272\213\344\273\266\345\221\212\350\255\246.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis predixy_restart\344\272\213\344\273\266\345\221\212\350\255\246.json" @@ -155,7 +155,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -216,17 +216,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -247,7 +247,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(predixy_restart-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis sync.error\344\272\213\344\273\266\345\221\212\350\255\246.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis sync.error\344\272\213\344\273\266\345\221\212\350\255\246.json" index d2d0d9192f..4b3713774c 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis sync.error\344\272\213\344\273\266\345\221\212\350\255\246.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis sync.error\344\272\213\344\273\266\345\221\212\350\255\246.json" @@ -164,7 +164,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -225,17 +225,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -256,7 +256,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_sync-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis sync.warning\344\272\213\344\273\266\345\221\212\350\255\246.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis sync.warning\344\272\213\344\273\266\345\221\212\350\255\246.json" index 8be4f816b2..6b7b62b81f 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis sync.warning\344\272\213\344\273\266\345\221\212\350\255\246.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis sync.warning\344\272\213\344\273\266\345\221\212\350\255\246.json" @@ -164,7 +164,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -225,17 +225,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -256,7 +256,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_sync-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis twemproxy_login\344\272\213\344\273\266\345\221\212\350\255\246.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis twemproxy_login\344\272\213\344\273\266\345\221\212\350\255\246.json" index 219780a4a4..e888253636 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis twemproxy_login\344\272\213\344\273\266\345\221\212\350\255\246.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis twemproxy_login\344\272\213\344\273\266\345\221\212\350\255\246.json" @@ -154,7 +154,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -215,17 +215,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -246,7 +246,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(twemproxy_login-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis twemproxy_restart\344\272\213\344\273\266\345\221\212\350\255\246.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis twemproxy_restart\344\272\213\344\273\266\345\221\212\350\255\246.json" index 6ef387e106..3900b983f5 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis twemproxy_restart\344\272\213\344\273\266\345\221\212\350\255\246.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis twemproxy_restart\344\272\213\344\273\266\345\221\212\350\255\246.json" @@ -155,7 +155,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -216,17 +216,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -247,7 +247,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(twemproxy_restart-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \344\270\273\346\234\272CPU\344\275\277\347\224\250\347\216\207\345\221\212\350\255\246.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \344\270\273\346\234\272CPU\344\275\277\347\224\250\347\216\207\345\221\212\350\255\246.json" index 13192d21c1..faf64c23e2 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \344\270\273\346\234\272CPU\344\275\277\347\224\250\347\216\207\345\221\212\350\255\246.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \344\270\273\346\234\272CPU\344\275\277\347\224\250\347\216\207\345\221\212\350\255\246.json" @@ -209,7 +209,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -270,17 +270,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -301,7 +301,7 @@ }, "is_enabled": true, "monitor_indicator": "MIN(CPU\u4f7f\u7528\u7387)", - "version": 17, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \344\270\273\346\234\272\345\206\205\345\255\230\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \344\270\273\346\234\272\345\206\205\345\255\230\344\275\277\347\224\250\347\216\207.json" index fac72b8165..7ae711d8e5 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \344\270\273\346\234\272\345\206\205\345\255\230\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \344\270\273\346\234\272\345\206\205\345\255\230\344\275\277\347\224\250\347\216\207.json" @@ -209,7 +209,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -270,17 +270,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}\n{{action_instance.assignees}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}\n{{action_instance.assignees}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -301,7 +301,7 @@ }, "is_enabled": true, "monitor_indicator": "MIN(\u5e94\u7528\u7a0b\u5e8f\u5185\u5b58\u4f7f\u7528\u5360\u6bd4)", - "version": 17, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \344\270\273\346\234\272\345\215\225\346\240\270CPU\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \344\270\273\346\234\272\345\215\225\346\240\270CPU\344\275\277\347\224\250\347\216\207.json" index 83b7e1dee4..13677d5f19 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \344\270\273\346\234\272\345\215\225\346\240\270CPU\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \344\270\273\346\234\272\345\215\225\346\240\270CPU\344\275\277\347\224\250\347\216\207.json" @@ -209,7 +209,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -270,17 +270,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -301,7 +301,7 @@ }, "is_enabled": true, "monitor_indicator": "MAX(CPU\u5355\u6838\u4f7f\u7528\u7387)", - "version": 17, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \344\270\273\346\234\272\347\243\201\347\233\230IO\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \344\270\273\346\234\272\347\243\201\347\233\230IO\344\275\277\347\224\250\347\216\207.json" index 4720b68f73..89542dec19 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \344\270\273\346\234\272\347\243\201\347\233\230IO\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \344\270\273\346\234\272\347\243\201\347\233\230IO\344\275\277\347\224\250\347\216\207.json" @@ -209,7 +209,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -272,17 +272,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -303,7 +303,7 @@ }, "is_enabled": true, "monitor_indicator": "MIN(I/O\u4f7f\u7528\u7387)", - "version": 17, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \344\270\273\346\234\272\347\243\201\347\233\230\345\256\271\351\207\217\344\275\277\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \344\270\273\346\234\272\347\243\201\347\233\230\345\256\271\351\207\217\344\275\277\347\224\250\347\216\207.json" index f1cd54d8de..f2b4fc46ec 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \344\270\273\346\234\272\347\243\201\347\233\230\345\256\271\351\207\217\344\275\277\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \344\270\273\346\234\272\347\243\201\347\233\230\345\256\271\351\207\217\344\275\277\347\224\250\347\216\207.json" @@ -209,7 +209,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -270,17 +270,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -301,7 +301,7 @@ }, "is_enabled": true, "monitor_indicator": "MIN(\u78c1\u76d8\u7a7a\u95f4\u4f7f\u7528\u7387)", - "version": 17, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \346\227\245\345\277\227.error\344\272\213\344\273\266\345\221\212\350\255\246.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \346\227\245\345\277\227.error\344\272\213\344\273\266\345\221\212\350\255\246.json" index 6c0868f24d..543461d199 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \346\227\245\345\277\227.error\344\272\213\344\273\266\345\221\212\350\255\246.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \346\227\245\345\277\227.error\344\272\213\344\273\266\345\221\212\350\255\246.json" @@ -165,7 +165,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -226,17 +226,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -257,7 +257,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_log-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \346\227\245\345\277\227.warning\344\272\213\344\273\266\345\221\212\350\255\246.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \346\227\245\345\277\227.warning\344\272\213\344\273\266\345\221\212\350\255\246.json" index 6fc3e5588b..a7401733c6 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \346\227\245\345\277\227.warning\344\272\213\344\273\266\345\221\212\350\255\246.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/Redis \346\227\245\345\277\227.warning\344\272\213\344\273\266\345\221\212\350\255\246.json" @@ -165,7 +165,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -226,17 +226,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -257,7 +257,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(redis_log-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/TendisSSD binlog.error\344\272\213\344\273\266\345\221\212\350\255\246.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/TendisSSD binlog.error\344\272\213\344\273\266\345\221\212\350\255\246.json" index 835aff3bc0..2e2419ef19 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/TendisSSD binlog.error\344\272\213\344\273\266\345\221\212\350\255\246.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/TendisSSD binlog.error\344\272\213\344\273\266\345\221\212\350\255\246.json" @@ -163,7 +163,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -224,17 +224,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -255,7 +255,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(tendis_binlog_len-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/TendisSSD binlog.warning\344\272\213\344\273\266\345\221\212\350\255\246.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/TendisSSD binlog.warning\344\272\213\344\273\266\345\221\212\350\255\246.json" index 99136a4de0..279ccfca52 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/TendisSSD binlog.warning\344\272\213\344\273\266\345\221\212\350\255\246.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/redis/v1/TendisSSD binlog.warning\344\272\213\344\273\266\345\221\212\350\255\246.json" @@ -163,7 +163,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -224,17 +224,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -255,7 +255,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(tendis_binlog_len-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak Ring Status\351\233\206\347\276\244\347\212\266\346\200\201.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak Ring Status\351\233\206\347\276\244\347\212\266\346\200\201.json" index 6b9c34c6eb..6c9c4b3e28 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak Ring Status\351\233\206\347\276\244\347\212\266\346\200\201.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak Ring Status\351\233\206\347\276\244\347\212\266\346\200\201.json" @@ -150,7 +150,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -211,17 +211,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -242,7 +242,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(riak-ring-status-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak \344\270\273\346\234\272 CPU \350\264\237\350\275\275.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak \344\270\273\346\234\272 CPU \350\264\237\350\275\275.json" index 44c442ea7a..f547af98e4 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak \344\270\273\346\234\272 CPU \350\264\237\350\275\275.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak \344\270\273\346\234\272 CPU \350\264\237\350\275\275.json" @@ -201,7 +201,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -262,17 +262,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -293,7 +293,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(CPU使用率)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak \344\270\273\346\234\272\347\243\201\347\233\230IO\345\210\251\347\224\250\347\216\207.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak \344\270\273\346\234\272\347\243\201\347\233\230IO\345\210\251\347\224\250\347\216\207.json" index 5acfa31f9c..480f8ebfb2 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak \344\270\273\346\234\272\347\243\201\347\233\230IO\345\210\251\347\224\250\347\216\207.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak \344\270\273\346\234\272\347\243\201\347\233\230IO\345\210\251\347\224\250\347\216\207.json" @@ -167,7 +167,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -228,17 +228,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -259,7 +259,7 @@ }, "is_enabled": true, "monitor_indicator": "AVG(I/O使用率)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak \345\223\215\345\272\224\346\205\242\346\210\226\350\200\205\350\256\277\351\227\256\346\213\222\347\273\235.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak \345\223\215\345\272\224\346\205\242\346\210\226\350\200\205\350\256\277\351\227\256\346\213\222\347\273\235.json" index 0ffac68814..89699c062f 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak \345\223\215\345\272\224\346\205\242\346\210\226\350\200\205\350\256\277\351\227\256\346\213\222\347\273\235.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak \345\223\215\345\272\224\346\205\242\346\210\226\350\200\205\350\256\277\351\227\256\346\213\222\347\273\235.json" @@ -152,7 +152,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -219,17 +219,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -250,7 +250,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(riak-load-health-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak \346\227\245\345\277\227\347\233\221\346\216\247.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak \346\227\245\345\277\227\347\233\221\346\216\247.json" index 6a946d5445..7f6aaa583a 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak \346\227\245\345\277\227\347\233\221\346\216\247.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak \346\227\245\345\277\227\347\233\221\346\216\247.json" @@ -153,7 +153,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -214,17 +214,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -245,7 +245,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(riak-err-notice-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak \347\243\201\347\233\230\347\251\272\351\227\264\345\221\212\350\255\246.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak \347\243\201\347\233\230\347\251\272\351\227\264\345\221\212\350\255\246.json" index f713e03274..a33343b482 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak \347\243\201\347\233\230\347\251\272\351\227\264\345\221\212\350\255\246.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak \347\243\201\347\233\230\347\251\272\351\227\264\345\221\212\350\255\246.json" @@ -202,7 +202,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -263,17 +263,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -294,7 +294,7 @@ }, "is_enabled": true, "monitor_indicator": "MAX(磁盘空间使用率)", - "version": 16, + "version": 22, "alert_source": "time_series", "custom_conditions": [] } \ No newline at end of file diff --git "a/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak \350\277\236\346\216\245\345\244\261\350\264\245.json" "b/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak \350\277\236\346\216\245\345\244\261\350\264\245.json" index 162f971beb..514a43b4b9 100644 --- "a/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak \350\277\236\346\216\245\345\244\261\350\264\245.json" +++ "b/dbm-ui/backend/db_monitor/tpls/alarm/riak/Riak \350\277\236\346\216\245\345\244\261\350\264\245.json" @@ -153,7 +153,7 @@ "timedelta": 60, "is_enabled": true, "converge_func": "collect", - "need_biz_converge": true, + "need_biz_converge": false, "sub_converge_config": { "timedelta": 60, "count": 2, @@ -219,17 +219,17 @@ "template": [ { "signal": "abnormal", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "recovered", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" }, { "signal": "closed", - "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", + "message_tmpl": "{{content.level}}\n{{content.begin_time}}\n{{content.time}}\n{{content.duration}}\n{{content.target_type}}\n{{content.data_source}}\n{{content.content}}\n{{content.current_value}}\n{{content.biz}}\n通知人:{{alarm.receivers}}\n{{content.target}}\n{{content.dimension}}\n{{content.detail}}\n{{content.assign_detail}}\n{{content.related_info}}", "title_tmpl": "{{business.bk_biz_name}} - {{alarm.name}}{{alarm.display_type}}" } ] @@ -250,7 +250,7 @@ }, "is_enabled": true, "monitor_indicator": "COUNT(riak-db-up-dbm_report_channel)", - "version": 16, + "version": 22, "alert_source": "event", "custom_conditions": [] } \ No newline at end of file diff --git a/dbm-ui/backend/db_monitor/tpls/collect/dbm_elasticsearch_exporter.json b/dbm-ui/backend/db_monitor/tpls/collect/dbm_elasticsearch_exporter.json index 7138f6204d..cca5914cd4 100644 --- a/dbm-ui/backend/db_monitor/tpls/collect/dbm_elasticsearch_exporter.json +++ b/dbm-ui/backend/db_monitor/tpls/collect/dbm_elasticsearch_exporter.json @@ -38,7 +38,7 @@ "plugin_id": "dbm_elasticsearch_exporter" }, "db_type": "es", - "version": 16, + "version": 17, "machine_types": [], "plugin_id": "dbm_elasticsearch_exporter" } \ No newline at end of file diff --git a/dbm-ui/backend/db_monitor/tpls/collect/dbm_hdfs_exporter.json b/dbm-ui/backend/db_monitor/tpls/collect/dbm_hdfs_exporter.json index 29f49680f7..daa56fea43 100644 --- a/dbm-ui/backend/db_monitor/tpls/collect/dbm_hdfs_exporter.json +++ b/dbm-ui/backend/db_monitor/tpls/collect/dbm_hdfs_exporter.json @@ -38,7 +38,7 @@ "plugin_id": "dbm_hdfs_exporter" }, "db_type": "hdfs", - "version": 16, + "version": 17, "machine_types": [], "plugin_id": "dbm_hdfs_exporter" } \ No newline at end of file diff --git a/dbm-ui/backend/db_monitor/tpls/collect/dbm_kafka_exporter.json b/dbm-ui/backend/db_monitor/tpls/collect/dbm_kafka_exporter.json index 88db95e82d..8e47fd2280 100644 --- a/dbm-ui/backend/db_monitor/tpls/collect/dbm_kafka_exporter.json +++ b/dbm-ui/backend/db_monitor/tpls/collect/dbm_kafka_exporter.json @@ -38,7 +38,7 @@ "plugin_id": "dbm_kafka_exporter" }, "db_type": "kafka", - "version": 16, + "version": 17, "machine_types": [], "plugin_id": "dbm_kafka_exporter", "export_at": "2023-11-22 15:25:54" diff --git a/dbm-ui/backend/db_monitor/tpls/collect/dbm_mysqld_exporter.json b/dbm-ui/backend/db_monitor/tpls/collect/dbm_mysqld_exporter.json index a9fa4f83a4..5849dec0e9 100644 --- a/dbm-ui/backend/db_monitor/tpls/collect/dbm_mysqld_exporter.json +++ b/dbm-ui/backend/db_monitor/tpls/collect/dbm_mysqld_exporter.json @@ -53,7 +53,7 @@ "plugin_id": "dbm_mysqld_exporter" }, "db_type": "mysql", - "version": 16, + "version": 17, "machine_types": [], "plugin_id": "dbm_mysqld_exporter" } \ No newline at end of file diff --git a/dbm-ui/backend/db_monitor/tpls/collect/dbm_mysqlproxy_exporter.json b/dbm-ui/backend/db_monitor/tpls/collect/dbm_mysqlproxy_exporter.json index 8069e24898..c2966663fd 100644 --- a/dbm-ui/backend/db_monitor/tpls/collect/dbm_mysqlproxy_exporter.json +++ b/dbm-ui/backend/db_monitor/tpls/collect/dbm_mysqlproxy_exporter.json @@ -34,7 +34,7 @@ "plugin_id": "dbm_mysqlproxy_exporter" }, "db_type": "mysql", - "version": 16, + "version": 17, "machine_types": [], "plugin_id": "dbm_mysqlproxy_exporter" } \ No newline at end of file diff --git a/dbm-ui/backend/db_monitor/tpls/collect/dbm_predixy_exporter.json b/dbm-ui/backend/db_monitor/tpls/collect/dbm_predixy_exporter.json index 6c85805293..45baf207d2 100644 --- a/dbm-ui/backend/db_monitor/tpls/collect/dbm_predixy_exporter.json +++ b/dbm-ui/backend/db_monitor/tpls/collect/dbm_predixy_exporter.json @@ -36,7 +36,7 @@ "plugin_id": "dbm_predixy_exporter" }, "db_type": "redis", - "version": 16, + "version": 17, "machine_types": [], "plugin_id": "dbm_predixy_exporter" } \ No newline at end of file diff --git a/dbm-ui/backend/db_monitor/tpls/collect/dbm_pulsarbookkeeper_bkpull.json b/dbm-ui/backend/db_monitor/tpls/collect/dbm_pulsarbookkeeper_bkpull.json index aa6ab75ccf..69cce21c1c 100644 --- a/dbm-ui/backend/db_monitor/tpls/collect/dbm_pulsarbookkeeper_bkpull.json +++ b/dbm-ui/backend/db_monitor/tpls/collect/dbm_pulsarbookkeeper_bkpull.json @@ -34,7 +34,7 @@ "plugin_id": "dbm_pulsarbookkeeper_bkpull" }, "db_type": "pulsar", - "version": 16, + "version": 17, "machine_types": [], "plugin_id": "dbm_pulsarbookkeeper_bkpull", "export_at": "2024-03-28T21:04:57+08:00" diff --git a/dbm-ui/backend/db_monitor/tpls/collect/dbm_pulsarbroker_bkpull.json b/dbm-ui/backend/db_monitor/tpls/collect/dbm_pulsarbroker_bkpull.json index 7333804d2f..3c5063b065 100644 --- a/dbm-ui/backend/db_monitor/tpls/collect/dbm_pulsarbroker_bkpull.json +++ b/dbm-ui/backend/db_monitor/tpls/collect/dbm_pulsarbroker_bkpull.json @@ -34,7 +34,7 @@ "plugin_id": "dbm_pulsarbroker_bkpull" }, "db_type": "pulsar", - "version": 16, + "version": 17, "machine_types": [], "plugin_id": "dbm_pulsarbroker_bkpull", "export_at": "2024-03-28T21:05:02+08:00" diff --git a/dbm-ui/backend/db_monitor/tpls/collect/dbm_pulsarzookeeper_bkpull.json b/dbm-ui/backend/db_monitor/tpls/collect/dbm_pulsarzookeeper_bkpull.json index 4960e804c1..880b71691e 100644 --- a/dbm-ui/backend/db_monitor/tpls/collect/dbm_pulsarzookeeper_bkpull.json +++ b/dbm-ui/backend/db_monitor/tpls/collect/dbm_pulsarzookeeper_bkpull.json @@ -34,7 +34,7 @@ "plugin_id": "dbm_pulsarzookeeper_bkpull" }, "db_type": "pulsar", - "version": 16, + "version": 17, "machine_types": [], "plugin_id": "dbm_pulsarzookeeper_bkpull", "export_at": "2024-03-28T21:05:09+08:00" diff --git a/dbm-ui/backend/db_monitor/tpls/collect/dbm_redis_exporter.json b/dbm-ui/backend/db_monitor/tpls/collect/dbm_redis_exporter.json index 1777ca9231..063e0ac8e6 100644 --- a/dbm-ui/backend/db_monitor/tpls/collect/dbm_redis_exporter.json +++ b/dbm-ui/backend/db_monitor/tpls/collect/dbm_redis_exporter.json @@ -37,7 +37,7 @@ "plugin_id": "dbm_redis_exporter" }, "db_type": "redis", - "version": 16, + "version": 17, "machine_types": [], "plugin_id": "dbm_redis_exporter" } \ No newline at end of file diff --git a/dbm-ui/backend/db_monitor/tpls/collect/dbm_spider_exporter.json b/dbm-ui/backend/db_monitor/tpls/collect/dbm_spider_exporter.json index f0be8f1c31..0e914b8b26 100644 --- a/dbm-ui/backend/db_monitor/tpls/collect/dbm_spider_exporter.json +++ b/dbm-ui/backend/db_monitor/tpls/collect/dbm_spider_exporter.json @@ -52,7 +52,7 @@ "plugin_id": "dbm_mysqld_exporter" }, "db_type": "mysql", - "version": 16, + "version": 17, "machine_types": [ "spider" ], diff --git a/dbm-ui/backend/db_monitor/tpls/collect/dbm_twemproxy_exporter.json b/dbm-ui/backend/db_monitor/tpls/collect/dbm_twemproxy_exporter.json index bb5a6ab4c6..66e89b9490 100644 --- a/dbm-ui/backend/db_monitor/tpls/collect/dbm_twemproxy_exporter.json +++ b/dbm-ui/backend/db_monitor/tpls/collect/dbm_twemproxy_exporter.json @@ -36,7 +36,7 @@ "plugin_id": "dbm_twemproxy_exporter" }, "db_type": "redis", - "version": 16, + "version": 17, "machine_types": [], "plugin_id": "dbm_twemproxy_exporter" } \ No newline at end of file diff --git a/dbm-ui/backend/db_periodic_task/local_tasks/db_monitor.py b/dbm-ui/backend/db_periodic_task/local_tasks/db_monitor.py index 245babd8ce..705504e343 100644 --- a/dbm-ui/backend/db_periodic_task/local_tasks/db_monitor.py +++ b/dbm-ui/backend/db_periodic_task/local_tasks/db_monitor.py @@ -31,7 +31,7 @@ logger = logging.getLogger("celery") -@register_periodic_task(run_every=crontab(minute="*/5")) +@register_periodic_task(run_every=crontab(minute="*/15")) def update_local_notice_group(): """同步告警组""" dba_ids = DBAdministrator.objects.values_list("id", flat=True) @@ -88,17 +88,15 @@ def sync_plat_monitor_policy(): with open(os.path.join(root, alarm_tpl), "r", encoding="utf-8") as f: try: template_dict = json.loads(f.read()) + # 监控API不支持传入额外的字段 + template_dict.pop("export_at", "") policy_name = template_dict["name"] - # db_type = template_dict["db_type"] except json.decoder.JSONDecodeError: logger.error("[sync_plat_monitor_policy] load template failed: %s", alarm_tpl) continue deleted = template_dict.pop("deleted", False) - # just for test - # policy_name = policy_name + "-" + get_random_string(5) - # patch template template_dict["details"]["labels"] = list(set(template_dict["details"]["labels"])) template_dict["details"]["name"] = policy_name diff --git a/dbm-ui/backend/db_services/dbbase/resources/query.py b/dbm-ui/backend/db_services/dbbase/resources/query.py index d963e05c30..33e4191c57 100644 --- a/dbm-ui/backend/db_services/dbbase/resources/query.py +++ b/dbm-ui/backend/db_services/dbbase/resources/query.py @@ -9,8 +9,6 @@ specific language governing permissions and limitations under the License. """ import abc -import operator -from functools import reduce from typing import Any, Callable, Dict, List, Tuple, Union import attr @@ -284,9 +282,9 @@ def list_instances(cls, bk_biz_id: int, query_params: Dict, limit: int, offset: return resource_list @classmethod - def retrieve_instance(cls, bk_biz_id: int, cluster_id: int, ip: str, port: int) -> dict: + def retrieve_instance(cls, bk_biz_id: int, cluster_id: int, instance: str) -> dict: """查询实例详情. 具体方法可在子类中自定义""" - instance_details = cls.list_instances(bk_biz_id, {"ip": ip, "port": port}, limit=1, offset=0).data[0] + instance_details = cls.list_instances(bk_biz_id, {"instance": instance}, limit=1, offset=0).data[0] return cls._retrieve_instance(instance_details, cluster_id) @classmethod @@ -395,10 +393,6 @@ def _list_clusters( query_filters &= filter_params_map[param] cluster_queryset = Cluster.objects.filter(query_filters).order_by("create_at") - # 部署时间表头排序 - if query_params.get("ordering"): - cluster_queryset = cluster_queryset.order_by(query_params.get("ordering")) - def filter_inst_queryset(_cluster_queryset, _proxy_queryset, _storage_queryset, _filters): # 注意这里用新的变量获取过滤后的queryset,不要用原queryset过滤,会影响后续集群关联实例的获取 _proxy_filter_queryset = _proxy_queryset.filter(_filters) @@ -409,28 +403,21 @@ def filter_inst_queryset(_cluster_queryset, _proxy_queryset, _storage_queryset, ).distinct() return _cluster_queryset - # ip筛选 - def filter_ip_func(_query_params, _cluster_queryset, _proxy_queryset, _storage_queryset): - """实例过滤ip""" - filter_ip = Q(machine__ip__in=_query_params.get("ip").split(",")) - _cluster_queryset = filter_inst_queryset(_cluster_queryset, _proxy_queryset, _storage_queryset, filter_ip) - return _cluster_queryset - # 实例筛选 def filter_instance_func(_query_params, _cluster_queryset, _proxy_queryset, _storage_queryset): - """实例过滤ip:port""" - insts = _query_params.get("instance").split(",") - filter_inst = reduce( - operator.or_, [Q(machine__ip=inst.split(":")[0], port=inst.split(":")[1]) for inst in insts] - ) + """实例过滤ip:port 以及 ip 两种情况""" + # 应用过滤条件并返回查询集 _cluster_queryset = filter_inst_queryset( - _cluster_queryset, _proxy_queryset, _storage_queryset, filter_inst + _cluster_queryset, _proxy_queryset, _storage_queryset, cls.build_q_for_instance_filter(_query_params) ) + # 部署时间表头排序 + if query_params.get("ordering"): + _cluster_queryset = _cluster_queryset.order_by(query_params.get("ordering")) + return _cluster_queryset filter_func_map = filter_func_map or {} filter_func_map = { - "ip": filter_ip_func, "instance": filter_instance_func, **filter_func_map, } @@ -550,6 +537,23 @@ def _to_cluster_representation( "update_at": datetime2str(cluster.update_at), } + @staticmethod + def build_q_for_instance_filter(params_data: dict) -> Q: + instance_list = params_data.get("instance", "").split(",") + # 初始化两个空的Q对象,稍后用于构造过滤条件 + q_ip = Q() + q_ip_port = Q() + # 对筛选条件进行区分ip,还是ip:port + for instance in instance_list: + if IP_PORT_DIVIDER in instance: + ip, port = instance.split(IP_PORT_DIVIDER) + q_ip_port |= Q(machine__ip=ip, port=port) + else: + q_ip |= Q(machine__ip=instance) + + # 合并两种过滤条件 + return q_ip | q_ip_port + @classmethod def _list_instances( cls, @@ -570,6 +574,28 @@ def _list_instances( """ query_filters = Q(bk_biz_id=bk_biz_id, cluster_type__in=cls.cluster_types) + def build_q_for_domain_filter(_query_params): + domain_list = _query_params.get("domain", "").split(",") + # 初始化列表和Q查询对象 + q_ip_list = [] + q_ip_port_query = Q() + + # 基础查询条件 + base_query = Q(cluster__clusterentry__cluster_entry_type=ClusterEntryType.DNS.value) + + for domain in domain_list: + if IP_PORT_DIVIDER in domain: + ip, port = domain.split(IP_PORT_DIVIDER) + # 为带端口的IP构造查询条件 + q_ip_port_query |= Q(cluster__clusterentry__entry=ip, port=port) + else: + q_ip_list.append(domain) + + # 构造不带端口号的域名查询条件(如果q_ip不为空) + q_ip_query = Q(cluster__clusterentry__entry__in=q_ip_list) if q_ip_list else Q() + + return base_query & (q_ip_query | q_ip_port_query) + # 定义内置的过滤参数map inner_filter_params_map = { "ip": Q(machine__ip__in=query_params.get("ip", "").split(",")), @@ -579,23 +605,9 @@ def _list_instances( "region": Q(region=query_params.get("region")), "role": Q(role__in=query_params.get("role", "").split(",")), "name": Q(cluster__name__in=query_params.get("name", "").split(",")), - "domain": Q( - cluster__clusterentry__cluster_entry_type=ClusterEntryType.DNS.value, - cluster__clusterentry__entry__in=query_params.get("domain", "").split(","), - ), + "domain": build_q_for_domain_filter(query_params), + "instance": cls.build_q_for_instance_filter(query_params), } - - def join_instance_by_q(instances: str) -> Q: - insts = instances.split(",") - filter_inst = reduce( - operator.or_, [Q(machine__ip=inst.split(":")[0], port=inst.split(":")[1]) for inst in insts] - ) - return filter_inst - - # 判断是否需要实例过滤 - if query_params.get("instance"): - filter_params_map.update({"instance": join_instance_by_q(query_params.get("instance"))}) - filter_params_map = filter_params_map or {} filter_params_map.update(inner_filter_params_map) # 通过基础过滤参数进行instance过滤 diff --git a/dbm-ui/backend/db_services/dbbase/resources/serializers.py b/dbm-ui/backend/db_services/dbbase/resources/serializers.py index 2f0f35a45c..5e94f74887 100644 --- a/dbm-ui/backend/db_services/dbbase/resources/serializers.py +++ b/dbm-ui/backend/db_services/dbbase/resources/serializers.py @@ -65,22 +65,29 @@ class InstanceAddressSerializer(serializers.Serializer): port = serializers.CharField(help_text=_("端口"), required=False) def to_internal_value(self, data): + + all_ports_valid = True + """获取根据address获取ip和port,优先考虑从address获取""" if "instance_address" not in data: return data instance_address = data["instance_address"] - if IP_PORT_DIVIDER not in instance_address: - data["ip"] = instance_address or data.get("ip", "") - return data - - ip, port = instance_address.split(IP_PORT_DIVIDER, maxsplit=1) - data["ip"] = ip - try: - data["port"] = int(port) - except ValueError: - # 非法端口,不进行查询过滤 + # 用于分隔IP地址和端口号的部分 + parts = instance_address.split(",") + for part in parts: + if IP_PORT_DIVIDER in part: + # 存在端口号,进行验证 + ip, port = part.split(IP_PORT_DIVIDER, maxsplit=1) + if not port.isdigit(): + # 非法端口 + all_ports_valid = False + break + + if not all_ports_valid: pass + # 如果所有端口都有效,则将instance_address保存到data字典 + data = {"instance": instance_address} return data diff --git a/dbm-ui/backend/db_services/dbbase/resources/viewsets.py b/dbm-ui/backend/db_services/dbbase/resources/viewsets.py index 2a4acd95d2..21e4cce102 100644 --- a/dbm-ui/backend/db_services/dbbase/resources/viewsets.py +++ b/dbm-ui/backend/db_services/dbbase/resources/viewsets.py @@ -100,9 +100,7 @@ def retrieve_instance(self, request, bk_biz_id: int): """查询实例详情""" query_params = self.params_validate(self.retrieve_instances_slz) return Response( - self.query_class.retrieve_instance( - bk_biz_id, query_params.get("cluster_id"), query_params["ip"], query_params["port"] - ) + self.query_class.retrieve_instance(bk_biz_id, query_params.get("cluster_id"), query_params["instance"]) ) @action(methods=["GET"], detail=False, url_path="list_machines") diff --git a/dbm-ui/backend/db_services/dbbase/views.py b/dbm-ui/backend/db_services/dbbase/views.py index 67821e7e35..19f5788566 100644 --- a/dbm-ui/backend/db_services/dbbase/views.py +++ b/dbm-ui/backend/db_services/dbbase/views.py @@ -187,7 +187,7 @@ def query_biz_cluster_attrs(self, request, *args, **kwargs): if db_modules: db_module_names_map = {module.db_module_id: module.db_module_name for module in db_modules} cluster_attrs["db_module_id"] = [ - {"value": module, "text": db_module_names_map.get(module)} + {"value": module, "text": db_module_names_map.get(module, "--")} for module in existing_values["db_module_id"] ] else: diff --git a/dbm-ui/backend/db_services/meta_import/serializers.py b/dbm-ui/backend/db_services/meta_import/serializers.py index 097336e581..ba0d37534c 100644 --- a/dbm-ui/backend/db_services/meta_import/serializers.py +++ b/dbm-ui/backend/db_services/meta_import/serializers.py @@ -108,3 +108,23 @@ class TenDBClusterAppendCTLSerializer(serializers.Serializer): def validate(self, attrs): return attrs + + +class TenDBSingleMetadataImportSerializer(serializers.Serializer): + bk_biz_id = BizChoiceField(help_text=_("业务")) + file = serializers.FileField(help_text=_("元数据json文件")) + db_module_id = MetadataImportDBModuleField(help_text=_("模块ID"), cluster_type=ClusterType.TenDBSingle.value) + storage_spec_id = MetadataImportSpecField( + help_text=_("存储机规格ID"), cluster_type=ClusterType.TenDBSingle.value, machine_type=MachineType.SINGLE.value + ) + + def validate(self, attrs): + return attrs + + +class TenDBSingleStandardizeSerializer(serializers.Serializer): + bk_biz_id = BizChoiceField(help_text=_("业务ID")) + file = serializers.FileField(help_text=_("域名列表文件")) + + def validate(self, attrs): + return attrs diff --git a/dbm-ui/backend/db_services/meta_import/views.py b/dbm-ui/backend/db_services/meta_import/views.py index 2ab553d473..7ae32b2171 100644 --- a/dbm-ui/backend/db_services/meta_import/views.py +++ b/dbm-ui/backend/db_services/meta_import/views.py @@ -30,6 +30,8 @@ TenDBClusterStandardizeSerializer, TenDBHAMetadataImportSerializer, TenDBHAStandardizeSerializer, + TenDBSingleMetadataImportSerializer, + TenDBSingleStandardizeSerializer, ) from backend.iam_app.handlers.drf_perm.base import RejectPermission from backend.ticket.builders.mysql.mysql_ha_metadata_import import TenDBHAMetadataImportDetailSerializer @@ -37,6 +39,8 @@ from backend.ticket.builders.spider.metadata_import import TenDBClusterMetadataImportDetailSerializer from backend.ticket.builders.spider.mysql_spider_standardize import TenDBClusterStandardizeDetailSerializer from backend.ticket.builders.tendbcluster.append_deploy_ctl import TenDBClusterAppendDeployCTLDetailSerializer +from backend.ticket.builders.tendbsingle.metadata_import import TenDBSingleMetadataImportDetailSerializer +from backend.ticket.builders.tendbsingle.standardize import TenDBSingleStandardizeDetailSerializer from backend.ticket.constants import TicketType from backend.ticket.models import Ticket @@ -96,16 +100,16 @@ def tendbha_standardize(self, request, *args, **kwargs): domain_list.append(line.decode("utf-8").strip().rstrip(".")) cluster_ids = list( - Cluster.objects.filter( - bk_biz_id=data["bk_biz_id"], immute_domain__in=domain_list, cluster_type=ClusterType.TenDBHA.value - ).values_list("id", flat=True) + Cluster.objects.filter(immute_domain__in=domain_list, cluster_type=ClusterType.TenDBHA.value).values_list( + "id", flat=True + ) ) logger.info("domains: {}, ids: {}".format(domain_list, cluster_ids)) exists_domains = list( - Cluster.objects.filter( - bk_biz_id=data["bk_biz_id"], immute_domain__in=domain_list, cluster_type=ClusterType.TenDBHA.value - ).values_list("immute_domain", flat=True) + Cluster.objects.filter(immute_domain__in=domain_list, cluster_type=ClusterType.TenDBHA.value).values_list( + "immute_domain", flat=True + ) ) diff = list(set(domain_list) - set(exists_domains)) if diff: @@ -240,3 +244,73 @@ def tendbcluster_append_deploy_ctl(self, request, *args, **kwargs): details=data, ) return Response(data) + + @common_swagger_auto_schema( + operation_summary=_("TenDB Single 元数据导入"), + tags=[SWAGGER_TAG], + ) + @action( + methods=["POST"], + detail=False, + serializer_class=TenDBSingleMetadataImportSerializer, + parser_classes=[MultiPartParser], + ) + def tendbsingle_metadata_import(self, request, *args, **kwargs): + data = self.params_validate(self.get_serializer_class()) + data["json_content"] = json.loads(data.pop("file").read().decode("utf-8")) + TenDBSingleMetadataImportDetailSerializer(data=data).is_valid(raise_exception=True) + Ticket.create_ticket( + ticket_type=TicketType.TENDBSINGLE_METADATA_IMPORT, + creator=request.user.username, + bk_biz_id=data["bk_biz_id"], + remark=self.tendbsingle_metadata_import.__name__, + details=data, + ) + return Response(data) + + @common_swagger_auto_schema( + operation_summary=_("TenDB Single 集群标准化"), + tags=[SWAGGER_TAG], + ) + @action( + methods=["POST"], + detail=False, + serializer_class=TenDBSingleStandardizeSerializer, + parser_classes=[MultiPartParser], + ) + def tendbsingle_standardize(self, request, *args, **kwargs): + data = self.params_validate(self.get_serializer_class()) + + domain_list = [] + for line in data.pop("file").readlines(): + domain_list.append(line.decode("utf-8").strip().rstrip(".")) + + cluster_ids = list( + Cluster.objects.filter( + immute_domain__in=domain_list, cluster_type=ClusterType.TenDBSingle.value + ).values_list("id", flat=True) + ) + logger.info("domains: {}, ids: {}".format(domain_list, cluster_ids)) + + exists_domains = list( + Cluster.objects.filter( + immute_domain__in=domain_list, cluster_type=ClusterType.TenDBSingle.value + ).values_list("immute_domain", flat=True) + ) + diff = list(set(domain_list) - set(exists_domains)) + if diff: + raise serializers.ValidationError(_("cluster {} not found".format(diff))) + + data["cluster_ids"] = cluster_ids + + data["infos"] = {"cluster_ids": data["cluster_ids"]} + + TenDBSingleStandardizeDetailSerializer(data=data).is_valid(raise_exception=True) + Ticket.create_ticket( + ticket_type=TicketType.TENDBSINGLE_STANDARDIZE, + creator=request.user.username, + bk_biz_id=data["bk_biz_id"], + remark=self.tendbsingle_standardize.__name__, + details=data, + ) + return Response(data) diff --git a/dbm-ui/backend/db_services/mysql/sql_import/handlers.py b/dbm-ui/backend/db_services/mysql/sql_import/handlers.py index 13a70bba2c..2415182952 100644 --- a/dbm-ui/backend/db_services/mysql/sql_import/handlers.py +++ b/dbm-ui/backend/db_services/mysql/sql_import/handlers.py @@ -140,7 +140,6 @@ def semantic_check( cluster_ids: List[int], execute_sql_files: List[str], execute_db_infos: List[Dict[str, List]], - highrisk_warnings: Dict, ticket_type: str, ticket_mode: Dict, import_mode: SQLImportMode, @@ -153,7 +152,6 @@ def semantic_check( @param cluster_ids: 集群列表 @param execute_sql_files: 待执行的sql文件名 @param execute_db_infos: 待执行的db匹配模式 - @param highrisk_warnings: 高危信息 @param ticket_type: 单据类型 @param ticket_mode: sql导入单据的触发类型 @param import_mode: sql文件导入类型 @@ -176,7 +174,6 @@ def semantic_check( "cluster_ids": cluster_ids, "execute_sql_files": execute_sql_files, "execute_objects": execute_objects, - "highrisk_warnings": highrisk_warnings, "ticket_mode": ticket_mode, "import_mode": import_mode, "backup": backup, diff --git a/dbm-ui/backend/db_services/mysql/sql_import/serializers.py b/dbm-ui/backend/db_services/mysql/sql_import/serializers.py index 1ef656b892..775b8d8037 100644 --- a/dbm-ui/backend/db_services/mysql/sql_import/serializers.py +++ b/dbm-ui/backend/db_services/mysql/sql_import/serializers.py @@ -91,7 +91,6 @@ class SQLImportBackUpSerializer(serializers.Serializer): cluster_ids = serializers.ListField(help_text=_("集群ID列表"), child=serializers.IntegerField()) execute_sql_files = serializers.ListField(help_text=_("sql执行文件"), child=serializers.CharField()) execute_db_infos = serializers.ListSerializer(help_text=_("sql执行的DB信息"), child=ExecuteDBInfoSerializer()) - highrisk_warnings = serializers.DictField(help_text=_("高危信息提示"), required=False, default="") ticket_type = serializers.ChoiceField(help_text=_("单据类型"), choices=TicketType.get_choices()) ticket_mode = SQLImportModeSerializer() import_mode = serializers.ChoiceField(help_text=_("sql导入模式"), choices=SQLImportMode.get_choices()) diff --git a/dbm-ui/backend/db_services/taskflow/handlers.py b/dbm-ui/backend/db_services/taskflow/handlers.py index 6c9f297914..92bba0c075 100644 --- a/dbm-ui/backend/db_services/taskflow/handlers.py +++ b/dbm-ui/backend/db_services/taskflow/handlers.py @@ -131,7 +131,10 @@ def recurse_activities(current_activities): if "pipeline" in activity: pipeline_activities = activity["pipeline"].get("activities", {}) recurse_activities(pipeline_activities) - if activity.get("status") == StateType.FAILED and activity.get("type") == NodeType.ServiceActivity: + if ( + activity.get("status") == StateType.FAILED + and activity.get("type") == NodeType.ServiceActivity.value + ): node_ids.append(act_id) recurse_activities(activities) diff --git a/dbm-ui/backend/db_services/taskflow/serializers.py b/dbm-ui/backend/db_services/taskflow/serializers.py index 8044b1f99d..e0b6c11bf5 100644 --- a/dbm-ui/backend/db_services/taskflow/serializers.py +++ b/dbm-ui/backend/db_services/taskflow/serializers.py @@ -48,6 +48,10 @@ class NodeSerializer(serializers.Serializer): node_id = serializers.CharField(help_text=_("节点ID")) +class BatchRetryNodesSerializer(serializers.Serializer): + pass + + class CallbackNodeSerializer(NodeSerializer): desc = serializers.CharField(help_text=_("回调描述"), required=False) diff --git a/dbm-ui/backend/db_services/taskflow/views/flow.py b/dbm-ui/backend/db_services/taskflow/views/flow.py index 6de29bb7f8..b52bd51943 100644 --- a/dbm-ui/backend/db_services/taskflow/views/flow.py +++ b/dbm-ui/backend/db_services/taskflow/views/flow.py @@ -21,6 +21,7 @@ from backend.db_services.dbbase.constants import IpSource from backend.db_services.taskflow.handlers import TaskFlowHandler from backend.db_services.taskflow.serializers import ( + BatchRetryNodesSerializer, CallbackNodeSerializer, FlowTaskSerializer, NodeSerializer, @@ -135,9 +136,10 @@ def retry_node(self, requests, *args, **kwargs): @common_swagger_auto_schema( operation_summary=_("批量重试"), + request_body=BatchRetryNodesSerializer(), tags=[SWAGGER_TAG], ) - @action(methods=["POST"], detail=True) + @action(methods=["POST"], detail=True, serializer_class=BatchRetryNodesSerializer) def batch_retry_nodes(self, requests, *args, **kwargs): root_id = kwargs["root_id"] return Response(TaskFlowHandler(root_id=root_id).batch_retry_nodes()) diff --git a/dbm-ui/backend/dbm_init/management/commands/services_init.py b/dbm-ui/backend/dbm_init/management/commands/services_init.py index fac6b0d9db..5b20f77ff5 100644 --- a/dbm-ui/backend/dbm_init/management/commands/services_init.py +++ b/dbm-ui/backend/dbm_init/management/commands/services_init.py @@ -28,9 +28,10 @@ def add_arguments(self, parser): "bkcc", "bkmonitor_alarm", "bkmonitor_channel", + "register_application", + "grafana", "bkjob", "ssl", - "register_application", ], help="all: initialize all services, " "itsm: initialize itsm service, " @@ -64,6 +65,9 @@ def handle(self, *args, **options): if srv_type == "all" or srv_type == "bkmonitor_channel": Services.auto_create_bkmonitor_channel() + if srv_type == "all" or srv_type == "grafana": + Services.auto_init_grafana() + if srv_type == "all" or srv_type == "ssl": Services.auto_create_ssl_service() diff --git a/dbm-ui/backend/dbm_init/services.py b/dbm-ui/backend/dbm_init/services.py index a3449926ae..e9795710d8 100644 --- a/dbm-ui/backend/dbm_init/services.py +++ b/dbm-ui/backend/dbm_init/services.py @@ -15,10 +15,13 @@ import subprocess from bk_notice_sdk.views import api_call +from blueapps.account.models import User from django.conf import settings +from django.http import HttpRequest from django.utils import timezone from backend import env +from backend.bk_dataview.grafana.views import SwitchOrgView from backend.components import BKLogApi, BKMonitorV3Api, CCApi, ItsmApi from backend.components.constants import SSL_KEY from backend.configuration.constants import DBM_REPORT_INITIAL_VALUE, SystemSettingsEnum @@ -434,6 +437,17 @@ def auto_create_bkmonitor_channel() -> bool: return True + @staticmethod + def auto_init_grafana() -> bool: + request = HttpRequest() + user = User.objects.filter(is_superuser=True).first() + if user is None: + return False + request.user = User.objects.filter(is_superuser=True).first() + request.org_name = "dbm" + SwitchOrgView().initial(request) + return True + @staticmethod def auto_create_ssl_service() -> bool: """生成c/s密钥对""" diff --git a/dbm-ui/backend/flow/engine/bamboo/scene/mysql/import_sqlfile_flow.py b/dbm-ui/backend/flow/engine/bamboo/scene/mysql/import_sqlfile_flow.py index 1874ab01fd..441aeec232 100644 --- a/dbm-ui/backend/flow/engine/bamboo/scene/mysql/import_sqlfile_flow.py +++ b/dbm-ui/backend/flow/engine/bamboo/scene/mysql/import_sqlfile_flow.py @@ -24,6 +24,7 @@ from backend.db_meta.enums.instance_role import InstanceRole from backend.db_meta.models import Cluster, StorageInstance from backend.db_services.mysql.sql_import.constants import BKREPO_SQLFILE_PATH +from backend.flow.consts import LONG_JOB_TIMEOUT from backend.flow.engine.bamboo.scene.common.builder import Builder, SubBuilder from backend.flow.engine.bamboo.scene.common.get_file_list import GetFileList from backend.flow.plugins.components.collections.common.create_ticket import CreateTicketComponent @@ -112,6 +113,7 @@ def import_sqlfile_flow(self): act_component_code=ExecuteDBActuatorScriptComponent.code, kwargs=asdict( ExecActuatorKwargs( + job_timeout=LONG_JOB_TIMEOUT, exec_ip=cluster["backend_ip"], bk_cloud_id=cluster["bk_cloud_id"], cluster=cluster, diff --git a/dbm-ui/backend/flow/engine/bamboo/scene/mysql/mysql_checksum.py b/dbm-ui/backend/flow/engine/bamboo/scene/mysql/mysql_checksum.py index 131bb98819..ab4b5df116 100644 --- a/dbm-ui/backend/flow/engine/bamboo/scene/mysql/mysql_checksum.py +++ b/dbm-ui/backend/flow/engine/bamboo/scene/mysql/mysql_checksum.py @@ -20,7 +20,7 @@ from backend.configuration.constants import DBType from backend.constants import IP_PORT_DIVIDER from backend.db_meta.models import Cluster -from backend.flow.consts import ACCOUNT_PREFIX, DBA_SYSTEM_USER +from backend.flow.consts import ACCOUNT_PREFIX, DBA_SYSTEM_USER, LONG_JOB_TIMEOUT from backend.flow.engine.bamboo.scene.common.builder import Builder, SubBuilder from backend.flow.engine.bamboo.scene.common.get_file_list import GetFileList from backend.flow.plugins.components.collections.common.sleep_time_service import SleepTimerComponent @@ -169,6 +169,7 @@ def mysql_checksum_flow(self): act_component_code=ExecuteDBActuatorScriptComponent.code, kwargs=asdict( ExecActuatorKwargs( + job_timeout=LONG_JOB_TIMEOUT, exec_ip=info["master"]["ip"], bk_cloud_id=bk_cloud_id, run_as_system_user=DBA_SYSTEM_USER, diff --git a/dbm-ui/backend/flow/engine/bamboo/scene/mysql/mysql_flashback_flow.py b/dbm-ui/backend/flow/engine/bamboo/scene/mysql/mysql_flashback_flow.py index 314bdd3d12..6b7f0e6497 100644 --- a/dbm-ui/backend/flow/engine/bamboo/scene/mysql/mysql_flashback_flow.py +++ b/dbm-ui/backend/flow/engine/bamboo/scene/mysql/mysql_flashback_flow.py @@ -18,7 +18,7 @@ from backend.configuration.constants import DBType from backend.db_meta.enums import InstanceInnerRole from backend.db_meta.models import Cluster -from backend.flow.consts import TruncateDataTypeEnum +from backend.flow.consts import LONG_JOB_TIMEOUT, TruncateDataTypeEnum from backend.flow.engine.bamboo.scene.common.builder import Builder, SubBuilder from backend.flow.engine.bamboo.scene.common.get_file_list import GetFileList from backend.flow.plugins.components.collections.mysql.exec_actuator_script import ExecuteDBActuatorScriptComponent @@ -111,6 +111,7 @@ def mysql_flashback_flow(self): act_component_code=ExecuteDBActuatorScriptComponent.code, kwargs=asdict( ExecActuatorKwargs( + job_timeout=LONG_JOB_TIMEOUT, exec_ip=master.machine.ip, bk_cloud_id=cluster_class.bk_cloud_id, cluster=cluster, diff --git a/dbm-ui/backend/flow/engine/bamboo/scene/mysql/mysql_ha_full_backup_flow.py b/dbm-ui/backend/flow/engine/bamboo/scene/mysql/mysql_ha_full_backup_flow.py index d997f4f7c1..24df2cd91b 100644 --- a/dbm-ui/backend/flow/engine/bamboo/scene/mysql/mysql_ha_full_backup_flow.py +++ b/dbm-ui/backend/flow/engine/bamboo/scene/mysql/mysql_ha_full_backup_flow.py @@ -20,7 +20,7 @@ from backend.db_meta.enums import ClusterType, InstanceInnerRole from backend.db_meta.exceptions import ClusterNotExistException, DBMetaBaseException from backend.db_meta.models import Cluster -from backend.flow.consts import DBA_SYSTEM_USER +from backend.flow.consts import DBA_SYSTEM_USER, LONG_JOB_TIMEOUT from backend.flow.engine.bamboo.scene.common.builder import Builder, SubBuilder from backend.flow.engine.bamboo.scene.common.get_file_list import GetFileList from backend.flow.engine.exceptions import MySQLBackupLocalException @@ -129,6 +129,7 @@ def full_backup_flow(self): act_component_code=ExecuteDBActuatorScriptComponent.code, kwargs=asdict( ExecActuatorKwargs( + job_timeout=LONG_JOB_TIMEOUT, bk_cloud_id=cluster_obj.bk_cloud_id, run_as_system_user=DBA_SYSTEM_USER, exec_ip=backend_obj.machine.ip, diff --git a/dbm-ui/backend/flow/engine/bamboo/scene/mysql/mysql_partition.py b/dbm-ui/backend/flow/engine/bamboo/scene/mysql/mysql_partition.py index aa9c6e7106..0ee7d84fcd 100644 --- a/dbm-ui/backend/flow/engine/bamboo/scene/mysql/mysql_partition.py +++ b/dbm-ui/backend/flow/engine/bamboo/scene/mysql/mysql_partition.py @@ -12,7 +12,7 @@ from backend.db_meta.enums import InstanceRole from backend.db_meta.exceptions import ClusterNotExistException, MasterInstanceNotExistException from backend.db_meta.models import Cluster, StorageInstance -from backend.flow.consts import DBA_ROOT_USER +from backend.flow.consts import DBA_ROOT_USER, LONG_JOB_TIMEOUT from backend.flow.engine.bamboo.scene.common.builder import Builder, SubBuilder from backend.flow.engine.bamboo.scene.common.get_file_list import GetFileList from backend.flow.plugins.components.collections.mysql.exec_actuator_script import ExecuteDBActuatorScriptComponent @@ -137,6 +137,7 @@ def mysql_partition_flow(self): act_component_code=ExecuteDBActuatorScriptComponent.code, kwargs=asdict( ExecActuatorKwargs( + job_timeout=LONG_JOB_TIMEOUT, exec_ip=ip, bk_cloud_id=bk_cloud_id, run_as_system_user=DBA_ROOT_USER, diff --git a/dbm-ui/backend/flow/engine/bamboo/scene/redis/redis_cluster_migrate_load.py b/dbm-ui/backend/flow/engine/bamboo/scene/redis/redis_cluster_migrate_load.py index a532ee125e..eea72d13af 100644 --- a/dbm-ui/backend/flow/engine/bamboo/scene/redis/redis_cluster_migrate_load.py +++ b/dbm-ui/backend/flow/engine/bamboo/scene/redis/redis_cluster_migrate_load.py @@ -19,10 +19,12 @@ from backend.components import DBConfigApi from backend.components.dbconfig.constants import ConfType, FormatType, LevelName from backend.configuration.constants import AffinityEnum, DBType -from backend.db_meta.enums import InstanceRole +from backend.db_meta.api import common +from backend.db_meta.api.cluster.apis import query_cluster_by_hosts +from backend.db_meta.enums import InstanceInnerRole, InstanceRole from backend.db_meta.enums.cluster_type import ClusterType from backend.db_meta.enums.machine_type import MachineType -from backend.db_meta.models import AppCache, Spec +from backend.db_meta.models import AppCache, Spec, StorageInstance from backend.db_services.version.constants import RedisVersion from backend.flow.consts import DEPENDENCIES_PLUGINS, ClusterStatus, InstanceStatus from backend.flow.engine.bamboo.scene.common.builder import Builder, SubBuilder @@ -50,7 +52,7 @@ class RedisClusterMigrateLoadFlow(object): """ - redis清档 + redis cache/ssd集群 迁移元数据 """ def __init__(self, root_id: str, data: Optional[Dict]): @@ -169,7 +171,7 @@ def redis_cluster_migrate_load_flow(self): "db_version": params["clusterinfo"]["db_version"], } - if ins_status == InstanceStatus.RUNNING: + if ins_status == InstanceStatus.RUNNING and not self.data["migrate_ctl"]["meta"]: acts_list = [] for redis_ip in cluster["master_ips"] + cluster["slave_ips"]: act_kwargs.cluster["meta_update_ip"] = redis_ip @@ -203,6 +205,9 @@ def redis_cluster_migrate_load_flow(self): ) continue + if not self.data["migrate_ctl"]["meta"]: + continue + sub_pipeline.add_act( act_name=_("初始化配置"), act_component_code=GetRedisActPayloadComponent.code, kwargs=asdict(act_kwargs) ) @@ -534,3 +539,368 @@ def redis_cluster_migrate_load_flow(self): ) redis_pipeline.add_parallel_sub_pipeline(sub_flow_list=sub_pipelines) redis_pipeline.run_pipeline() + + +class RedisInsMigrateLoadFlow(object): + """ + redis 单实例 迁移元数据 + """ + + def __init__(self, root_id: str, data: Optional[Dict]): + """ + @param root_id : 任务流程定义的root_id + @param data : 单据传递过来的参数列表,是dict格式 + """ + self.root_id = root_id + self.data = data + + def __get_old_ins_info(self, ip: str) -> dict: + """ + 获取ip相关的老实例信息 + ports/slave_ip/db_version + """ + ports = [] + slave_ip = "" + db_version = "" + clusters = query_cluster_by_hosts([ip]) + if len(clusters) != 0: + ports = clusters[0]["ports"] + db_version = clusters[0]["major_version"] + + storages = [{"ip": ip, "port": ports[0]}] + storage_objs = common.filter_out_instance_obj(storages, StorageInstance.objects.all()) + slave_objs = storage_objs.get(instance_inner_role=InstanceInnerRole.MASTER).as_ejector.get().receiver + slave_ip = slave_objs.machine.ip + return { + "ports": ports, + "slave_ip": slave_ip, + "db_version": db_version, + } + + def __dispose_cluster_params(self, cluster_info: dict, ignore_check: bool = False) -> dict: + """ + 处理参数 + 返回需要的处理后的数据格式 + """ + + master_ip_list = [] + old_ports_dict = defaultdict(list) # ip对应历史已安装端口 + new_ports_dict = defaultdict(list) # ip对应需要新安装端口 + db_version_dict = {} # ip对应的版本 + spec_id_dict = {} # 机器对应规格 + repl_dict = {} # ip主从复制关系 + ip_install_dict = defaultdict(list) + + for ins in cluster_info["tendis_instance"]: + master_ip = ins["backends"]["master"]["ip"] + slave_ip = ins["backends"]["slave"]["ip"] + port = ins["backends"]["master"]["port"] + spec_id = ins["backends"]["master"]["spec_id"] + db_version = ins["clusterinfo"]["db_version"] + + if master_ip not in master_ip_list: + master_ip_list.append(master_ip) + repl_dict[master_ip] = slave_ip + spec_id_dict[master_ip] = spec_id + db_version_dict[master_ip] = db_version + + machine_old_info = self.__get_old_ins_info(master_ip) + if len(machine_old_info["ports"]): + old_ports_dict[master_ip] = machine_old_info["ports"] + if not ignore_check: + if machine_old_info["slave_ip"] != slave_ip: + raise Exception(master_ip + " old slave is: " + machine_old_info["slave_ip"]) + if machine_old_info["db_version"] != db_version: + raise Exception(master_ip + " old db_version is: " + machine_old_info["db_version"]) + if not ignore_check: + if db_version != db_version_dict[master_ip]: + raise Exception(master_ip + " have more db_version") + if slave_ip != repl_dict[master_ip]: + raise Exception("master have more slave") + if port in new_ports_dict[master_ip]: + raise Exception(master_ip + " port have conflict: " + str(port)) + if port in old_ports_dict[master_ip]: + raise Exception(master_ip + " port is exists: " + str(port)) + new_ports_dict[master_ip].append(port) + ip_install_dict[master_ip].append(ins) + + return { + "master_ip_list": master_ip_list, + "new_ports_dict": dict(new_ports_dict), + "spec_id_dict": spec_id_dict, + "db_version_dict": db_version_dict, + "old_ports_dict": dict(old_ports_dict), + "repl_dict": repl_dict, + "ip_install_dict": dict(ip_install_dict), + } + + def redis_ins_migrate_load_flow(self): + redis_pipeline = Builder(root_id=self.root_id, data=self.data) + act_kwargs = ActKwargs() + act_kwargs.set_trans_data_dataclass = CommonContext.__name__ + act_kwargs.is_update_trans_data = True + act_kwargs.bk_cloud_id = self.data["bk_cloud_id"] + ins_status = InstanceStatus.UNAVAILABLE + ignore_check = True + if self.data["migrate_ctl"]["meta"]: + ignore_check = False + if self.data["migrate_ctl"]["dbha"]: + ins_status = InstanceStatus.RUNNING + info = self.__dispose_cluster_params(self.data, ignore_check) + sub_pipelines = [] + for master_ip in info["ip_install_dict"]: + old_ports = info["old_ports_dict"][master_ip] + db_version = info["db_version_dict"][master_ip] + slave_ip = info["repl_dict"][master_ip] + all_ip = [master_ip, slave_ip] + spec_id = info["spec_id_dict"][master_ip] + + act_kwargs.cluster["db_version"] = db_version + act_kwargs.cluster["cluster_type"] = ClusterType.TendisRedisInstance.value + sub_pipeline = SubBuilder(root_id=self.root_id, data=self.data) + + if ins_status == InstanceStatus.RUNNING and not self.data["migrate_ctl"]["meta"]: + acts_list = [] + for redis_ip in all_ip: + act_kwargs.cluster["meta_update_ip"] = redis_ip + act_kwargs.cluster["meta_update_ports"] = info["new_ports_dict"][master_ip] + act_kwargs.cluster["meta_update_status"] = InstanceStatus.RUNNING + act_kwargs.cluster["meta_func_name"] = RedisDBMeta.instances_status_update.__name__ + acts_list.append( + { + "act_name": _("{}-更新redis状态".format(redis_ip)), + "act_component_code": RedisDBMetaComponent.code, + "kwargs": asdict(act_kwargs), + }, + ) + sub_pipeline.add_parallel_acts(acts_list) + sub_pipelines.append(sub_pipeline.build_sub_process(sub_name=_("{}更新状态子任务").format(master_ip))) + continue + + if not self.data["migrate_ctl"]["meta"]: + continue + + # 初始化配置 + sub_pipeline.add_act( + act_name=_("初始化配置"), act_component_code=GetRedisActPayloadComponent.code, kwargs=asdict(act_kwargs) + ) + + # 下发介质包 + trans_files = GetFileList(db_type=DBType.Redis) + act_kwargs.file_list = trans_files.redis_cluster_apply_backend(db_version) + act_kwargs.exec_ip = all_ip + sub_pipeline.add_act( + act_name=_("Redis-{}-下发介质包").format(all_ip), + act_component_code=TransFileComponent.code, + kwargs=asdict(act_kwargs), + ) + + if len(old_ports) == 0: + "如果之前没有安装过实例,则需要做初始化和安装工具操作" + act_kwargs.get_redis_payload_func = RedisActPayload.get_sys_init_payload.__name__ + sub_pipeline.add_act( + act_name=_("Redis-{}-初始化机器").format(all_ip), + act_component_code=ExecuteDBActuatorScriptComponent.code, + kwargs=asdict(act_kwargs), + ) + + acts_list = [] + acts_list.append( + { + "act_name": _("Redis-{}-安装backup-client工具").format(all_ip), + "act_component_code": DownloadBackupClientComponent.code, + "kwargs": asdict( + DownloadBackupClientKwargs( + bk_cloud_id=self.data["bk_cloud_id"], + bk_biz_id=int(self.data["bk_biz_id"]), + download_host_list=all_ip, + ), + ), + } + ) + for plugin_name in DEPENDENCIES_PLUGINS: + acts_list.append( + { + "act_name": _("安装[{}]插件".format(plugin_name)), + "act_component_code": InstallNodemanPluginServiceComponent.code, + "kwargs": asdict( + InstallNodemanPluginKwargs( + bk_cloud_id=int(self.data["bk_cloud_id"]), ips=all_ip, plugin_name=plugin_name + ) + ), + } + ) + sub_pipeline.add_parallel_acts(acts_list=acts_list) + + # 写入元数据 + act_kwargs.cluster["spec_id"] = spec_id + act_kwargs.cluster["spec_config"] = Spec.objects.get(spec_id=spec_id).get_spec_info() + act_kwargs.cluster["ports"] = info["new_ports_dict"][master_ip] + act_kwargs.cluster["meta_func_name"] = RedisDBMeta.redis_install_append.__name__ + act_kwargs.cluster["master_ip"] = master_ip + act_kwargs.cluster["slave_ip"] = slave_ip + act_kwargs.cluster["ins_status"] = ins_status + sub_pipeline.add_act( + act_name=_("Redis-{}-写入元数据").format(master_ip), + act_component_code=RedisDBMetaComponent.code, + kwargs=asdict(act_kwargs), + ) + # 建立主从元数据 + replica_pairs = [] + for ins in info["ip_install_dict"][master_ip]: + replica_pairs.append( + { + "master_ip": master_ip, + "master_port": ins["backends"]["master"]["port"], + "master_auth": ins["config"]["requirepass"], + "slave_ip": info["repl_dict"][master_ip], + "slave_port": ins["backends"]["slave"]["port"], + "slave_password": ins["config"]["requirepass"], + } + ) + act_kwargs.cluster = { + "bacth_pairs": replica_pairs, + "created_by": self.data["created_by"], + "meta_func_name": RedisDBMeta.replicaof_ins.__name__, + } + sub_pipeline.add_act( + act_name=_("redis建立主从 元数据"), act_component_code=RedisDBMetaComponent.code, kwargs=asdict(act_kwargs) + ) + + # 主从集群元数据 + acts_list = [] + for ins in info["ip_install_dict"][master_ip]: + act_kwargs.cluster = { + "bk_biz_id": self.data["bk_biz_id"], + "bk_cloud_id": self.data["bk_cloud_id"], + "cluster_name": ins["clusterinfo"]["name"], + "cluster_alias": ins["clusterinfo"]["alias"], + "db_version": ins["clusterinfo"]["db_version"], + "immute_domain": ins["clusterinfo"]["immute_domain"], + "master_ip": master_ip, + "slave_ip": slave_ip, + "port": ins["backends"]["master"]["port"], + "created_by": self.data["created_by"], + "region": ins.get("city_code", ""), + "meta_func_name": RedisDBMeta.redis_instance.__name__, + "disaster_tolerance_level": self.data.get("disaster_tolerance_level", AffinityEnum.CROS_SUBZONE), + } + acts_list.append( + { + "act_name": _("{}-主从实例集群元数据").format(ins["clusterinfo"]["immute_domain"]), + "act_component_code": RedisDBMetaComponent.code, + "kwargs": asdict(act_kwargs), + }, + ) + sub_pipeline.add_parallel_acts(acts_list=acts_list) + + db_admin = {"db_type": DBType.Redis.value, "users": str.split(self.data["nosqldbas"], ",")} + act_kwargs.cluster = { + "db_admins": [db_admin], + "meta_func_name": RedisDBMeta.update_nosql_dba.__name__, + } + sub_pipeline.add_act( + act_name=_("更新业务NOSQL DBA"), act_component_code=RedisDBMetaComponent.code, kwargs=asdict(act_kwargs) + ) + + # 写config,需要在写集群元数据后面 + acts_list = [] + for ins in info["ip_install_dict"][master_ip]: + act_kwargs.cluster = { + "pwd_conf": { + "redis_pwd": ins["config"].pop("requirepass"), + }, + "conf": ins["config"], + "db_version": ins["clusterinfo"]["db_version"], + "domain_name": ins["clusterinfo"]["immute_domain"], + } + if ( + ins["clusterinfo"]["cluster_type"] == ClusterType.TendisRedisInstance.value + and ins["clusterinfo"]["db_version"] != RedisVersion.Redis20.value + ): + act_kwargs.cluster["conf"]["cluster-enabled"] = ClusterStatus.REDIS_CLUSTER_NO + + act_kwargs.get_redis_payload_func = RedisActPayload.set_redis_config.__name__ + acts_list.append( + { + "act_name": _("{}-回写集群配置[Redis]").format(ins["clusterinfo"]["immute_domain"]), + "act_component_code": RedisConfigComponent.code, + "kwargs": asdict(act_kwargs), + }, + ) + sub_pipeline.add_parallel_acts(acts_list=acts_list) + + # 部署bkdbmon + acts_list = [] + act_kwargs.exec_ip = master_ip + act_kwargs.cluster = { + "ip": master_ip, + } + act_kwargs.get_redis_payload_func = RedisActPayload.bkdbmon_install_list_new.__name__ + acts_list.append( + { + "act_name": _("{}-安装bkdbmon").format(master_ip), + "act_component_code": ExecuteDBActuatorScriptComponent.code, + "kwargs": asdict(act_kwargs), + } + ) + act_kwargs.exec_ip = slave_ip + act_kwargs.cluster = { + "ip": slave_ip, + } + act_kwargs.get_redis_payload_func = RedisActPayload.bkdbmon_install_list_new.__name__ + acts_list.append( + { + "act_name": _("{}-安装bkdbmon").format(slave_ip), + "act_component_code": ExecuteDBActuatorScriptComponent.code, + "kwargs": asdict(act_kwargs), + } + ) + sub_pipeline.add_parallel_acts(acts_list=acts_list) + + # 历史备份记录上报 + upload_backup_sub_pipelines = [] + for ins in info["ip_install_dict"][master_ip]: + upload_backup_sub_pipelines.append( + RedisReuploadOldBackupRecordsAtomJob( + self.root_id, + self.data, + act_kwargs, + { + "bk_biz_id": self.data["bk_biz_id"], + "bk_cloud_id": self.data["bk_cloud_id"], + "server_ip": slave_ip, + "server_ports": ins["backends"]["master"]["port"], + "cluster_domain": ins["clusterinfo"]["immute_domain"], + "cluster_type": ins["clusterinfo"]["cluster_type"], + "meta_role": InstanceRole.REDIS_SLAVE.value, + "server_shards": {}, + }, + ) + ) + sub_pipeline.add_parallel_sub_pipeline(upload_backup_sub_pipelines) + + # clb、北极星需要写元数据 + if len(ins["entry"]["clb"]) != 0: + act_kwargs.cluster = ins["entry"]["clb"] + act_kwargs.cluster["bk_cloud_id"] = self.data["bk_cloud_id"] + act_kwargs.cluster["immute_domain"] = ins["clusterinfo"]["immute_domain"] + act_kwargs.cluster["created_by"] = self.data["created_by"] + act_kwargs.cluster["meta_func_name"] = RedisDBMeta.add_clb_domain.__name__ + sub_pipeline.add_act( + act_name=_("clb元数据写入"), act_component_code=RedisDBMetaComponent.code, kwargs=asdict(act_kwargs) + ) + + if len(ins["entry"]["polairs"]) != 0: + act_kwargs.cluster = ins["entry"]["polairs"] + act_kwargs.cluster["bk_cloud_id"] = self.data["bk_cloud_id"] + act_kwargs.cluster["immute_domain"] = ins["clusterinfo"]["immute_domain"] + act_kwargs.cluster["created_by"] = self.data["created_by"] + act_kwargs.cluster["meta_func_name"] = RedisDBMeta.add_polairs_domain.__name__ + sub_pipeline.add_act( + act_name=_("polairs元数据写入"), act_component_code=RedisDBMetaComponent.code, kwargs=asdict(act_kwargs) + ) + + sub_pipelines.append(sub_pipeline.build_sub_process(sub_name=_("{}迁移子任务").format(master_ip))) + redis_pipeline.add_parallel_sub_pipeline(sub_flow_list=sub_pipelines) + redis_pipeline.run_pipeline() diff --git a/dbm-ui/backend/flow/engine/bamboo/scene/spider/import_sqlfile_flow.py b/dbm-ui/backend/flow/engine/bamboo/scene/spider/import_sqlfile_flow.py index f917bebd5c..81f040bd84 100644 --- a/dbm-ui/backend/flow/engine/bamboo/scene/spider/import_sqlfile_flow.py +++ b/dbm-ui/backend/flow/engine/bamboo/scene/spider/import_sqlfile_flow.py @@ -23,6 +23,7 @@ from backend.db_meta.enums.machine_type import MachineType from backend.db_meta.models import Cluster, ProxyInstance, StorageInstance from backend.db_services.mysql.sql_import.constants import BKREPO_SQLFILE_PATH +from backend.flow.consts import LONG_JOB_TIMEOUT from backend.flow.engine.bamboo.scene.common.builder import Builder, SubBuilder from backend.flow.engine.bamboo.scene.common.get_file_list import GetFileList from backend.flow.plugins.components.collections.common.create_ticket import CreateTicketComponent @@ -115,6 +116,7 @@ def import_sqlfile_flow(self): act_component_code=ExecuteDBActuatorScriptComponent.code, kwargs=asdict( ExecActuatorKwargs( + job_timeout=LONG_JOB_TIMEOUT, exec_ip=ctl_ip, bk_cloud_id=bk_cloud_id, cluster=cluster, diff --git a/dbm-ui/backend/flow/engine/bamboo/scene/spider/spider_cluster_flashback.py b/dbm-ui/backend/flow/engine/bamboo/scene/spider/spider_cluster_flashback.py index d0ba223480..f4e7ccbd6f 100644 --- a/dbm-ui/backend/flow/engine/bamboo/scene/spider/spider_cluster_flashback.py +++ b/dbm-ui/backend/flow/engine/bamboo/scene/spider/spider_cluster_flashback.py @@ -22,7 +22,7 @@ from backend.db_meta.enums import InstanceInnerRole, TenDBClusterSpiderRole from backend.db_meta.exceptions import ClusterNotExistException from backend.db_meta.models import Cluster, StorageInstanceTuple -from backend.flow.consts import TruncateDataTypeEnum +from backend.flow.consts import LONG_JOB_TIMEOUT, TruncateDataTypeEnum from backend.flow.engine.bamboo.scene.common.builder import Builder, SubBuilder from backend.flow.engine.bamboo.scene.common.get_file_list import GetFileList from backend.flow.plugins.components.collections.mysql.exec_actuator_script import ExecuteDBActuatorScriptComponent @@ -174,6 +174,7 @@ def flashback(self): "act_component_code": ExecuteDBActuatorScriptComponent.code, "kwargs": asdict( ExecActuatorKwargs( + job_timeout=LONG_JOB_TIMEOUT, exec_ip=ip, bk_cloud_id=cluster_obj.bk_cloud_id, cluster=port_job, diff --git a/dbm-ui/backend/flow/engine/bamboo/scene/spider/spider_cluster_full_backup.py b/dbm-ui/backend/flow/engine/bamboo/scene/spider/spider_cluster_full_backup.py index 0aae7716fd..2f14aa7240 100644 --- a/dbm-ui/backend/flow/engine/bamboo/scene/spider/spider_cluster_full_backup.py +++ b/dbm-ui/backend/flow/engine/bamboo/scene/spider/spider_cluster_full_backup.py @@ -23,7 +23,7 @@ from backend.db_meta.enums import ClusterType, InstanceInnerRole, TenDBClusterSpiderRole from backend.db_meta.exceptions import ClusterNotExistException from backend.db_meta.models import Cluster, StorageInstanceTuple -from backend.flow.consts import DBA_SYSTEM_USER +from backend.flow.consts import DBA_SYSTEM_USER, LONG_JOB_TIMEOUT from backend.flow.engine.bamboo.scene.common.builder import Builder, SubBuilder, SubProcess from backend.flow.engine.bamboo.scene.common.get_file_list import GetFileList from backend.flow.engine.exceptions import IncompatibleBackupTypeAndLocal, MySQLBackupLocalException @@ -228,6 +228,7 @@ def __backup_on_remote( act_component_code=ExecuteDBActuatorScriptComponent.code, kwargs=asdict( ExecActuatorKwargs( + job_timeout=LONG_JOB_TIMEOUT, bk_cloud_id=bk_cloud_id, run_as_system_user=DBA_SYSTEM_USER, exec_ip=ip, @@ -314,6 +315,7 @@ def backup_on_spider_mnt(self, backup_id: uuid.UUID, cluster_obj: Cluster, spide act_component_code=ExecuteDBActuatorScriptComponent.code, kwargs=asdict( ExecActuatorKwargs( + job_timeout=LONG_JOB_TIMEOUT, bk_cloud_id=cluster_obj.bk_cloud_id, run_as_system_user=DBA_SYSTEM_USER, exec_ip=spider_mnt_ip, diff --git a/dbm-ui/backend/flow/engine/bamboo/scene/spider/spider_partition.py b/dbm-ui/backend/flow/engine/bamboo/scene/spider/spider_partition.py index 7964b7845e..a1bf407e90 100644 --- a/dbm-ui/backend/flow/engine/bamboo/scene/spider/spider_partition.py +++ b/dbm-ui/backend/flow/engine/bamboo/scene/spider/spider_partition.py @@ -9,7 +9,7 @@ from backend.configuration.constants import DBType from backend.core.consts import BK_PKG_INSTALL_PATH -from backend.flow.consts import DBA_ROOT_USER +from backend.flow.consts import DBA_ROOT_USER, LONG_JOB_TIMEOUT from backend.flow.engine.bamboo.scene.common.builder import Builder, SubBuilder from backend.flow.engine.bamboo.scene.common.get_file_list import GetFileList from backend.flow.plugins.components.collections.mysql.exec_actuator_script import ExecuteDBActuatorScriptComponent @@ -151,6 +151,7 @@ def spider_partition_flow(self): run_as_system_user=DBA_ROOT_USER, get_mysql_payload_func=MysqlActPayload.get_partition_payload.__name__, cluster=cluster, + job_timeout=LONG_JOB_TIMEOUT, ) ) actuator_exec_list.append(exec_info) diff --git a/dbm-ui/backend/flow/engine/bamboo/scene/tendbsingle/__init__.py b/dbm-ui/backend/flow/engine/bamboo/scene/tendbsingle/__init__.py new file mode 100644 index 0000000000..aa5085c628 --- /dev/null +++ b/dbm-ui/backend/flow/engine/bamboo/scene/tendbsingle/__init__.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +""" +TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-DB管理系统(BlueKing-BK-DBM) available. +Copyright (C) 2017-2023 THL A29 Limited, a Tencent company. All rights reserved. +Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. +You may obtain a copy of the License at https://opensource.org/licenses/MIT +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on +an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. +""" diff --git a/dbm-ui/backend/flow/engine/bamboo/scene/tendbsingle/metadata_import.py b/dbm-ui/backend/flow/engine/bamboo/scene/tendbsingle/metadata_import.py new file mode 100644 index 0000000000..0293a0a3f5 --- /dev/null +++ b/dbm-ui/backend/flow/engine/bamboo/scene/tendbsingle/metadata_import.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +""" +TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-DB管理系统(BlueKing-BK-DBM) available. +Copyright (C) 2017-2023 THL A29 Limited, a Tencent company. All rights reserved. +Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. +You may obtain a copy of the License at https://opensource.org/licenses/MIT +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on +an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. +""" +import copy +import logging +from typing import Dict, Optional + +from django.utils.translation import ugettext as _ + +from backend.flow.engine.bamboo.scene.common.builder import Builder, SubBuilder +from backend.flow.plugins.components.collections.common.pause import PauseComponent +from backend.flow.plugins.components.collections.mysql.mysql_ha_modify_cluster_phase import ( + MySQLHAModifyClusterPhaseComponent, +) +from backend.flow.plugins.components.collections.tendbsingle.metadata_import import TenDBSingleImportMetadataComponent +from backend.flow.utils.mysql.mysql_context_dataclass import TenDBSingleImportMetadataContext + +logger = logging.getLogger("flow") + + +class TenDBSingleMetadataImportFlow(object): + def __init__(self, root_id: str, data: Optional[Dict]): + self.root_id = root_id + self.data = data + + def import_meta(self): + import_pipe = Builder(root_id=self.root_id, data=self.data) + + import_pipe_sub = SubBuilder(root_id=self.root_id, data=self.data) + + import_pipe_sub.add_act( + act_name=_("写入元数据"), + act_component_code=TenDBSingleImportMetadataComponent.code, + kwargs={**copy.deepcopy(self.data)}, + ) + + import_pipe_sub.add_act(act_name=_("人工确认"), act_component_code=PauseComponent.code, kwargs={}) + + import_pipe_sub.add_act( + act_name=_("修改集群状态"), act_component_code=MySQLHAModifyClusterPhaseComponent.code, kwargs={} + ) + + import_pipe.add_sub_pipeline(sub_flow=import_pipe_sub.build_sub_process(sub_name=_("TenDB Single 元数据导入"))) + + logger.info(_("构建 TenDB Single 元数据导入流程成功")) + import_pipe.run_pipeline(init_trans_data_class=TenDBSingleImportMetadataContext()) diff --git a/dbm-ui/backend/flow/engine/bamboo/scene/tendbsingle/standardize.py b/dbm-ui/backend/flow/engine/bamboo/scene/tendbsingle/standardize.py new file mode 100644 index 0000000000..4f23ca8040 --- /dev/null +++ b/dbm-ui/backend/flow/engine/bamboo/scene/tendbsingle/standardize.py @@ -0,0 +1,242 @@ +# -*- coding: utf-8 -*- +""" +TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-DB管理系统(BlueKing-BK-DBM) available. +Copyright (C) 2017-2023 THL A29 Limited, a Tencent company. All rights reserved. +Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. +You may obtain a copy of the License at https://opensource.org/licenses/MIT +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on +an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. +""" +import copy +import logging +from collections import defaultdict +from dataclasses import asdict +from typing import Dict, List, Optional + +from django.utils.translation import ugettext as _ + +from backend.configuration.constants import DBType +from backend.db_meta.enums import ClusterType +from backend.db_meta.exceptions import DBMetaException +from backend.db_meta.models import Cluster, StorageInstance +from backend.db_package.models import Package +from backend.flow.consts import DBA_ROOT_USER, DEPENDENCIES_PLUGINS, MediumEnum +from backend.flow.engine.bamboo.scene.common.builder import Builder, SubBuilder, SubProcess +from backend.flow.engine.bamboo.scene.common.get_file_list import GetFileList +from backend.flow.plugins.components.collections.common.install_nodeman_plugin import ( + InstallNodemanPluginServiceComponent, +) +from backend.flow.plugins.components.collections.mysql.cluster_standardize_trans_module import ( + ClusterStandardizeTransModuleComponent, +) +from backend.flow.plugins.components.collections.mysql.exec_actuator_script import ExecuteDBActuatorScriptComponent +from backend.flow.plugins.components.collections.mysql.mysql_cluster_instantiate_config import ( + MySQLClusterInstantiateConfigComponent, +) +from backend.flow.plugins.components.collections.mysql.trans_flies import TransFileComponent +from backend.flow.utils.common_act_dataclass import InstallNodemanPluginKwargs +from backend.flow.utils.mysql.mysql_act_dataclass import DownloadMediaKwargs, ExecActuatorKwargs +from backend.flow.utils.mysql.mysql_act_playload import MysqlActPayload + +logger = logging.getLogger("flow") + + +class TenDBSingleStandardizeFlow(object): + def __init__(self, root_id: str, data: Optional[Dict]): + self.root_id = root_id + self.data = data + + def standardize(self): + cluster_ids = self.data["infos"]["cluster_ids"] + bk_biz_id = self.data["bk_biz_id"] + + cluster_objects = Cluster.objects.filter( + pk__in=cluster_ids, bk_biz_id=bk_biz_id, cluster_type=ClusterType.TenDBSingle.value + ) + if cluster_objects.count() != len(cluster_ids): + raise DBMetaException( + message="input {} clusters, but found {}".format(len(cluster_ids), cluster_objects.count()) + ) + + standardize_pipe = Builder( + root_id=self.root_id, + data=self.data, + need_random_pass_cluster_ids=list(set(self.data["infos"]["cluster_ids"])), + ) + standardize_pipe.add_sub_pipeline(self._build_trans_module_sub(clusters=cluster_objects)) + standardize_pipe.add_sub_pipeline(self._build_instantiate_mysql_config_sub(clusters=cluster_objects)) + + storage_ips = {} + ip_group_by_cloud = defaultdict(list) + for cluster_object in cluster_objects: + for ins in cluster_object.storageinstance_set.all(): + ip = ins.machine.ip + bk_cloud_id = ins.machine.bk_cloud_id + storage_ips[ip] = bk_cloud_id + ip_group_by_cloud[bk_cloud_id].append(ip) + + standardize_pipe.add_sub_pipeline(self._trans_file(ips_group=ip_group_by_cloud)) + + standardize_pipe.add_parallel_sub_pipeline( + sub_flow_list=[ + self._build_storage_sub(ips=storage_ips), + ] + ) + logger.info(_("构建TenDBHA集群标准化流程成功")) + standardize_pipe.run_pipeline(is_drop_random_user=True) + + def _trans_file(self, ips_group: Dict) -> SubProcess: + trans_file_pipes = [] + for bk_cloud_id, ips in ips_group.items(): + unique_ips = list(set(ips)) + + cloud_trans_file_pipe = SubBuilder(root_id=self.root_id, data=self.data) + + cloud_trans_file_pipe.add_act( + act_name=_("下发MySQL周边程序介质"), + act_component_code=TransFileComponent.code, + kwargs=asdict( + DownloadMediaKwargs( + bk_cloud_id=bk_cloud_id, + exec_ip=unique_ips, + file_list=GetFileList(db_type=DBType.MySQL).get_mysql_surrounding_apps_package(), + ) + ), + ) + cloud_trans_file_pipe.add_act( + act_name=_("下发db-actuator介质"), + act_component_code=TransFileComponent.code, + kwargs=asdict( + DownloadMediaKwargs( + bk_cloud_id=bk_cloud_id, + exec_ip=unique_ips, + file_list=GetFileList(db_type=DBType.MySQL).get_db_actuator_package(), + ) + ), + ) + + for plugin_name in DEPENDENCIES_PLUGINS: + cloud_trans_file_pipe.add_act( + act_name=_("安装{}插件".format(plugin_name)), + act_component_code=InstallNodemanPluginServiceComponent.code, + kwargs=asdict( + InstallNodemanPluginKwargs(ips=unique_ips, plugin_name=plugin_name, bk_cloud_id=bk_cloud_id) + ), + ) + + trans_file_pipes.append( + cloud_trans_file_pipe.build_sub_process(sub_name=_("cloud {} 下发文件".format(bk_cloud_id))) + ) + + p = SubBuilder(root_id=self.root_id, data=self.data) + p.add_parallel_sub_pipeline(sub_flow_list=trans_file_pipes) + return p.build_sub_process(sub_name=_("下发文件")) + + def _build_trans_module_sub(self, clusters: List[Cluster]) -> SubProcess: + pipes = [] + for cluster in clusters: + cluster_pipe = SubBuilder( + root_id=self.root_id, data={**copy.deepcopy(self.data), "cluster_id": cluster.id} + ) + cluster_pipe.add_act( + act_name=_("模块标准化"), act_component_code=ClusterStandardizeTransModuleComponent.code, kwargs={} + ) + + pipes.append(cluster_pipe.build_sub_process(sub_name=_("{} CC 模块标准化".format(cluster.immute_domain)))) + + p = SubBuilder(root_id=self.root_id, data=self.data) + p.add_parallel_sub_pipeline(sub_flow_list=pipes) + return p.build_sub_process(sub_name=_("CC标准化")) + + def _build_instantiate_mysql_config_sub(self, clusters: List[Cluster]) -> SubProcess: + pipes = [] + for cluster in clusters: + cluster_pipe = SubBuilder( + root_id=self.root_id, data={**copy.deepcopy(self.data), "cluster_id": cluster.id} + ) + cluster_pipe.add_act( + act_name=_("实例化配置"), act_component_code=MySQLClusterInstantiateConfigComponent.code, kwargs={} + ) + pipes.append(cluster_pipe.build_sub_process(sub_name=_("实例化 {} 配置".format(cluster.immute_domain)))) + + p = SubBuilder(root_id=self.root_id, data=self.data) + p.add_parallel_sub_pipeline(sub_flow_list=pipes) + return p.build_sub_process(sub_name=_("实例化集群配置")) + + def _build_storage_sub(self, ips: Dict) -> SubProcess: + pipes = [] + for ip, bk_cloud_id in ips.items(): + single_pipe = SubBuilder(root_id=self.root_id, data=self.data) + + # 同一机器所有集群的 major version 应该是一样的 + major_version = Cluster.objects.filter(storageinstance__machine__ip=ip).first().major_version + mysql_pkg = Package.get_latest_package(version=major_version, pkg_type=MediumEnum.MySQL) + + ports = StorageInstance.objects.filter(machine__ip=ip, bk_biz_id=self.data["bk_biz_id"]).values_list( + "port", flat=True + ) + + single_pipe.add_act( + act_name=_("实例标准化"), + act_component_code=ExecuteDBActuatorScriptComponent.code, + kwargs=asdict( + ExecActuatorKwargs( + exec_ip=ip, + run_as_system_user=DBA_ROOT_USER, + cluster_type=ClusterType.TenDBSingle.value, + cluster={ + "ports": list(ports), + "mysql_pkg": {"name": mysql_pkg.name, "md5": mysql_pkg.md5}, + "version": major_version, + }, + bk_cloud_id=bk_cloud_id, + get_mysql_payload_func=MysqlActPayload.get_standardize_mysql_instance_payload.__name__, + ) + ), + ) + + single_pipe.add_act( + act_name=_("部署mysql-crond"), + act_component_code=ExecuteDBActuatorScriptComponent.code, + kwargs=asdict( + ExecActuatorKwargs( + exec_ip=ip, + bk_cloud_id=bk_cloud_id, + get_mysql_payload_func=MysqlActPayload.get_deploy_mysql_crond_payload.__name__, + cluster_type=ClusterType.TenDBSingle.value, + ) + ), + ) + + single_pipe.add_act( + act_name=_("部署监控程序"), + act_component_code=ExecuteDBActuatorScriptComponent.code, + kwargs=asdict( + ExecActuatorKwargs( + exec_ip=ip, + bk_cloud_id=bk_cloud_id, + get_mysql_payload_func=MysqlActPayload.get_deploy_mysql_monitor_payload.__name__, + cluster_type=ClusterType.TenDBSingle.value, + ) + ), + ) + + single_pipe.add_act( + act_name=_("部署DBA工具箱"), + act_component_code=ExecuteDBActuatorScriptComponent.code, + kwargs=asdict( + ExecActuatorKwargs( + bk_cloud_id=bk_cloud_id, + exec_ip=ip, + get_mysql_payload_func=MysqlActPayload.get_install_dba_toolkit_payload.__name__, + cluster_type=ClusterType.TenDBHA.value, + ) + ), + ) + + pipes.append(single_pipe.build_sub_process(sub_name=_("{} 标准化".format(ip)))) + + p = SubBuilder(root_id=self.root_id, data=self.data) + p.add_parallel_sub_pipeline(sub_flow_list=pipes) + return p.build_sub_process(sub_name=_("存储层标准化")) diff --git a/dbm-ui/backend/flow/engine/controller/redis.py b/dbm-ui/backend/flow/engine/controller/redis.py index d7082b5110..84ba6bd87b 100644 --- a/dbm-ui/backend/flow/engine/controller/redis.py +++ b/dbm-ui/backend/flow/engine/controller/redis.py @@ -19,7 +19,10 @@ ) from backend.flow.engine.bamboo.scene.redis.redis_cluster_maxmemory_set import RedisClusterMaxmemorySetSceneFlow from backend.flow.engine.bamboo.scene.redis.redis_cluster_migrate_compair import RedisClusterMigrateCompairFlow -from backend.flow.engine.bamboo.scene.redis.redis_cluster_migrate_load import RedisClusterMigrateLoadFlow +from backend.flow.engine.bamboo.scene.redis.redis_cluster_migrate_load import ( + RedisClusterMigrateLoadFlow, + RedisInsMigrateLoadFlow, +) from backend.flow.engine.bamboo.scene.redis.redis_cluster_migrate_precheck import RedisClusterMigratePrecheckFlow from backend.flow.engine.bamboo.scene.redis.redis_cluster_open_close import RedisClusterOpenCloseFlow from backend.flow.engine.bamboo.scene.redis.redis_cluster_proxy_version_upgrade import ( @@ -271,11 +274,25 @@ def redis_cluster_migrate_precheck(self): def redis_cluster_migrate_load(self): """ - redis迁移 + redis cache/ssd 迁移 """ flow = RedisClusterMigrateLoadFlow(root_id=self.root_id, data=self.ticket_data) flow.redis_cluster_migrate_load_flow() + def redis_ins_migrate_load(self): + """ + redis 主从迁移 + """ + flow = RedisInsMigrateLoadFlow(root_id=self.root_id, data=self.ticket_data) + flow.redis_ins_migrate_load_flow() + + def redis_origin_cluster_migrate_load(self): + """ + TODO redis cluster 迁移 + """ + # flow = RedisClusterMigrateLoadFlow(root_id=self.root_id, data=self.ticket_data) + # flow.redis_cluster_migrate_load_flow() + def redis_cluster_migrate_compair(self): """ redis迁移后置验证 diff --git a/dbm-ui/backend/flow/engine/controller/tendbsingle.py b/dbm-ui/backend/flow/engine/controller/tendbsingle.py new file mode 100644 index 0000000000..49d256a0b4 --- /dev/null +++ b/dbm-ui/backend/flow/engine/controller/tendbsingle.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +""" +TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-DB管理系统(BlueKing-BK-DBM) available. +Copyright (C) 2017-2023 THL A29 Limited, a Tencent company. All rights reserved. +Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. +You may obtain a copy of the License at https://opensource.org/licenses/MIT +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on +an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. +""" +from backend.flow.engine.bamboo.scene.tendbsingle.metadata_import import TenDBSingleMetadataImportFlow +from backend.flow.engine.bamboo.scene.tendbsingle.standardize import TenDBSingleStandardizeFlow +from backend.flow.engine.controller.base import BaseController + + +class TenDBSingleController(BaseController): + def metadata_import_scene(self): + flow = TenDBSingleMetadataImportFlow(root_id=self.root_id, data=self.ticket_data) + flow.import_meta() + + def standardize_scene(self): + flow = TenDBSingleStandardizeFlow(root_id=self.root_id, data=self.ticket_data) + flow.standardize() diff --git a/dbm-ui/backend/flow/plugins/components/collections/mysql/exec_actuator_script.py b/dbm-ui/backend/flow/plugins/components/collections/mysql/exec_actuator_script.py index 7be43b6e01..9814bacc02 100644 --- a/dbm-ui/backend/flow/plugins/components/collections/mysql/exec_actuator_script.py +++ b/dbm-ui/backend/flow/plugins/components/collections/mysql/exec_actuator_script.py @@ -101,13 +101,20 @@ def _execute(self, data, parent_data) -> bool: db_act_template["node_id"] = node_id db_act_template["version_id"] = self._runtime_attrs.get("version") db_act_template["uid"] = global_data["uid"] - - # 拼接mysql系统账号固定参数 if "general" in db_act_template["payload"]: db_act_template["payload"]["general"].update( {"runtime_extend": {"mysql_sys_users": get_mysql_sys_users(kwargs["bk_cloud_id"])}} ) + # mycnf_configs 参数很多,放到非敏感参数去处理 + db_act_template["non_sensitive_payload"] = "none" + if "extend" in db_act_template["payload"]: + if "mycnf_configs" in db_act_template["payload"]["extend"]: + db_act_template["non_sensitive_payload"] = base64_encode( + json.dumps({"mycnf_configs": db_act_template["payload"]["extend"].get("mycnf_configs", "")}) + ) + del db_act_template["payload"]["extend"]["mycnf_configs"] + # payload参数转换base64格式 db_act_template["payload"] = base64_encode(json.dumps(db_act_template["payload"])) diff --git a/dbm-ui/backend/flow/plugins/components/collections/tendbsingle/__init__.py b/dbm-ui/backend/flow/plugins/components/collections/tendbsingle/__init__.py new file mode 100644 index 0000000000..aa5085c628 --- /dev/null +++ b/dbm-ui/backend/flow/plugins/components/collections/tendbsingle/__init__.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +""" +TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-DB管理系统(BlueKing-BK-DBM) available. +Copyright (C) 2017-2023 THL A29 Limited, a Tencent company. All rights reserved. +Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. +You may obtain a copy of the License at https://opensource.org/licenses/MIT +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on +an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. +""" diff --git a/dbm-ui/backend/flow/plugins/components/collections/tendbsingle/metadata_import.py b/dbm-ui/backend/flow/plugins/components/collections/tendbsingle/metadata_import.py new file mode 100644 index 0000000000..58f30d0796 --- /dev/null +++ b/dbm-ui/backend/flow/plugins/components/collections/tendbsingle/metadata_import.py @@ -0,0 +1,228 @@ +# -*- coding: utf-8 -*- +""" +TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-DB管理系统(BlueKing-BK-DBM) available. +Copyright (C) 2017-2023 THL A29 Limited, a Tencent company. All rights reserved. +Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. +You may obtain a copy of the License at https://opensource.org/licenses/MIT +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on +an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. +""" + +import json +import logging +from typing import Dict + +from django.db import transaction +from django.utils.translation import ugettext as _ +from pipeline.component_framework.component import Component + +from backend.db_meta.enums import ( + AccessLayer, + ClusterEntryRole, + ClusterEntryType, + ClusterPhase, + ClusterStatus, + ClusterType, + InstanceInnerRole, + InstancePhase, + InstanceRole, + InstanceStatus, + MachineType, +) +from backend.db_meta.models import BKCity, Cluster, ClusterEntry, Machine, ProxyInstance, Spec, StorageInstance +from backend.flow.plugins.components.collections.common.base_service import BaseService + +logger = logging.getLogger("celery") + + +def _get_machine_addition_info(ip: str, cluster_json: Dict) -> Dict: + return cluster_json["machine"] + + +def _setup_standby_slave(cluster_json: Dict): + ins = StorageInstance.objects.get( + machine__ip=cluster_json["stand_by_slave"]["ip"], port=cluster_json["stand_by_slave"]["port"] + ) + ins.is_stand_by = True + ins.save(update_fields=["is_stand_by"]) + + +def _create_entries(cluster_json: Dict, cluster_obj: Cluster): + for entry_json in cluster_json["entries"]: + logging.info("entry_json: {}".format(entry_json)) + + if entry_json["entry_role"] == ClusterEntryRole.MASTER_ENTRY.value: + entry_role = ClusterEntryRole.MASTER_ENTRY.value + else: + entry_role = ClusterEntryRole.SLAVE_ENTRY.value + + entry_obj = ClusterEntry.objects.create( + cluster=cluster_obj, + cluster_entry_type=ClusterEntryType.DNS.value, + entry=entry_json["domain"].rstrip("."), + role=entry_role, + ) + for ij in entry_json["instance"]: + qs = ProxyInstance.objects.filter(machine__ip=ij["ip"], port=ij["port"]) + if qs.exists(): + entry_obj.proxyinstance_set.add(*list(qs)) + else: + entry_obj.storageinstance_set.add( + *list(StorageInstance.objects.filter(machine__ip=ij["ip"], port=ij["port"])) + ) + logging.info("create entry_json:{} success".format(entry_json)) + + +class TenDBSingleImportMetadataService(BaseService): + def __init__(self, name=None): + super().__init__(name=name) + self.bk_biz_id = 0 + self.db_module_id = 0 + self.storage_spec: Spec = Spec() + + def _create_cluster( + self, cluster_id: int, name: str, immute_domain: str, version: str, disaster: str, creator: str + ) -> Cluster: + return Cluster.objects.create( + id=cluster_id, + name=name, + bk_biz_id=self.bk_biz_id, + cluster_type=ClusterType.TenDBSingle.value, + db_module_id=self.db_module_id, + immute_domain=immute_domain, + major_version="MySQL-" + ".".join(version.split(".")[:2]), + phase=ClusterPhase.TRANS_STAGE.value, + status=ClusterStatus.NORMAL.value, + bk_cloud_id=0, + disaster_tolerance_level=disaster, + creator=creator, + ) + + def _create_machine(self, ip: str, addition_info: Dict) -> Machine: + cc_info = json.loads(addition_info["CCInfo"]) + bk_city_id = addition_info["CityID"] + + spec_obj = self.storage_spec + + machine, _ = Machine.objects.get_or_create( + ip=ip, + bk_biz_id=self.bk_biz_id, + db_module_id=self.db_module_id, + access_layer=AccessLayer.STORAGE.value, + machine_type=MachineType.SINGLE.value, + cluster_type=ClusterType.TenDBSingle.value, + bk_city=BKCity.objects.get(pk=bk_city_id), + bk_host_id=cc_info["bk_host_id"], + bk_os_name=cc_info["bk_os_name"], + bk_idc_area=cc_info["bk_idc_area"], + bk_idc_area_id=cc_info["bk_idc_area_id"], + bk_sub_zone=cc_info["sub_zone"], + bk_sub_zone_id=cc_info["sub_zone_id"], + bk_rack=cc_info["rack"], + bk_rack_id=cc_info["rack_id"], + bk_svr_device_cls_name=cc_info["bk_svr_device_cls_name"], + bk_idc_name=cc_info["idc_name"], + bk_idc_id=cc_info["idc_id"], + bk_cloud_id=0, + net_device_id=cc_info["net_device_id"], + spec_id=spec_obj.spec_id, + spec_config=spec_obj.get_spec_info(), + ) + return machine + + def __create_storage_instance( + self, machine: Machine, port: int, inner_role: InstanceInnerRole, version: str + ) -> StorageInstance: + if inner_role == InstanceInnerRole.MASTER: + role = InstanceRole.BACKEND_MASTER + else: + role = InstanceRole.BACKEND_SLAVE + + return StorageInstance.objects.create( + version=version, + port=port, + machine=machine, + db_module_id=self.db_module_id, + bk_biz_id=self.bk_biz_id, + access_layer=machine.access_layer, + machine_type=machine.machine_type, + instance_role=role, + instance_inner_role=inner_role, + cluster_type=machine.cluster_type, + status=InstanceStatus.RUNNING.value, + phase=InstancePhase.TRANS_STAGE.value, + ) + + def _create_instance(self, cluster_json: Dict) -> StorageInstance: + ip = cluster_json["storage"]["ip"] + port = cluster_json["storage"]["port"] + version = cluster_json["storage"]["Version"] + + addition_info = _get_machine_addition_info(ip=ip, cluster_json=cluster_json) + + machine = self._create_machine(ip=ip, addition_info=addition_info) + + return StorageInstance.objects.create( + version=version, + port=port, + machine=machine, + db_module_id=self.db_module_id, + bk_biz_id=self.bk_biz_id, + access_layer=machine.access_layer, + machine_type=machine.machine_type, + instance_role=InstanceRole.ORPHAN.value, + instance_inner_role=InstanceInnerRole.ORPHAN.value, + cluster_type=machine.cluster_type, + status=InstanceStatus.RUNNING.value, + phase=InstancePhase.TRANS_STAGE.value, + ) + + @transaction.atomic + def _execute(self, data, parent_data): + kwargs = data.get_one_of_inputs("kwargs") + trans_data = data.get_one_of_inputs("trans_data") + global_data = data.get_one_of_inputs("global_data") + + self.log_info(_("[{}] get trans_data: {}".format(kwargs["node_name"], trans_data))) + + self.bk_biz_id = global_data["bk_biz_id"] + self.db_module_id = global_data["db_module_id"] + storage_spec_id = global_data["storage_spec_id"] + + self.storage_spec = Spec.objects.get(pk=storage_spec_id) + + json_content = global_data["json_content"] + + cluster_ids = [] + for cluster_json in json_content: + cluster_obj = self._create_cluster( + cluster_id=cluster_json["cluster_id"], + name=cluster_json["name"], + immute_domain=cluster_json["immute_domain"].rstrip("."), + version=cluster_json["version"], + disaster=cluster_json["disaster_level"], + creator=global_data["created_by"], + ) + + storage_obj = self._create_instance(cluster_json=cluster_json) + cluster_obj.storageinstance_set.add(storage_obj) + cluster_obj.region = storage_obj.machine.bk_city.logical_city.name + cluster_obj.save(update_fields=["region"]) + + _create_entries(cluster_json=cluster_json, cluster_obj=cluster_obj) + + cluster_ids.append(cluster_obj.id) + + self.log_info(_("[{}] cluster ids = {}".format(kwargs["node_name"], cluster_ids))) + + trans_data.cluster_ids = cluster_ids + data.outputs["trans_data"] = trans_data + self.log_info(_("[{}] 元数据写入完成".format(kwargs["node_name"]))) + return True + + +class TenDBSingleImportMetadataComponent(Component): + name = __name__ + code = "tendbsingle_import_metadata" + bound_service = TenDBSingleImportMetadataService diff --git a/dbm-ui/backend/flow/utils/mysql/mysql_context_dataclass.py b/dbm-ui/backend/flow/utils/mysql/mysql_context_dataclass.py index 149212e8e1..a6564c9b9d 100644 --- a/dbm-ui/backend/flow/utils/mysql/mysql_context_dataclass.py +++ b/dbm-ui/backend/flow/utils/mysql/mysql_context_dataclass.py @@ -326,3 +326,8 @@ class MySQLHAImportMetadataContext: @dataclass() class TenDBClusterImportMetadataContext: cluster_ids: List = None + + +@dataclass() +class TenDBSingleImportMetadataContext: + cluster_ids: List = None diff --git a/dbm-ui/backend/flow/utils/script_template.py b/dbm-ui/backend/flow/utils/script_template.py index fddb46e96a..563e3e8921 100644 --- a/dbm-ui/backend/flow/utils/script_template.py +++ b/dbm-ui/backend/flow/utils/script_template.py @@ -36,7 +36,7 @@ cd /data/install/dbactuator-{{uid}} chmod +x dbactuator -./dbactuator {{db_type}} {{action}} --uid {{uid}} --root_id {{root_id}} --node_id {{node_id}} --version_id {{version_id}} --payload $1 +./dbactuator {{db_type}} {{action}} --uid {{uid}} --root_id {{root_id}} --node_id {{node_id}} --version_id {{version_id}} -c {{non_sensitive_payload}} --payload $1 """ # noqa # 运行dba_toolkit的命令 diff --git a/dbm-ui/backend/flow/views/migrate_views/redis_migrate.py b/dbm-ui/backend/flow/views/migrate_views/redis_migrate.py index 0497cefeff..a4702e72ab 100644 --- a/dbm-ui/backend/flow/views/migrate_views/redis_migrate.py +++ b/dbm-ui/backend/flow/views/migrate_views/redis_migrate.py @@ -14,6 +14,7 @@ from rest_framework.response import Response from backend.bk_web.swagger import common_swagger_auto_schema +from backend.db_meta.enums import ClusterType from backend.flow.engine.controller.redis import RedisController from backend.flow.views.base import MigrateFlowView from backend.utils.basic import generate_root_id @@ -43,7 +44,18 @@ class RedisClusterMigrateLoad(MigrateFlowView): @common_swagger_auto_schema(request_body=serializers.Serializer()) def post(request): root_id = generate_root_id() - RedisController(root_id=root_id, ticket_data=request.data).redis_cluster_migrate_load() + # 主从 + if request.data.get("tendis_instance"): + RedisController(root_id=root_id, ticket_data=request.data).redis_ins_migrate_load() + elif request.data.get("clusters"): + # 原生集群 + if ( + request.data.get("clusters")[0].get("clusterinfo").get("cluster_type") + == ClusterType.TendisPredixyRedisCluster.value + ): + RedisController(root_id=root_id, ticket_data=request.data).redis_origin_cluster_migrate_load() + else: + RedisController(root_id=root_id, ticket_data=request.data).redis_cluster_migrate_load() return Response({"root_id": root_id}) diff --git a/dbm-ui/backend/tests/db_services/mysql/permission/test_account_handler.py b/dbm-ui/backend/tests/db_services/mysql/permission/test_account_handler.py index 5b1443c925..ef1b7f1637 100644 --- a/dbm-ui/backend/tests/db_services/mysql/permission/test_account_handler.py +++ b/dbm-ui/backend/tests/db_services/mysql/permission/test_account_handler.py @@ -49,6 +49,9 @@ class TestAccountHandler: """ @patch("backend.db_services.dbpermission.db_account.handlers.DBPrivManagerApi", DBPrivManagerApiMock) + @patch( + "backend.db_services.dbpermission.db_account.handlers.create_account_signal.send", lambda sender, account: "" + ) def test_create_account(self, query_fixture): account = AccountMeta(**ACCOUNT) data = MySQLAccountHandler(bk_biz_id=1, account_type=AccountType.MYSQL).create_account(account) diff --git a/dbm-ui/backend/tests/db_services/mysql/permission/test_authorize_handler.py b/dbm-ui/backend/tests/db_services/mysql/permission/test_authorize_handler.py index 8fc56de3c8..d3bae9590e 100644 --- a/dbm-ui/backend/tests/db_services/mysql/permission/test_authorize_handler.py +++ b/dbm-ui/backend/tests/db_services/mysql/permission/test_authorize_handler.py @@ -40,12 +40,14 @@ class TestAuthorizeHandler: handler = MySQLAuthorizeHandler(bk_biz_id=constant.BK_BIZ_ID) + @patch("backend.db_services.dbpermission.db_authorize.handlers.DBPrivManagerApi", DBPrivManagerApiMock) @patch("backend.db_services.mysql.permission.authorize.handlers.DBPrivManagerApi", DBPrivManagerApiMock) def test_pre_check_rules(self, query_fixture): authorize = MySQLAuthorizeMeta(**AUTHORIZE_DATA) authorize_result = self.handler.pre_check_rules(authorize) assert authorize_result["pre_check"] is True + @patch("backend.db_services.dbpermission.db_authorize.handlers.DBPrivManagerApi", DBPrivManagerApiMock) @patch("backend.db_services.mysql.permission.authorize.handlers.DBPrivManagerApi", DBPrivManagerApiMock) def test_pre_check_excel_rules(self, query_fixture): data_dict__list = EXCEL_DATA_DICT__LIST diff --git a/dbm-ui/backend/tests/mock_data/components/cc.py b/dbm-ui/backend/tests/mock_data/components/cc.py index f594afa8c0..8fedd7fbbc 100644 --- a/dbm-ui/backend/tests/mock_data/components/cc.py +++ b/dbm-ui/backend/tests/mock_data/components/cc.py @@ -12,6 +12,7 @@ from backend.components import CCApi from backend.tests.mock_data import constant +from backend.tests.mock_data.utils import raw_response MOCK_SEARCH_BUSINESS_RETURN = {"info": [{"bk_biz_id": constant.BK_BIZ_ID, "bk_biz_name": "蓝鲸"}], "count": 1} MOCK_SEARCH_SET_RETURN = {"info": [{"bk_set_id": constant.BK_SET_ID, "bk_set_name": "mock集群"}], "count": 1} @@ -148,11 +149,14 @@ ] -class CCApiMock(CCApi): +class CCApiMock: """ cc的mock接口 """ + class ErrorCode(CCApi.ErrorCode): + pass + search_business_return = copy.deepcopy(MOCK_SEARCH_BUSINESS_RETURN) list_hosts_without_biz_return = copy.deepcopy(MOCK_LIST_HOSTS_WITHOU_BIZ_RETURN) search_set_return = copy.deepcopy(MOCK_SEARCH_SET_RETURN) @@ -235,6 +239,7 @@ def transfer_host_module(*args, **kwargs): return {} @staticmethod + @raw_response def create_biz_custom_field(*args, **kwargs): return {} diff --git a/dbm-ui/backend/tests/mock_data/components/mysql_priv_manager.py b/dbm-ui/backend/tests/mock_data/components/mysql_priv_manager.py index 6f255bb615..57579005c8 100644 --- a/dbm-ui/backend/tests/mock_data/components/mysql_priv_manager.py +++ b/dbm-ui/backend/tests/mock_data/components/mysql_priv_manager.py @@ -99,3 +99,8 @@ def modify_user_password(cls, *args, **kwargs): @raw_response def get_password(cls, *args, **kwargs): return {"items": [{"username": "mysql", "password": "eHh4"}], "count": 0} + + @classmethod + @raw_response + def get_account(cls, *args, **kwargs): + return {"results": [{"user": "mysql", "password": "eHh4"}], "count": 0} diff --git a/dbm-ui/backend/tests/mock_data/db_services/mysql/permission/account.py b/dbm-ui/backend/tests/mock_data/db_services/mysql/permission/account.py index d1fd9c96bb..bf2c9bc2ff 100644 --- a/dbm-ui/backend/tests/mock_data/db_services/mysql/permission/account.py +++ b/dbm-ui/backend/tests/mock_data/db_services/mysql/permission/account.py @@ -22,6 +22,6 @@ VALID_PASSWORD_LIST = ["9uH;2sxkkkk", "8sk9USM,;", "[]8IK<>s0KMXks"] -ACCOUNT = {"user": "admin", "password": "helloworld"} +ACCOUNT = {"user": "mysql", "password": "helloworld"} ACCOUNT_RULE = {"access_db": "datamain"} diff --git a/dbm-ui/backend/tests/mock_data/db_services/mysql/permission/authorize.py b/dbm-ui/backend/tests/mock_data/db_services/mysql/permission/authorize.py index 235fa6eab3..54a38364f4 100644 --- a/dbm-ui/backend/tests/mock_data/db_services/mysql/permission/authorize.py +++ b/dbm-ui/backend/tests/mock_data/db_services/mysql/permission/authorize.py @@ -23,6 +23,7 @@ "access_dbs": ACCESS_DBS, "source_ips": SOURCE_IPS, "target_instances": TARGET_INSTANCES, + "cluster_type": "tendbha", } EXCEL_DATA_DICT__LIST = [ diff --git a/dbm-ui/backend/tests/mock_data/utils.py b/dbm-ui/backend/tests/mock_data/utils.py index fb9bff96f9..1c54a208fe 100644 --- a/dbm-ui/backend/tests/mock_data/utils.py +++ b/dbm-ui/backend/tests/mock_data/utils.py @@ -42,7 +42,7 @@ def raw_response(wrapped, instance, args, kwargs): """根据raw参数来决定是否返回原始的response""" data = wrapped(*args, **kwargs) - raw_resp = {"code": 0, "message": "ok", "data": data} + raw_resp = {"code": 0, "message": "ok", "data": data, "result": True} if kwargs.get("raw", False): return raw_resp diff --git a/dbm-ui/backend/tests/ticket/test_ticket_flow.py b/dbm-ui/backend/tests/ticket/test_ticket_flow.py index 89546dcec8..28dd728100 100644 --- a/dbm-ui/backend/tests/ticket/test_ticket_flow.py +++ b/dbm-ui/backend/tests/ticket/test_ticket_flow.py @@ -25,6 +25,7 @@ from backend.tests.mock_data.components.cc import CCApiMock from backend.tests.mock_data.components.dbconfig import DBConfigApiMock from backend.tests.mock_data.components.itsm import ItsmApiMock +from backend.tests.mock_data.components.sql_import import SQLSimulationApiMock from backend.tests.mock_data.iam_app.permission import PermissionMock from backend.tests.mock_data.ticket.ticket_flow import ( APPLY_RESOURCE_RETURN_DATA, @@ -146,6 +147,7 @@ def test_mysql_single_apply_flow(self, mocked_status, mocked__run, mocked_permis @patch("backend.ticket.flow_manager.itsm.ItsmApi", ItsmApiMock()) @patch("backend.db_services.cmdb.biz.CCApi", CCApiMock()) @patch("backend.db_services.cmdb.biz.Permission", PermissionMock) + @patch("backend.ticket.builders.mysql.mysql_import_sqlfile.SQLSimulationApi", SQLSimulationApiMock) def test_sql_import_flow(self, mocked_status, mocked__run, mocked_permission_classes, query_fixture, db): # 测试流程:start --> itsm --> inner --> end mocked_status.return_value = TicketStatus.SUCCEEDED diff --git a/dbm-ui/backend/ticket/builders/mysql/mysql_ha_standardize.py b/dbm-ui/backend/ticket/builders/mysql/mysql_ha_standardize.py index c742505fd7..6e6e675b91 100644 --- a/dbm-ui/backend/ticket/builders/mysql/mysql_ha_standardize.py +++ b/dbm-ui/backend/ticket/builders/mysql/mysql_ha_standardize.py @@ -29,6 +29,7 @@ class HAStandardizeDetailSerializer(serializers.Serializer): infos = HAStandardizeDetailSerializer(help_text=_("标准化信息")) def validate(self, attrs): + self.__validate_clusters(attrs=attrs) return attrs def __validate_clusters(self, attrs): diff --git a/dbm-ui/backend/ticket/builders/mysql/mysql_import_sqlfile.py b/dbm-ui/backend/ticket/builders/mysql/mysql_import_sqlfile.py index dc152c9ace..2e01e019e6 100644 --- a/dbm-ui/backend/ticket/builders/mysql/mysql_import_sqlfile.py +++ b/dbm-ui/backend/ticket/builders/mysql/mysql_import_sqlfile.py @@ -15,8 +15,8 @@ from rest_framework import serializers from backend import env +from backend.components.sql_import.client import SQLSimulationApi from backend.configuration.constants import DBType -from backend.db_meta.models import Cluster from backend.db_services.mysql.sql_import.constants import SQLExecuteTicketMode from backend.db_services.mysql.sql_import.handlers import SQLHandler from backend.flow.engine.bamboo.engine import BambooEngine @@ -110,18 +110,22 @@ def patch_sqlimport_ticket_detail(cls, ticket, cluster_type): [details.pop(field, None) for field in pop_fields] # 补充集群信息和node_id - cluster_ids = details["cluster_ids"] semantic_node_id = handler.get_node_id_by_component(flow_tree.tree, SemanticCheckComponent.code) - details.update( - semantic_node_id=semantic_node_id, - clusters={cluster.id: cluster.to_dict() for cluster in Cluster.objects.filter(id__in=cluster_ids)}, - ) - + details.update(semantic_node_id=semantic_node_id) ticket.details.update(details) - ticket.save(update_fields=["details"]) + + @classmethod + def patch_sqlfile_grammar_check_info(cls, ticket, cluster_type): + sqlfile_list = list(set([obj["sql_file"] for obj in ticket.details["execute_objects"]])) + check_info = SQLSimulationApi.grammar_check( + params={"path": ticket.details["path"], "files": sqlfile_list, "cluster_type": cluster_type} + ) + ticket.details.update(grammar_check_info=check_info) def patch_ticket_detail(self): self.patch_sqlimport_ticket_detail(ticket=self.ticket, cluster_type=DBType.MySQL) + self.patch_sqlfile_grammar_check_info(ticket=self.ticket, cluster_type=DBType.MySQL) + super().patch_ticket_detail() def init_ticket_flows(self): """ diff --git a/dbm-ui/backend/ticket/builders/tendbcluster/tendb_apply.py b/dbm-ui/backend/ticket/builders/tendbcluster/tendb_apply.py index b5c3f0ade3..f3186366ab 100644 --- a/dbm-ui/backend/ticket/builders/tendbcluster/tendb_apply.py +++ b/dbm-ui/backend/ticket/builders/tendbcluster/tendb_apply.py @@ -101,6 +101,9 @@ def format_ticket_data(self): class TenDBClusterApplyResourceParamBuilder(builders.ResourceApplyParamBuilder): + def format(self): + self.ticket_data["resource_spec"]["spider"]["group_count"] = 2 + def post_callback(self): next_flow = self.ticket.next_flow() nodes = next_flow.details["ticket_data"].pop("nodes") diff --git a/dbm-ui/backend/ticket/builders/tendbcluster/tendb_import_sqlfile.py b/dbm-ui/backend/ticket/builders/tendbcluster/tendb_import_sqlfile.py index 31d88a0a24..b6dc83e9c2 100644 --- a/dbm-ui/backend/ticket/builders/tendbcluster/tendb_import_sqlfile.py +++ b/dbm-ui/backend/ticket/builders/tendbcluster/tendb_import_sqlfile.py @@ -63,7 +63,11 @@ class TenDBClusterSqlImportFlowBuilder(BaseTendbTicketFlowBuilder): editable = False def patch_ticket_detail(self): - MysqlSqlImportFlowBuilder.patch_sqlimport_ticket_detail(ticket=self.ticket, cluster_type=DBType.MySQL) + MysqlSqlImportFlowBuilder.patch_sqlimport_ticket_detail(ticket=self.ticket, cluster_type=DBType.TenDBCluster) + MysqlSqlImportFlowBuilder.patch_sqlfile_grammar_check_info( + ticket=self.ticket, cluster_type=DBType.TenDBCluster + ) + super().patch_ticket_detail() def init_ticket_flows(self): """ diff --git a/dbm-ui/backend/ticket/builders/tendbsingle/__init__.py b/dbm-ui/backend/ticket/builders/tendbsingle/__init__.py new file mode 100644 index 0000000000..aa5085c628 --- /dev/null +++ b/dbm-ui/backend/ticket/builders/tendbsingle/__init__.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +""" +TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-DB管理系统(BlueKing-BK-DBM) available. +Copyright (C) 2017-2023 THL A29 Limited, a Tencent company. All rights reserved. +Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. +You may obtain a copy of the License at https://opensource.org/licenses/MIT +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on +an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. +""" diff --git a/dbm-ui/backend/ticket/builders/tendbsingle/metadata_import.py b/dbm-ui/backend/ticket/builders/tendbsingle/metadata_import.py new file mode 100644 index 0000000000..238662e24e --- /dev/null +++ b/dbm-ui/backend/ticket/builders/tendbsingle/metadata_import.py @@ -0,0 +1,202 @@ +# -*- coding: utf-8 -*- +""" +TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-DB管理系统(BlueKing-BK-DBM) available. +Copyright (C) 2017-2023 THL A29 Limited, a Tencent company. All rights reserved. +Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. +You may obtain a copy of the License at https://opensource.org/licenses/MIT +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on +an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. +""" +import json +import logging + +from django.utils.translation import ugettext_lazy as _ +from rest_framework import serializers + +from backend.components import DBConfigApi +from backend.components.dbconfig import constants as dbconf_const +from backend.db_meta.enums import ClusterType +from backend.db_meta.models import AppCache, DBModule, Spec +from backend.flow.engine.controller.tendbsingle import TenDBSingleController +from backend.ticket import builders +from backend.ticket.builders.mysql.base import BaseMySQLTicketFlowBuilder, MySQLBaseOperateDetailSerializer +from backend.ticket.constants import FlowRetryType, TicketType + +logger = logging.getLogger("root") + + +class TenDBSingleMetadataImportDetailSerializer(MySQLBaseOperateDetailSerializer): + json_content = serializers.JSONField(help_text=_("元数据json内容")) + bk_biz_id = serializers.IntegerField(help_text=_("业务ID")) + db_module_id = serializers.IntegerField(help_text=_("模块ID")) + storage_spec_id = serializers.IntegerField(help_text=_("存储机规格ID")) + + def __init__(self, **kwargs): + super().__init__(**kwargs) + self.__module_version = "" + self.__module_charset = "" + self.__storage_spec = None + + def validate(self, attrs): + self.__validate_bk_biz_id_exists(attrs=attrs) + self.__validate_db_module_id_exists(attrs=attrs) + self.__validate_storage_spec_id_exists(attrs=attrs) + self.__validate_file_content(attrs=attrs) + return attrs + + @staticmethod + def __validate_bk_biz_id_exists(attrs): + bk_biz_id = attrs["bk_biz_id"] + if not AppCache.objects.filter(bk_biz_id=bk_biz_id).exists(): + raise serializers.ValidationError(_("bk_biz_id: {} 不存在".format(bk_biz_id))) + + def __validate_db_module_id_exists(self, attrs): + bk_biz_id = attrs["bk_biz_id"] + db_module_id = attrs["db_module_id"] + if not DBModule.objects.filter(db_module_id=db_module_id, bk_biz_id=bk_biz_id).exists(): + raise serializers.ValidationError(_("db_module_id: {} 不存在".format(db_module_id))) + + db_config = DBConfigApi.query_conf_item( + { + "bk_biz_id": str(bk_biz_id), + "level_name": dbconf_const.LevelName.MODULE, + "level_value": str(db_module_id), + "conf_file": dbconf_const.DEPLOY_FILE_NAME, + "conf_type": dbconf_const.ConfType.DEPLOY, + "namespace": ClusterType.TenDBSingle, + "format": dbconf_const.FormatType.MAP, + } + )["content"] + logger.info("app: {}, db module: {}, db config: {}".format(bk_biz_id, db_module_id, db_config)) + self.__module_version = db_config.get("db_version") + self.__module_charset = db_config.get("charset") + + def __validate_storage_spec_id_exists(self, attrs): + storage_spec_id = attrs["storage_spec_id"] + if not Spec.objects.filter(spec_id=storage_spec_id).exists(): + raise serializers.ValidationError(_("storage_spec_id: {} 不存在".format(storage_spec_id))) + + self.__storage_spec = Spec.objects.get(spec_id=storage_spec_id) + + def __validate_file_content(self, attrs): + for cluster_json in attrs["json_content"]: + self.__validate_cluster_json(cluster_json=cluster_json, attrs=attrs) + + def __validate_cluster_json(self, cluster_json, attrs): + self.__validate_cluster_version_charset(cluster_json=cluster_json, attrs=attrs) + self.__validate_storage_spec_match(cluster_json=cluster_json) + self.__validate_cluster_id(cluster_json=cluster_json) + + def __validate_cluster_version_charset(self, cluster_json, attrs): + db_module_id = attrs["db_module_id"] + + cluster_version = cluster_json["version"] + cluster_charset = cluster_json["charset"] + + # db module 的 version = MySQL-5.7 + # 上报的版本是 5.7.20 + # 这两个字符串有点难搞啊 + trans_cluster_version = "MySQL-{}".format(".".join(cluster_version.split(".")[:2])) + logger.info("{} trans to {}".format(cluster_version, trans_cluster_version)) + + if cluster_charset != self.__module_charset or trans_cluster_version != self.__module_version: + immute_domain = cluster_json["immute_domain"] + raise serializers.ValidationError( + _( + "{} version: {} or charset: {} not match to db module: {}: {}, {}".format( + immute_domain, + cluster_version, + cluster_charset, + db_module_id, + self.__module_version, + self.__module_charset, + ) + ) + ) + + def __validate_storage_spec_match(self, cluster_json): + ip = cluster_json["storage"]["ip"] + if ip != cluster_json["machine"]["IP"]: + raise serializers.ValidationError(_("{} not found in machine part".format(ip))) + + self.__validate_machine_spec_match(machine_json=cluster_json["machine"], spec_obj=self.__storage_spec) + + @staticmethod + def __validate_machine_spec_match(machine_json, spec_obj: Spec): + machine_cpu = machine_json["Cpu"] + machine_mem = machine_json["Mem"] # MB + machine_ip = machine_json["IP"] + + machine_mem /= 1024 # 规格是 GB, 所以转换下 + + machine_disks_json = json.loads(machine_json["Disks"]) + + if not (spec_obj.cpu["min"] <= machine_cpu <= spec_obj.cpu["max"]): + raise serializers.ValidationError( + _("{} cpu={} not match to {}".format(machine_ip, machine_cpu, spec_obj.cpu)) + ) + + # 内存 MB, GB转换时很难保证完全匹配, 所以规格区间需要扩展匹配 + spec_obj.mem["min"] = spec_obj.mem["min"] - 1 if spec_obj.mem["min"] > 1 else 1 + spec_obj.mem["max"] += 1 + logger.info("mem spec expand to {}".format(spec_obj.mem)) + + if not (spec_obj.mem["min"] <= machine_mem <= spec_obj.mem["max"]): + raise serializers.ValidationError( + _("{} mem={}GB not match to {}GB".format(machine_ip, machine_mem, spec_obj.mem)) + ) + + for spec_disk in spec_obj.storage_spec: + spec_mount_point = spec_disk["mount_point"] + spec_size = spec_disk["size"] # GB + spec_type = spec_disk["type"].lower() + + if spec_mount_point in machine_disks_json: + machine_disk_size = machine_disks_json[spec_mount_point]["size"] # GB + machine_disk_type = machine_disks_json[spec_mount_point]["disk_type"].lower() + + if machine_disk_size < spec_size: + raise serializers.ValidationError( + _( + "{} {} size={}GB not match to {}".format( + machine_ip, spec_mount_point, machine_disk_size, spec_disk + ) + ) + ) + + if spec_type != "all" and spec_type != machine_disk_type: + raise serializers.ValidationError( + _( + "{} {} type={} not match to {}".format( + machine_ip, spec_mount_point, machine_disk_type, spec_disk + ) + ) + ) + else: + raise serializers.ValidationError( + _("{} mount point {} not found".format(machine_ip, spec_mount_point)) + ) + + @staticmethod + def __validate_cluster_id(cluster_json): + """ + 集群迁移 tendbha 集群 id 范围验证 + 在 dbm 中 scr tendbha 的 id 空间是 [100w, 200w) + 详情可参考 <> + """ + cluster_id = cluster_json["cluster_id"] + if not 1000000 <= cluster_id < 2000000: + raise serializers.ValidationError(_("{} 超出 scr mysql segment 范围".format(cluster_id))) + + +class TenDBSingleMetadataImportFlowParamBuilder(builders.FlowParamBuilder): + controller = TenDBSingleController.metadata_import_scene + + +@builders.BuilderFactory.register(TicketType.TENDBSINGLE_METADATA_IMPORT) +class TenDBSingleMetadataImportFlowBuilder(BaseMySQLTicketFlowBuilder): + serializer = TenDBSingleMetadataImportDetailSerializer + inner_flow_builder = TenDBSingleMetadataImportFlowParamBuilder + inner_flow_name = _("TenDB Single 元数据导入") + retry_type = FlowRetryType.MANUAL_RETRY diff --git a/dbm-ui/backend/ticket/builders/tendbsingle/standardize.py b/dbm-ui/backend/ticket/builders/tendbsingle/standardize.py new file mode 100644 index 0000000000..f68c977517 --- /dev/null +++ b/dbm-ui/backend/ticket/builders/tendbsingle/standardize.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +""" +TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-DB管理系统(BlueKing-BK-DBM) available. +Copyright (C) 2017-2023 THL A29 Limited, a Tencent company. All rights reserved. +Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License. +You may obtain a copy of the License at https://opensource.org/licenses/MIT +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on +an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the +specific language governing permissions and limitations under the License. +""" +from django.utils.translation import ugettext_lazy as _ +from rest_framework import serializers + +from backend.db_meta.enums import ClusterType +from backend.db_meta.models import AppCache, Cluster +from backend.flow.engine.controller.tendbsingle import TenDBSingleController +from backend.ticket import builders +from backend.ticket.builders.mysql.base import BaseMySQLTicketFlowBuilder, MySQLBaseOperateDetailSerializer +from backend.ticket.constants import FlowRetryType, TicketType + + +class TenDBSingleStandardizeDetailSerializer(MySQLBaseOperateDetailSerializer): + class InnerDetailSerializer(serializers.Serializer): + cluster_ids = serializers.ListField(help_text=_("集群ID列表")) + + bk_biz_id = serializers.IntegerField(help_text=_("业务ID")) + infos = InnerDetailSerializer(help_text=_("标准化信息")) + + def validate(self, attrs): + self.__validate_clusters(attrs=attrs) + return attrs + + @staticmethod + def __validate_clusters(attrs): + app_obj = AppCache.objects.get(bk_biz_id=attrs["bk_biz_id"]) + + for cluster_obj in Cluster.objects.filter(pk__in=attrs["infos"]["cluster_ids"]).all(): + if cluster_obj.bk_biz_id != attrs["bk_biz_id"]: + raise serializers.ValidationError( + _("{} 不是 [{}]{} 的集群".format(cluster_obj.immute_domain, app_obj.bk_biz_id, app_obj.db_app_abbr)) + ) + + if cluster_obj.cluster_type != ClusterType.TenDBSingle.value: + raise serializers.ValidationError( + _("{} 不是 {} 集群".format(cluster_obj.immute_domain, ClusterType.TenDBSingle.value)) + ) + + +class TenDBSingleStandardizeFlowParamBuilder(builders.FlowParamBuilder): + controller = TenDBSingleController.standardize_scene + + +@builders.BuilderFactory.register(TicketType.TENDBSINGLE_STANDARDIZE) +class TenDBSingleStandardizeFlowBuilder(BaseMySQLTicketFlowBuilder): + serializer = TenDBSingleStandardizeDetailSerializer + inner_flow_builder = TenDBSingleStandardizeFlowParamBuilder + inner_flow_name = _("TenDB Single 标准化") + retry_type = FlowRetryType.MANUAL_RETRY diff --git a/dbm-ui/backend/ticket/constants.py b/dbm-ui/backend/ticket/constants.py index f0cc8948c0..aa7d52788f 100644 --- a/dbm-ui/backend/ticket/constants.py +++ b/dbm-ui/backend/ticket/constants.py @@ -223,6 +223,8 @@ def get_db_type_by_ticket(cls, ticket_type): TENDBCLUSTER_STANDARDIZE = TicketEnumField("TENDBCLUSTER_STANDARDIZE", _("TenDB Cluster 集群标准化"), register_iam=False) TENDBCLUSTER_METADATA_IMPORT = TicketEnumField("TENDBCLUSTER_METADATA_IMPORT", _("TenDB Cluster 元数据导入"), register_iam=False) TENDBCLUSTER_APPEND_DEPLOY_CTL = TicketEnumField("TENDBCLUSTER_APPEND_DEPLOY_CTL", _("TenDB Cluster 追加部署中控"), register_iam=False) # noqa + TENDBSINGLE_METADATA_IMPORT = TicketEnumField("TENDBSINGLE_METADATA_IMPORT", _("TenDB Single 元数据导入"), register_iam=False) # noqa + TENDBSINGLE_STANDARDIZE = TicketEnumField("TENDBSINGLE_STANDARDIZE", _("TenDB Single 集群标准化"), register_iam=False) # noqa # Tbinlogdumper TBINLOGDUMPER_INSTALL = TicketEnumField("TBINLOGDUMPER_INSTALL", _("TBINLOGDUMPER 上架"), register_iam=False) diff --git a/dbm-ui/frontend/src/common/regex.ts b/dbm-ui/frontend/src/common/regex.ts index 80c819413b..40568eff0e 100644 --- a/dbm-ui/frontend/src/common/regex.ts +++ b/dbm-ui/frontend/src/common/regex.ts @@ -58,3 +58,8 @@ export const netIp = new RegExp(`^\\d+:${ipv4Regex}$`); * 数据库/表名称限制正则 */ export const dbRegex = /^[a-zA-Z0-9][-_a-zA-Z0-9]*([a-zA-Z0-9]|%)$/; + +/** + * 批量搜索分隔符,支持 中英竖线、中英逗号、中英分号、顿号、制表符、换行符、斜线 + */ +export const batchSplitRegex = /\s*[||,,;;、\t\n/]\s*/g ; diff --git a/dbm-ui/frontend/src/components/app-select/Index.vue b/dbm-ui/frontend/src/components/app-select/Index.vue index 0b674acf35..e1fe38fbe8 100644 --- a/dbm-ui/frontend/src/components/app-select/Index.vue +++ b/dbm-ui/frontend/src/components/app-select/Index.vue @@ -11,8 +11,8 @@ + :resource-id="data.bk_biz_id" + resource-type="biz">
{{ data.name }} (#{{ data.bk_biz_id }})
diff --git a/dbm-ui/frontend/src/components/business-selector/BusinessSelector.vue b/dbm-ui/frontend/src/components/business-selector/BusinessSelector.vue new file mode 100644 index 0000000000..2168dacea5 --- /dev/null +++ b/dbm-ui/frontend/src/components/business-selector/BusinessSelector.vue @@ -0,0 +1,155 @@ + + + + + + + diff --git a/dbm-ui/frontend/src/components/cluster-common/RenderNodeInstance.vue b/dbm-ui/frontend/src/components/cluster-common/RenderNodeInstance.vue index 537a7005c3..713157caf8 100644 --- a/dbm-ui/frontend/src/components/cluster-common/RenderNodeInstance.vue +++ b/dbm-ui/frontend/src/components/cluster-common/RenderNodeInstance.vue @@ -20,10 +20,11 @@ :class="{ 'is-unavailable': item.status === 'unavailable', }"> - - {{ item.ip }} + + {{ item.ip }}:{{ item.port }} - :{{ item.port }} diff --git a/dbm-ui/frontend/src/components/cluster-selector/Index.vue b/dbm-ui/frontend/src/components/cluster-selector/Index.vue index d727ac73a3..6190012c3f 100644 --- a/dbm-ui/frontend/src/components/cluster-selector/Index.vue +++ b/dbm-ui/frontend/src/components/cluster-selector/Index.vue @@ -126,7 +126,7 @@ import TendbhaModel from '@services/model/mysql/tendbha'; import TendbsingleModel from '@services/model/mysql/tendbsingle'; import RedisModel from '@services/model/redis/redis'; - import SpiderModel from '@services/model/spider/spider'; + import SpiderModel from '@services/model/spider/tendbCluster'; import SqlServerHaClusterModel from '@services/model/sqlserver/sqlserver-ha-cluster'; import SqlServerSingleClusterModel from '@services/model/sqlserver/sqlserver-single-cluster'; import { getMongoList } from '@services/source/mongodb'; @@ -162,7 +162,7 @@ disabledRowConfig?: { handler: (data: any) => boolean, tip?: string, - }, + }[], // 自定义列 customColums?: any[], // 结果预览使用的key @@ -213,6 +213,10 @@ [ClusterTypes.TENDBCLUSTER]: { id: ClusterTypes.TENDBCLUSTER, name: t('集群选择'), + disabledRowConfig: [{ + handler: (data: T) => data.isOffline, + tip: t('集群已禁用'), + }], getResourceList: getSpiderList, tableContent: SpiderTable, resultContent: ResultPreview, @@ -220,6 +224,10 @@ [ClusterTypes.REDIS]: { id: ClusterTypes.REDIS, name: t('集群选择'), + disabledRowConfig: [{ + handler: (data: T) => data.isOffline, + tip: t('集群已禁用'), + }], getResourceList: getRedisList, tableContent: RedisTable, resultContent: ResultPreview, @@ -227,6 +235,10 @@ [ClusterTypes.TENDBHA]: { id: ClusterTypes.TENDBHA, name: t('主从集群'), + disabledRowConfig: [{ + handler: (data: T) => data.isOffline, + tip: t('集群已禁用'), + }], getResourceList: getTendbhaList, tableContent: TendbhaTable, resultContent: ResultPreview, @@ -266,6 +278,10 @@ [ClusterTypes.TENDBSINGLE]: { id: ClusterTypes.TENDBSINGLE, name: t('单节点'), + disabledRowConfig: [{ + handler: (data: T) => data.isOffline, + tip: t('集群已禁用'), + }], getResourceList: getTendbsingleList, tableContent: TendbSingleTable, resultContent: ResultPreview, @@ -284,10 +300,18 @@ if (props.tabListConfig) { Object.keys(props.tabListConfig).forEach((type) => { if (props.tabListConfig?.[type]) { + const disabledRowConfigList = tabListMap[type].disabledRowConfig!; + const disabledRowConfigProp = props.tabListConfig?.[type].disabledRowConfig; + if (disabledRowConfigProp) { + // 外部设置了 disabledRowConfig, 需要追加到 disabledRowConfig列表 + disabledRowConfigList.push(...disabledRowConfigProp); + } tabListMap[type] = { ...tabListMap[type], ...props.tabListConfig[type], + disabledRowConfig: disabledRowConfigList, }; + console.log('tabListMap[type]>>>', tabListMap[type]); } }); } diff --git a/dbm-ui/frontend/src/components/cluster-selector/components/common/SearchBar.vue b/dbm-ui/frontend/src/components/cluster-selector/components/common/SearchBar.vue index fe807e6906..1d403b9c65 100644 --- a/dbm-ui/frontend/src/components/cluster-selector/components/common/SearchBar.vue +++ b/dbm-ui/frontend/src/components/cluster-selector/components/common/SearchBar.vue @@ -1,10 +1,11 @@ diff --git a/dbm-ui/frontend/src/components/cluster-selector/components/redis/Index.vue b/dbm-ui/frontend/src/components/cluster-selector/components/redis/Index.vue index a8f8ef470b..f8c25cf845 100644 --- a/dbm-ui/frontend/src/components/cluster-selector/components/redis/Index.vue +++ b/dbm-ui/frontend/src/components/cluster-selector/components/redis/Index.vue @@ -15,9 +15,9 @@ + :search-select-list="searchSelectList" + @search-value-change="handleSearchValueChange" /> @@ -30,12 +30,12 @@ :max-height="528" :pagination="pagination.count < 10 ? false : pagination" remote-pagination + :row-class="getRowClass" row-style="cursor: pointer;" @column-filter="columnFilterChange" @page-limit-change="handleTableLimitChange" @page-value-change="handleTablePageChange" - @refresh="fetchResources" - @row-click.stop.prevent="handleRowClick" /> + @refresh="fetchResources" />