<div><div>I realised earlier that the disabletime value coming from hobbitdboard is actually a unix timestamp, but the disable command wants a duration in the form of seconds, minutes or hours.  Again, this works with Ubuntu, and probably any other Linux, but maybe not in a different Unix.  It relies on the GNU date command, for a start...  :)</div>
<div><br></div><div>========== putblues.sh ==========</div><div>     #!/bin/sh</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>       if [ "$3" -eq "-1" ]; then</div><div>         # found "disable until OK"</div>
<div>         lifetime="-1"</div><div>       else</div><div>         now=`date +%s`</div><div>         lifetime=`$EXPR $3 - $now`</div><div>         if [ "$lifetime" -le "0" ]; then</div><div>
           # this one expired, ignore it</div><div>           continue</div><div>         else</div><div>           lifetime="$lifetime"s</div><div>         fi</div><div>       fi</div><div>       msg=`echo "$4" | $SED -e 's/\\\n/\n/g'`</div>
<div>       $BB localhost "disable $1.$2 $lifetime $msg"</div><div>     done</div><div>========== cut here ==========</div></div><div><br></div><div>Ralph Mitchell</div><br><br><div class="gmail_quote">On Sat, Jul 11, 2009 at 12:52 AM, Ralph Mitchell <span dir="ltr"><<a href="mailto:ralphmitchell@gmail.com">ralphmitchell@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="gmail_quote"><div class="im">On Fri, Jul 10, 2009 at 8:19 AM, T.J. Yang <span dir="ltr"><<a href="mailto:tj_yang@hotmail.com" target="_blank">tj_yang@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>In Ralph Mitchell (<a href="mailto:ralphmitchell@gmail.com" target="_blank">ralphmitchell@gmail.com</a>)</div>
                reply email,<br>
There are getblue.sh and putblue.sh to do the collecting on primary and populating on DR/standby hobbit server.<br>
<br>
I tired it but I found the putblue.sh is not working. I still can't see the same list of maintenance hosts between the twos, even the get and put blue shell ran sucessfully.<br>
<br>
This may caused by lacking of running bbpage alert module on DR/Secondary module. Is your DR hobbit server has alert module disabled and your script still works ?<br>
<br>
Would you mind to send to the list or send it to my email account ? I like to learn how you did it.</blockquote><div><br></div></div><div>As I said, I only tried it in Ubuntu, so I would expect it to work in any Linux distribution.  I'm still setting up other servers in VMware for fooling around with this kind of thing.  What OS do you have??</div>

<div><br></div><div>Ralph Mitchell</div><div><br></div></div>
</blockquote></div><br>