I think maybe the server keeps the disabled status in memory, so simply copying files just isn't going to do it.  This should do the trick:<div><br></div><div>===== server/ext/getblues.sh =====</div><div><div>      #!/bin/bash</div>

<div><br></div><div>      . /home/xymon/server/etc/hobbitserver.cfg</div><div><br></div><div>      $BB localhost "hobbitdboard color=blue fields=hostname,testname,disabletime,dismsg" | $SED -e 's/\\/\\\\/g'</div>

<div>===== end of file =====</div><div><br></div><div>===== server/ext/putblues.sh =====</div><div>       #!/bin/bash</div><div><div><br></div><div>       . /home/xymon/server/etc/hobbitserver.cfg</div><div><br></div><div>

       cat $1 | while read line</div><div>       do</div><div>          OFS="$IFS"</div><div>          IFS="|"</div><div>          set $line</div><div>          IFS="$OFS"</div><div>          x=`echo "$4" | $SED -e 's/\\\n/\n/g'`</div>

<div>          $BB localhost "disable $1.$2 $3 $x"</div><div>       done</div><div>===== end of file =====</div><div><br></div><div>1) on the primary, whenever the other files are copied, run this and copy the file:</div>

<div><br></div><div>      server/ext/getblues.sh > server/tmp/blues.out</div></div><div><br></div><div>2) whenever the secondary needs to take over, have it run the other script:</div><div><br></div><div>     server/etc/putblues.sh server/tmp/blues.out</div>

<div><div><br></div><div>That should load up the disabled status messages into the secondary.</div><div><br></div><div>NB: I've only tested this on a single server, making a slight change to the messages in the blues.out file before reloading it.  The change loads up just fine, so it would *probably* work on a different server.  YMMV  :)</div>

<div><br></div><div>Ralph Mitchell<br><div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote">On Thu, Jul 9, 2009 at 1:34 PM, T.J. Yang <span dir="ltr"><<a href="mailto:tj_yang@hotmail.com" target="_blank">tj_yang@hotmail.com</a>></span> wrote: <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
----------------------------------------<br>
> From: <a href="mailto:Paul.Root@qwest.com" target="_blank">Paul.Root@qwest.com</a><br>
> To: <a href="mailto:hobbit@hswn.dk" target="_blank">hobbit@hswn.dk</a><br>
> Date: Thu, 9 Jul 2009 13:22:13 -0500<br>
> Subject: RE: [hobbit] How do I clone maintenance mode record ?<br>
<div>><br>
> I have a separate hobbit-alerts.cfg file for the secondary. It simply monitors the primary, and if the primary goes down, runs a script to copy the primaries -alerts file into place.<br>
> Then it has a recovery script to turn itself back off.<br>
<br>
</div>we use cron job to pull selected bb-host*,hobbit-alert*,hobbit-data and others from hobbit1 to hobbit2 using rsync.<br>
and with hobbit server side module to check health of hobbit1, if hobbit1 is bad hobbit2 will enable its bbpage worker module to assume the failed hobbit1 alert service.<br>
<br>
Two issues remains.<br>
<br>
1. maintenance records are not failed over yet.thus hobbit2 send out false alerts.<br>
2. rrd files on hobbit1 need to be patched with rrd data from hobbit2 for hobbit1's down period.<br>
<br>
<br>
<br>
tj<br>
<div><br>
> The primary rdists the pertinent files over nightly.<br>
><br>
><br>
><br>
> Paul Root IM/MNS Infrastructure<br>
> -----Original Message-----<br>
> From: Alan Sparks [mailto:<a href="mailto:asparks@doublesparks.net" target="_blank">asparks@doublesparks.net</a>]<br>
> Sent: Thursday, July 09, 2009 12:10 PM<br>
> To: <a href="mailto:hobbit@hswn.dk" target="_blank">hobbit@hswn.dk</a><br>
> Subject: Re: [hobbit] How do I clone maintenance mode record ?<br>
><br>
> T.J. Yang wrote:<br>
>><br>
>> I am rsyncing configuration files from hobbit1( primary) to hobbit2 (standby) server.<br>
>><br>
>> But without maintenance mode records of hobbit1 copy over, hobbit2 will generate alerts for hosts that had been put into maintenance mode already.<br>
>><br>
>> Currently I tried to rsync "data/disabled" directory and restart hobbit2 server but the maintenace web page still show less hosts on hobbit2.<br>
>><br>
>> Anyone know where is the maintenance records store at beside "data/disabled" ?<br>
>><br>
>><br>
> I recall, from a code browse some time ago, that the alerts module used<br>
> the acknowledge.log in deciding whether alerts had been sent -- you may<br>
> need to copy that over. I thought it odd, having that in the logs/<br>
> directory but used as a data file - but you might look at that.<br></div></blockquote></div></div></div></div></div>