Skip to content

bmpercy/mysql_replication_monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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')

About

a helper class for monitoring replication between two mysql dbs. Rails environment only and depends on multiple_connection_handler.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages