Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sqlserver): 调整sqlserver性能告警事项 #8542 #8588

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading