GithubHelp home page GithubHelp logo

m-samoylov / pxc-checker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from larrabee/pxc-checker

0.0 0.0 0.0 35 KB

Checker for Percona XtraDB Cluster

License: GNU General Public License v3.0

Go 100.00%

pxc-checker's Introduction

Percona/MySQL XtraDB Cluster Checker

This project is percona-clustercheck like checker rewrited to Golang. Program to make a proxy (ie HAProxy) capable of monitoring Percona XtraDB Cluster nodes properly.

Usage

Basic Haproxy config:

listen pxc
  bind 127.0.0.1:3306
  balance leastconn
  option httpchk HEAD /
  mode tcp
  default-server inter 500 rise 5 fall 5
    server node1 1.2.3.4:3306 check port 9200
    server node2 1.2.3.5:3306 check port 9200
    server node3 1.2.3.6:3306 check port 9200 backup

Setup

  1. Create MySQL user:
    create user 'pxc_checker'@'localhost' IDENTIFIED BY 'YourStrongPassword'; GRANT PROCESS ON *.* TO 'pxc_checker'@'localhost';
  2. Get program binary. You can choose one of the following methods:
    • Build it from source code with:
      go get
      go build -o pxc-checker ./...
      
    • Download latest compiled binary from Releases page.
  3. Copy binary to /usr/bin/pxc-checker
  4. Copy systemd unit from systemd/[email protected] to /etc/systemd/system/[email protected]
  5. Copy example config from config/example.conf to /etc/pxc/checker/cluster.conf and modify it.
  6. Enable and start unit with command: systemctl enable --now pxc-checker@cluster
  7. Check node status with command: curl http://127.0.0.1:9200

Configuration file options

You can override any of the following values in configuration file:

  • WEB_LISTEN: Web server listening interface and port in format {IPADDR}:{PORT} or :PORT for all interfaces. Default: :9200
  • WEB_READ_TIMEOUT: Web server request read timeout in milliseconds. Default: 30000
  • WEB_WRITE_TIMEOUT: Web server request write timeout in milliseconds. Default: 30000
  • CHECK_RO_ENABLED: Mark 'read_only' node as available. Default: false
  • CHECK_FORCE_ENABLED: Ignoring the status of the checks and always marking the node as available. Default: false
  • CHECK_DONORS_ENABLED: Mark donors nodes as available. Default: true
  • CHECK_INTERVAL: Mysql checks interval in milliseconds. Default: 500
  • CHECK_FAIL_TIMEOUT: Mark the node inaccessible if for the specified time (in milliseconds) there were no successful checks. Default: 3000
  • MYSQL_HOST: MySQL host address. Default: 127.0.0.1
  • MYSQL_PORT: MySQL port. Default: 3306
  • MYSQL_USER: MySQL username. Default: pxc_checker
  • MYSQL_PASS: Mysql password. Default: no password

pxc-checker's People

Contributors

larrabee avatar

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.