示例#1
0
func init() {
	servenv.OnRun(func() {
		if *allowedReplicationLag > 0 {
			health.Register("replication_reporter", mysqlctl.MySQLReplicationLag(agent.Mysqld, *allowedReplicationLag))
		}
	})
}
示例#2
0
func registerHealthReporter(mysqld *mysqlctl.Mysqld) {
	if *enableReplicationLagCheck {
		health.DefaultAggregator.Register("replication_reporter", mysqlctl.MySQLReplicationLag(mysqld))
	}
}