Skip to content

Commit

Permalink
fix(dbm-services): dbha alarm dimension optimize close #8113
Browse files Browse the repository at this point in the history
  • Loading branch information
xjxia authored and zhangzhw8 committed Nov 22, 2024
1 parent 5968e7a commit f36a8e7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const (
// 1040:ER_CON_COUNT_ERROR
// 1044:ER_DBACCESS_DENIED_ERROR
// 1045:ER_ACCESS_DENIED_ERROR
// 1226:ER_USER_LIMIT_REACHED
var IgnoreErrorNumber = []uint16{1040, 1044, 1045}

// MySQLDetectInstance mysql instance detect struct
Expand Down
6 changes: 3 additions & 3 deletions dbm-services/common/dbha/ha-module/monitor/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ func MonitorSend(content string, info MonitorInfo) error {
addDimension := make(map[string]interface{})
if info.MonitorInfoType == constvar.MonitorInfoSwitch {
// switch monitor information dimension add
addDimension["role"] = info.Switch.Role
addDimension["instance_role"] = info.Switch.Role
addDimension["appid"] = info.Switch.Bzid
addDimension["server_ip"] = info.Switch.ServerIp
addDimension["server_port"] = info.Switch.ServerPort
addDimension["status"] = info.Switch.Status
addDimension["cluster"] = info.Switch.Cluster
addDimension["cluster_domain"] = info.Switch.Cluster
addDimension["machine_type"] = info.Switch.MachineType
addDimension["idc"] = info.Switch.IDC
addDimension["double_check_id"] = info.Switch.CheckID
Expand All @@ -133,7 +133,7 @@ func MonitorSend(content string, info MonitorInfo) error {
addDimension["server_ip"] = info.Detect.ServerIp
addDimension["server_port"] = info.Detect.ServerPort
addDimension["status"] = info.Detect.Status
addDimension["cluster"] = info.Detect.Cluster
addDimension["cluster_domain"] = info.Detect.Cluster
addDimension["machine_type"] = info.Detect.MachineType
addDimension["cluster_type"] = info.Detect.ClusterType
} else if info.MonitorInfoType == constvar.MonitorInfoGlobal {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"agg_dimension": [
"cluster_type",
"appid",
"cluster",
"cluster_domain",
"server_ip",
"server_port",
"machine_type"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
"agg_interval": 60,
"agg_dimension": [
"bk_cloud_id",
"cluster",
"cluster_domain",
"idc",
"machine_type",
"role",
"instance_role",
"server_ip",
"server_port",
"status",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
"agg_interval": 60,
"agg_dimension": [
"bk_cloud_id",
"cluster",
"cluster_domain",
"idc",
"machine_type",
"role",
"instance_role",
"server_ip",
"server_port",
"status",
Expand Down

0 comments on commit f36a8e7

Please sign in to comment.