Mon May 24 05:05:17 PDT 2010
- Previous message: [Slony1-general] Sending notification on replication problem
- Next message: [Slony1-general] Sending notification on replication problem
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, 24 May 2010, Brendan Hill wrote: > Hi all, > > > How can I configure Slony to send some notification - an email, call a URL, > run a program, flash something red on the screen, anything whatsoever - if > it encounters a replication problem? If you write a script/program (in perl,python,java etc..) to start your slon processes you have access to the stderr and stdout of the slon. Your script can then scan each line of output for slon looking for useful error strings and send an alert. You could even get complicated and run slon with enough debugging output so it logs the amount of tuples INSERT/UPDATE/DELETES replicated and log an error when that number is lower than you expect for too long. I think there are monitoring frameworks that can monitor files (or syslog) to do this type of thing as well but if your not already using one it probably isn't worth your time to set one up just for this. Another option is to monitor the lag on your sl_status on each of your nodes. In the case you describe replication should have stopped so the lag numbers should be increasing (I think this is discussed in the slony manual and the check_slony_cluster.sh does this. > > > > We discovered a problem this morning - a field had been added to the master > database but not the slave database. Slony ceased replicating > (understandably) but offered no notification. We discovered this about 12 > hours later when people started reporting problems. > > > > We're building a custom solution to poll both databases and alert us if > replication is broken, but is there something in Slony to alert on error? > > > > -Brendan > >
- Previous message: [Slony1-general] Sending notification on replication problem
- Next message: [Slony1-general] Sending notification on replication problem
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-general mailing list