•  


GitHub - cloudposse-archives/mysql_health: A standalone service for monitoring MySQL and exposing its health through an HTTP interface for use with TCP load balancers (like haproxy) that support out-of-band health checks using HTTP.
Skip to content

A standalone service for monitoring MySQL and exposing its health through an HTTP interface for use with TCP load balancers (like haproxy) that support out-of-band health checks using HTTP.

License

Notifications You must be signed in to change notification settings

cloudposse-archives/mysql_health

Folders and files

Name Name
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MysqlHealth

MySQL Health is a standalone HTTP server that will respond with a 200 status code when MySQL is operating as expected.

This script is intended to be used in conjuction with HAProxy "option httpchk" for a TCP load balancer distributing load across mysql servers.

FAQs

  1. If you get the error "caught DBI::InterfaceError exception 'Could not load driver (uninitialized constant MysqlError)'" on OSX, try doing this: export DYLD_LIBRARY_PATH="/usr/local/mysql/lib:$DYLD_LIBRARY_PATH"

Installation

Add this line to your application's Gemfile:

gem 'mysql_health'

And then execute:

$ bundle

Or install it yourself as:

$ gem install mysql_health

Usage

Usage: mysql_health options
        --check:master               Master health check
        --check:slave                Slave health check
        --check:allow-overlapping    Allow overlapping health checks (default: false)
        --check:interval INTERVAL    Check health every INTERVAL (default: 10s)
        --check:delay DELAY          Delay health checks for INTERVAL (default: 0s)
        --check:dsn DSN              MySQL DSN (default: DBI:Mysql:mysql:localhost)
        --check:username USERNAME    MySQL Username (default: root)
        --check:password PASSWORD    MySQL Password (default: )
    -l, --server:listen ADDR         Server listen address (default: 0.0.0.0)
    -p, --server:port PORT           Server listen port (default: 3305)
    -d, --server:daemonize           Daemonize the process (default: false)
    -P, --server:pid-file PID-FILE   Pid-File to save the process id (default: false)
        --log:level LEVEL            Logging level (default: INFO)
        --log:file FILE              Write logs to FILE (default: STDERR)
        --log:age DAYS               Rotate logs after DAYS pass (default: 7)
        --log:size SIZE              Rotate logs after the grow past SIZE bytes (default: 10485760)

Examples

Start the server on port 1234 and check the status of the slave every 30 seconds:

mysql_health --check:slave --check:interval 30 --server:port 1234

Start the server on port 1234 and check the status of the master every 30 seconds:

mysql_health --check:master --check:interval 30 --server:port 1234

Contributing

  1. Fork it
  2. Create your feature branch ( git checkout -b my-new-feature )
  3. Commit your changes ( git commit -am 'Added some feature' )
  4. Push to the branch ( git push origin my-new-feature )
  5. Create new Pull Request

About

A standalone service for monitoring MySQL and exposing its health through an HTTP interface for use with TCP load balancers (like haproxy) that support out-of-band health checks using HTTP.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

- "漢字路" 한글한자자동변환 서비스는 교육부 고전문헌국역지원사업의 지원으로 구축되었습니다.
- "漢字路" 한글한자자동변환 서비스는 전통문화연구회 "울산대학교한국어처리연구실 옥철영(IT융합전공)교수팀"에서 개발한 한글한자자동변환기를 바탕하여 지속적으로 공동 연구 개발하고 있는 서비스입니다.
- 현재 고유명사(인명, 지명등)을 비롯한 여러 변환오류가 있으며 이를 해결하고자 많은 연구 개발을 진행하고자 하고 있습니다. 이를 인지하시고 다른 곳에서 인용시 한자 변환 결과를 한번 더 검토하시고 사용해 주시기 바랍니다.
- 변환오류 및 건의,문의사항은 juntong@juntong.or.kr로 메일로 보내주시면 감사하겠습니다. .
Copyright ⓒ 2020 By '전통문화연구회(傳統文化硏究會)' All Rights reserved.
 한국   대만   중국   일본