Skip to content

Commit

Permalink
fix, refer new column name
Browse files Browse the repository at this point in the history
  • Loading branch information
mtanda committed May 15, 2024
1 parent 8b27bd0 commit 1243a11
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions collector/slave_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,13 @@ func (ScrapeSlaveStatus) Scrape(ctx context.Context, db *sql.DB, ch chan<- prome
}

masterUUID := columnValue(scanArgs, slaveCols, "Master_UUID")
if masterUUID == "" {
masterUUID = columnValue(scanArgs, slaveCols, "Source_UUID")
}
masterHost := columnValue(scanArgs, slaveCols, "Master_Host")
if masterHost == "" {
masterHost = columnValue(scanArgs, slaveCols, "Source_Host")
}
channelName := columnValue(scanArgs, slaveCols, "Channel_Name") // MySQL & Percona
connectionName := columnValue(scanArgs, slaveCols, "Connection_name") // MariaDB

Expand Down

0 comments on commit 1243a11

Please sign in to comment.