zoukankan      html  css  js  c++  java
  • Active MQ 双主 和 mysql双主 方案测试

    该方案目前存在问题,后续补充当前高可用方案。

    ActiveMQ Master:


    1.install monit
    ./configure && make && make install
     
    2.config monit
    check program peer_mq with path "/usr/local/bin/chk_peer_mq_monit.sh" with timeout 2 seconds
           if status != 0  for 5 cycles then exec "/data/application/activemq/bin/activemq restart"
    3.edite chk_peer_mq_monit.sh
    #!/bin/sh
    peer_status=`nc -z 10.9.80.124 61616|awk '{if($NF ~ "succeeded") {split($NF,s,"!");print s[1]} else {print "failed"}}'`
    self_status=`nc -z 10.9.80.7 61616|awk '{if($NF ~ "succeeded") {split($NF,s,"!");print s[1]} else {print "failed"}}'`
    if [[ $peer_status != "succeeded" ]] && [[ $self_status != "succeeded" ]];then
        exit 3
    fi
    4.start monit
    /usr/local/monit/bin/monit
     

    ActiveMQ Slaver:


    1.install monit
    ./configure && make && make install
     
    2.config monit
    check program peer_mq with path "/usr/local/bin/chk_peer_mq_monit.sh" with timeout 2 seconds
           if status != 0  for 5 cycles then exec "/data/application/activemq/bin/activemq restart"
    3.edite chk_peer_mq_monit.sh
    #!/bin/sh
    peer_status=`nc -z 10.9.80.7 61616|awk '{if($NF ~ "succeeded") {split($NF,s,"!");print s[1]} else {print "failed"}}'`
    self_status=`nc -z 10.9.80.124 61616|awk '{if($NF ~ "succeeded") {split($NF,s,"!");print s[1]} else {print "failed"}}'`
    if [[ $peer_status != "succeeded" ]] && [[ $self_status != "succeeded" ]];then
        exit 3
    fi
    4.start monit
    /usr/local/monit/bin/monit 
  • 相关阅读:
    thrift java first demo
    找工作的一些感悟——前端小菜的成长
    常见标签的默认属性值及相互作用——关于CSS reset的思考
    CSS清浮动处理(Clear与BFC)
    简单JavaScript模版引擎优化
    最简单的JavaScript模板引擎
    JavaScript正则表达式下——相关方法
    JavaScript 正则表达式上——基本语法
    node.js调试
    node.js module初步理解
  • 原文地址:https://www.cnblogs.com/devops/p/3038983.html
Copyright © 2011-2022 走看看