Skip to content

Commit

Permalink
fix(sqlserver): 调整sqlserver性能告警事项 #8542
Browse files Browse the repository at this point in the history
  • Loading branch information
yksitu authored and zhangzhw8 committed Dec 13, 2024
1 parent 3190702 commit c1f3f9b
Show file tree
Hide file tree
Showing 6 changed files with 591 additions and 74 deletions.
4 changes: 4 additions & 0 deletions dbm-services/common/dbha/ha-module/constvar/constant.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,10 @@ const (
DBHAEventRiakSwitchSucc = "dbha_riak_switch_ok"
// DBHAEventMysqlSwitchErr TODO
DBHAEventRiakSwitchErr = "dbha_riak_switch_err"
// DBHAEventSQLserverSwitchSucc TODO
DBHAEventSQLserverSwitchSucc = "dbha_sqlserver_switch_ok"
// DBHAEventSQLserverSwitchErr TODO
DBHAEventSQLserverSwitchErr = "dbha_sqlserver_switch_err"
// DBHAEventDetectRedisAuth TODO
DBHAEventDetectRedisAuth = "dbha_detect_redis_auth_fail"
// DBHAEventDetectSSHAuth TODO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ type SqlserverSwitch struct {
Entry dbutil.BindEntry
}

// GetRole get mysql role type
func (ins *SqlserverSwitch) GetRole() string {
return ins.Role
}

func (ins *SqlserverSwitch) SetStandbySlave(slaves []dbutil.SlaveInfo) {
if len(slaves) > 0 {
//try to found standby slave
Expand Down
6 changes: 6 additions & 0 deletions dbm-services/common/dbha/ha-module/monitor/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@ func GetMonitorInfoBySwitch(ins dbutil.DataBaseSwitch, succ bool) MonitorInfo {
} else {
eventName = constvar.DBHAEventRiakSwitchErr
}
case constvar.SqlserverHA:
if succ {
eventName = constvar.DBHAEventSQLserverSwitchSucc
} else {
eventName = constvar.DBHAEventSQLserverSwitchErr
}
default:
if succ {
eventName = constvar.DBHAEventMysqlSwitchSucc
Expand Down
Loading

0 comments on commit c1f3f9b

Please sign in to comment.