On 05/25/2011 05:17 PM, Hai Tao wrote: > > I am not using corosync/pacemaker, and I use mon to monitor my application. I want to configure ipfail so I can monitor the external ethernet connectivity by pinging a gateway. > > In case the active node lost its external (which provide application services) network connection, ipfail can trigger a failover, so the peer can continue to provide service. > > can ipfail do this? if so, how?>
A simple mon script could ping your gateway and run 'hb_standby all'.
It turns out, however, that pinging the gateway doesn't work all that
well: you get nodes flipping back and forth on switch resets etc.
So I ended up with mon script that's basically
open( IN, "ethtool $nic 2>&1 |" ) or die;
while( <IN> ) {
if( /Link\s+detected:\s+yes$/ ) {
exit( 0 );
...
exit( 1 );
i.e. read the output of ethtool and check for "Link detected: yes".
Dima
--
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
