• 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 
  • 相关阅读:
    JS保留小数点(四舍五入、四舍六入)实例
    HTML5 本地存储 localStorage、sessionStorage 的遍历、存储大小限制处理
    TCP/IP 网络编程(五)
    【IOS】mac终端运行.sh文件总是提示permission denied
    一扫天下——ZXing使用全解析
    《学习bash》笔记--进程处理
    VB断点调试
    poj 2506 Tiling(java解法)
    策略模式实战之优惠方式
    HTML 5 音频Audio
  • 原文地址:https://www.cnblogs.com/devops/p/3038983.html
Copyright © 2020-2023  润新知