{"id":18728851,"url":"https://github.com/rubyonworld/haproxy-ruby","last_synced_at":"2025-11-12T05:30:21.115Z","repository":{"id":174007932,"uuid":"542157350","full_name":"RubyOnWorld/haproxy-ruby","owner":"RubyOnWorld","description":"This gem aims to provide an interface to query HAProxy for statistics, and eventually management through the sockets API.","archived":false,"fork":false,"pushed_at":"2022-09-27T17:11:37.000Z","size":18,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-12-28T14:27:22.703Z","etag":null,"topics":["api","gem","ha","haproxy","proxy","ruby","rubygem"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RubyOnWorld.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-27T15:27:46.000Z","updated_at":"2022-09-27T17:49:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"6ba50368-7dc5-4b1b-9ea2-032d28f1384e","html_url":"https://github.com/RubyOnWorld/haproxy-ruby","commit_stats":null,"previous_names":["rubyonworld/haproxy-ruby"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fhaproxy-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fhaproxy-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fhaproxy-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RubyOnWorld%2Fhaproxy-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RubyOnWorld","download_url":"https://codeload.github.com/RubyOnWorld/haproxy-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239599040,"owners_count":19665911,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","gem","ha","haproxy","proxy","ruby","rubygem"],"created_at":"2024-11-07T14:24:31.867Z","updated_at":"2025-11-12T05:30:21.069Z","avatar_url":"https://github.com/RubyOnWorld.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HAProxy RubyGem\n\nThis gem aims to provide an interface to query HAProxy for statistics,\nand eventually management through the sockets API.\n\n## What's HAProxy?\n\n[HAProxy](http://haproxy.1wt.eu/) is the _Reliable, High Performance\nTCP/HTTP Load Balancer_.\n\n## Why this gem?\n\n* I use HAProxy at my work.\n* I wanted to know how to create gems.\n* I wanted to contribute with OSS.\n* Why not?\n* All of the above.\n\n## Example of use\n\n    #! /usr/bin/env ruby\n    require 'haproxy'\n    require 'pp'\n\n    haproxy = HAProxy.read_stats '/path/to/haproxy.stats.socket'\n\n    pp haproxy.info\n\n    # {:name=\u003e\"HAProxy\",\n    #  :version=\u003e\"1.3.22\",\n    #  :release_date=\u003e\"2009/10/14\",\n    #  :nbproc=\u003e\"1\",\n    #  :process_num=\u003e\"1\",\n    #  :pid=\u003e\"10222\",\n    #  :uptime=\u003e\"0d 0h33m12s\",\n    #  :uptime_sec=\u003e\"1992\",\n    #  :memmax_mb=\u003e\"0\",\n    #  :ulimit_n=\u003e\"4013\",\n    #  :maxsock=\u003e\"4013\",\n    #  :maxconn=\u003e\"2000\",\n    #  :maxpipes=\u003e\"0\",\n    #  :currconns=\u003e\"1\",\n    #  :pipesused=\u003e\"0\",\n    #  :pipesfree=\u003e\"0\",\n    #  :tasks=\u003e\"1\",\n    #  :run_queue=\u003e\"1\",\n    #  :node=\u003e\"roke\",\n    #  :\"description:\"=\u003enil}\n\n    pp haproxy.stats\n\n    # [{:pxname=\u003e\"app1\",\n    #   :svname=\u003e\"thin1\",\n    #   :qcur=\u003e\"0\",\n    #   :qmax=\u003e\"0\",\n    #   :scur=\u003e\"0\",\n    #   :smax=\u003e\"0\",\n    #   :slim=\u003e\"\",\n    #   :stot=\u003e\"0\",\n    #   :bin=\u003e\"0\",\n    #   :bout=\u003e\"0\",\n    #   :dreq=\u003e\"\",\n    #   :dresp=\u003e\"0\",\n    #   :ereq=\u003e\"\",\n    #   :econ=\u003e\"0\",\n    #   :eresp=\u003e\"0\",\n    #   :wretr=\u003e\"0\",\n    #   :wredis=\u003e\"0\",\n    #   :status=\u003e\"no check\",\n    #   :weight=\u003e\"1\",\n    #   :act=\u003e\"1\",\n    #   :bck=\u003e\"0\",\n    #   :chkfail=\u003e\"\",\n    #   :chkdown=\u003e\"\",\n    #   :lastchg=\u003e\"\",\n    #   :downtime=\u003e\"\",\n    #   :qlimit=\u003e\"\",\n    #   :pid=\u003e\"1\",\n    #   :iid=\u003e\"1\",\n    #   :sid=\u003e\"1\",\n    #   :throttle=\u003e\"\",\n    #   :lbtot=\u003e\"0\",\n    #   :tracked=\u003e\"\",\n    #   :type=\u003e\"2\",\n    #   :rate=\u003e\"0\",\n    #   :rate_lim=\u003e\"\",\n    #   :rate_max=\u003e\"0\"},...]\n\n#### HAProxy sample configuration\n\n    global\n    \tstats socket haproxy\n\n    defaults\n    \tmode\thttp\n    \toption httplog\n      option httpclose\n    \tretries\t3\n    \toption redispatch\n    \tmaxconn\t2000\n    \tcontimeout\t5000\n    \tclitimeout\t50000\n    \tsrvtimeout\t50000\n      stats uri /haproxy\n\n    listen app1 0.0.0.0:10000\n    \tbalance\troundrobin\n\n      server thin1 127.0.0.1:10001\n      server thin1 127.0.0.1:10002\n      server thin1 127.0.0.1:10003\n      server thin1 127.0.0.1:10004\n      server thin1 127.0.0.1:10005\n\n    frontend app2\n      bind 0.0.0.0:10011\n      default_backend app2\n\n    backend app2\n      balance roundrobin\n      server thin1 127.0.0.1:10006\n      server thin1 127.0.0.1:10007\n      server thin1 127.0.0.1:10008\n      server thin1 127.0.0.1:10009\n      server thin1 127.0.0.1:10010\n\n## Roadmap\n\n* Improve documentation\n* Improve CSV parsing\n* Add tests\n* Add examples\n* Read stats from HTTP and CSV files\n\n# License\n\n```\nCopyright (c) 2014 Leandro López\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyonworld%2Fhaproxy-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frubyonworld%2Fhaproxy-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frubyonworld%2Fhaproxy-ruby/lists"}