KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

Working with Heartbeat

Post new topic   Reply to topic    KS-Soft Forum Index -> Library
View previous topic :: View next topic  
Author Message

Joined: 21 Mar 2007
Posts: 76
Location: Klarup (AAlborg), Demark

PostPosted: Tue Apr 24, 2007 6:19 am    Post subject: Working with Heartbeat Reply with quote

We have a heartbeat solution, where 2 hosts "share" 1 IP address besides their own, and some tests should only be done on the host with the ip. At the same time, no "bad" test must appear on the other host to confuse people.

I have solved it like this by making a test that tests if the virtual NIC eth1:0 (a script parameter) is configured = the host has the IP. All nessesary test then depend on this test, and it is never reported bad, as not having the ip is not bad.

The script for the test called "pbstolx01.man.b.p Script HasVirtualInterfaceConfigured"


if [ `ifconfig "$INTERFACE" | grep inet | wc -c` -gt 0 ]

RESULT="Ok:Has $INTERFACE configured"


RESULT="Ok:Has no $INTERFACE configured"


echo "ScriptRes:$RESULT"

So, the output is always "Ok" - so we have to make the other tests dependant of the actual reply, this is done with an expression:

'%::pbstolx01.man.b.p Script HasNetworkInterfaceConfigured::Reply%'=='Has eth1:0 configured'

Notice, that the parameter eth1:0 to the script is in the expression, wich is kind of bad programming, the reply (and expression) could be simplified to not use such a variable
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Library All times are GMT - 6 Hours
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index