There are a couple of monitoring tools around these days that make your life easier.
One of the most popular monitoring tools around is Nagios. It is widely used and supports a variety of software components.
If you want to use Nagios to monitor your PostgreSQL cluster, it is necessary to install a plugin capable of running tests relevant to replication. Such plugins are also available for PostgreSQL, and can be downloaded for free from http://bucardo.org/wiki/Check_postgres. The Bucardo plugins for Nagios are not just able to test replication but are also a standard software component for monitoring PostgreSQL as a whole.