Skip to content

Commit 53e1c66

Browse files
committed
feat(mongodb): DBHA告警独立出来 #10178
1 parent 37a90d5 commit 53e1c66

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

dbm-services/common/dbha/ha-module/constvar/constant.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,10 @@ const (
376376
DBHAEventSQLserverSwitchSucc = "dbha_sqlserver_switch_ok"
377377
// DBHAEventSQLserverSwitchErr TODO
378378
DBHAEventSQLserverSwitchErr = "dbha_sqlserver_switch_err"
379+
// DBHAEventMongosSwitchSucc TODO
380+
DBHAEventMongosSwitchSucc = "dbha_mongos_switch_succ"
381+
// DBHAEventMongosSwitchErr TODO
382+
DBHAEventMongosSwitchErr = "dbha_mongos_switch_err"
379383
// DBHAEventDetectRedisAuth TODO
380384
DBHAEventDetectRedisAuth = "dbha_detect_redis_auth_fail"
381385
// DBHAEventDetectSSHAuth TODO

dbm-services/common/dbha/ha-module/monitor/monitor.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,12 @@ func GetMonitorInfoBySwitch(ins dbutil.DataBaseSwitch, succ bool) MonitorInfo {
223223
} else {
224224
eventName = constvar.DBHAEventSQLserverSwitchErr
225225
}
226+
case constvar.Mongos:
227+
if succ {
228+
eventName = constvar.DBHAEventMongosSwitchSucc
229+
} else {
230+
eventName = constvar.DBHAEventMongosSwitchErr
231+
}
226232
default:
227233
if succ {
228234
eventName = constvar.DBHAEventMysqlSwitchSucc

0 commit comments

Comments
 (0)