Skip to content
a helper class for monitoring replication between two mysql dbs. Rails environment only and depends on multiple_connection_handler.
Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
.gitignore
CHANGELOG
LICENSE
README.rdoc
Rakefile
TODO
VERSION

README.rdoc

mysql_replication_monitor


Utility to check the replication status between MySQL master and slave dbs set up to replicate to each other

All that is needed is to specify the two dbs by their Rails database config (environment) names (e.g. 'staging_master', 'staging_slave' or whatever).

Examples


# specify both master and slave db configs
monitor = MysqlReplicationMonitor.new(:master => 'master', :slave => 'slave)

# default slave to the current environment
monitor = MysqlReplicationMonitor.new(:master => 'master')

# override the default time to cache the statuses (in seconds)
monitor = MysqlReplicationMonitor.new(:master => 'master', :slave => 'slave,
                                     :refresh_time => 10)

# override the default database config file (not recommended)
monitor = MysqlReplicationMonitor.new(:master => 'master', :slave => 'slave,
                                     :db_config_file => 'foofile.txt')
Something went wrong with that request. Please try again.