mon is a general-purpose scheduler and alert management tool used for monitoring service availability and triggering alerts upon failure detection. mon was designed to be open and extensible in the sense that it supports arbitrary monitoring facilities and alert methods via a common interface, all of which are easily implemented with programs in C, Perl, shell, etc., SNMP traps, and special mon traps.
Programming Mon alerts with Heartbeat
To determine whether a node should be running a given resource at the current time, use cl_status to find out what kinds of services the current node is running.
If you find a condition which should cause a failover to the other node, use hb_standby to cause the resources to fail over to the other node.
cl_status, hb_standby, http://www.kernel.org/software/mon/