Coder Social home page Coder Social logo

haproxy_tcp_check_wrapper's Introduction

HAPROXY TCP CHECK Wrapper

HAProxy TCP Çheck Wrapper is a deamon, listening on specific TCP port.

Execute a script when the TCP port is connected, and return the result to TCP client.

How to use?

Build

make

make install

Configration of HAProxy TCP Check Wrapper

Copy /etc/haproxy-tcp-check-wrapper to /etc

Edit the /etc/haproxy-tcp-check-wrapper/config.toml

# Which IP address bound to.
host = "0.0.0.0"
# Which TCP Port bound to.
port = 9090
# Which script to run, when tcp connection established.
script = "/root/mysqlchk.mysql"

Just run haproxy-tcp-check-wrapper

haproxy_tcp_check &

Configration of HAProxy

listen mysql
    mode tcp
    balance source
    option tcp-check
    tcp-check expect string MySQL\ master\ is\ running
    default-server port 9090 downinter 5s rise 3 fall 2 slowstart 60s
    option tcplog
    bind 10.177.4.100:3306
    server control-01 10.177.4.10:3306 check
    server control-02 10.177.4.11:3306 check
    server control-03 10.177.4.12:3306 check

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.