xymon replication or clustering
Root, Paul
Paul.Root at qwest.com
Wed Feb 9 22:11:34 CET 2011
The hobbit-alerts.cfg entry for the secondary:
HOST=<PRIMARYSERVER> COLOR=red SERVICE=bbd,conn
SCRIPT /usr/local/scripts/hbtSecondaryTakeOver <EMAILADDRESS>
MAIL <EMAILADDRESS>
The hbtSecondaryTakeOver script:
echo "Starting at `date`, $BBHOSTNAME . $BBSVCNAME" >/tmp/blah
MESSAGE="Hobbit: $BBHOSTNAME's $BBSVCNAME service is $BBCOLORLEVEL. Secondary taking over"
export HOST=`/usr/bin/hostname`
export USER=hobbit
echo "mailing: $RCPT \"$MESSAGE\"" >> /tmp/blah
echo $MESSAGE | /usr/bin/mail $RCPT
HETC="/home/hobbit/server/etc"
cp ${HETC}/hobbit-alerts.cfg.primary ${HETC}/hobbit-alerts.cfg
The hobbit-alerts.cfg entry to release (would go in hobbit-alerts.cfg.primary)
HOST=iadhbtp1 COLOR=red SERVICE=bbd,conn RECOVERED
SCRIPT /usr/local/scripts/hbtSecondaryRelease <EMAILADDRESS>
MAIL <EMAILADDRESS>
And the release script:
echo "Starting at `date`, $BBHOSTNAME . $BBSVCNAME" >/tmp/blah
MESSAGE="Hobbit: $BBHOSTNAME's $BBSVCNAME service is $BBCOLORLEVEL. Secondary turning down"
export USER=hobbit
echo "mailing: $RCPT \"$MESSAGE\"" >> /tmp/blah
echo $MESSAGE | /usr/bin/mail $RCPT
HETC="/home/hobbit/server/etc"
cp ${HETC}/hobbit-alerts.cfg.secondary ${HETC}/hobbit-alerts.cfg
You'll need to adjust things like, machine names, file/directory locations/name, and email addresses.
Also, You don't want the Release script to run on the primary, so either don't have it there or have some logic in the script that stops execution if it's not the right machine (like if [ "$HOSTNAME" != "<secondaryserver>"] ; then exit fi)
Paul Root
Lead Internet Systems Eng
Qwest Network Services
________________________________
From: Raymond, David [mailto:David.Raymond at ca.ebarrette.com]
Sent: Wednesday, February 09, 2011 2:46 PM
To: xymon at xymon.com
Subject: RE: [xymon] RE: xymon replication or clustering
Are you able to send me the how to for this.
My skill is a little limited and that could help me.
thx
David Raymond
From: Root, Paul [mailto:Paul.Root at qwest.com]
Sent: Wednesday, February 09, 2011 14:49
To: 'xymon at xymon.com'
Subject: [xymon] RE: xymon replication or clustering
I have a secondary server watching the primary. It has 1 think to do in hobbit-alerts.cfg, watch the primary. If the secondary looses contact with the primary it will run a script.
That script is to copy in the primaries hobbit-alerts.cfg file in place. It is put on the secondary automatically with rdist.
Also, in the primaries hobbit-alerts.cfg file, there is a watch that looks for a recovery, at which time, another script is run to reverse the process.
Pretty simple
Paul Root
Lead Internet Systems Eng
Qwest Network Services
________________________________
From: Raymond, David [mailto:David.Raymond at ca.ebarrette.com]
Sent: Wednesday, February 09, 2011 1:04 PM
To: xymon at xymon.com
Subject: [xymon] xymon replication or clustering
Hi,
We have one xymon in our Head Office, and other one in branch office.
In my Head office, we want to have 2 xymon to replicate result, if one failed, the other take place.
An employe have start something, but he left month ago. I see I the hobbit he did, this line in bb-hosts :
summary Hobbit-PRD.All 172.30.1.1 http://hobbit/hobbit
group servers
127.0.0.1 Hobbit-PRD # bbd http://Hobbit-PRD/
So the big question is, it is possible to do this ? Can we have to xymon than are in "cluster"
And if we want to get our branch office?
thx
David Raymond
________________________________
This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and destroy
all copies of the communication and any attachments.
________________________________
This communication is the property of Qwest and may contain confidential or
privileged information. Unauthorized use of this communication is strictly
prohibited and may be unlawful. If you have received this communication
in error, please immediately notify the sender by reply e-mail and destroy
all copies of the communication and any attachments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20110209/14fed96b/attachment.html>
More information about the Xymon
mailing list