在SSH失败时,如何为IP设置心跳

我想知道是否有人可以帮助我,我试图设置心跳红帽5故障转移IP地址时,SSH服务器停止响应。 所以基本上你ssh到VIP,然后通过哪个服务器有浮动IP通过。

192.168.0.100 | | /------------------------\ | /------------------------\ | Server 01 | | | Server 02 | | eth0 - 192.168.0.1 |-----/ | eth0 - 192.168.0.2 | | eth0:0 - 192.168.0.100 | | eth0:0 - down | \------------------------/ \------------------------/ 

如果ssh停止响应,我希望在第二台机器上启用eth0:0以允许ssh连接继续提供服务。

我试图按照我在网上find的一些文件,所以这里是我目前的configuration:

ha.cf

 bcast eth0 keepalive 2 warntime 10 deadtime 30 initdead 120 udpport 694 auto_failback off node vm-bal01 node vm-bal02 debugfile /var/log/ha-debug logfile /var/log/ha-log 

authkeys

 auth 1 1 sha1 sshhhsecret1234 

的haresources

 server01 192.168.0.100/24/eth0:0/192.168.0.255 

希望有人可以帮助,因为这是驱使我坚果…

编写SSH的监控方法。 如果它失败发出一个hb_standby all