Skip to content

Commit

Permalink
fix bug #469, don't send replication metric when topology galera or g…
Browse files Browse the repository at this point in the history
…rouprep
  • Loading branch information
emmaloubersac authored and svaroqui committed Mar 1, 2023
1 parent 211ef5b commit f833553
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cluster/srv_snd.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (server *ServerMonitor) GetDatabaseMetrics() []graphite.Metric {
replacer := strings.NewReplacer("`", "", "?", "", " ", "_", ".", "-", "(", "-", ")", "-", "/", "_", "<", "-", "'", "-", "\"", "-")
hostname := replacer.Replace(server.Variables["HOSTNAME"])
var metrics []graphite.Metric
if server.IsSlave {
if server.IsSlave && server.GetCluster().GetTopology() != topoMultiMasterWsrep && server.GetCluster().GetTopology() != topoMultiMasterGrouprep {
m := graphite.NewMetric(fmt.Sprintf("mysql.%s.mysql_slave_status_seconds_behind_master", hostname), fmt.Sprintf("%d", server.SlaveStatus.SecondsBehindMaster.Int64), time.Now().Unix())
metrics = append(metrics, m)
metrics = append(metrics, graphite.NewMetric(fmt.Sprintf("mysql.%s.mysql_slave_status_exec_master_log_pos", hostname), fmt.Sprintf("%s", server.SlaveStatus.ExecMasterLogPos.String), time.Now().Unix()))
Expand Down

0 comments on commit f833553

Please sign in to comment.