>> Fail-Safe Replication Monitor
I am a big believer in the “belt and suspenders” approach to monitoring. Monitoring the status of database replication can certainly be done from an administrative application, but sometimes you just want to be “extra sure” things are working.
The script below is a very simple .php page that serves two valuable purposes and is easy to deploy:
- It verifies that data from the master is actually making it into the slave.
- It provides diagnostic information when an alert is triggered.
The code below assumes a mysql database…but this approach would work in any situation where you use your scripting language of choice to connect to your database of choice and execute these simple sql commands. Set up a read-only database user so the script cannot be abused to do more than simply select data.
Subscribe by RSS