All Projects → bcicen → haproxy-stats

bcicen / haproxy-stats

Licence: MIT license
haproxy-stats is a small Python library for fetching and parsing stats

Programming Languages

python
139335 projects - #7 most used programming language

haproxy-stats

Documentation Status

Haproxy-stats is a small Python library for fetching and parsing realtime stats from HAProxy

Installing

pip install haproxy-stats

Usage

from haproxystats import HAProxyServer

haproxy = HAProxyServer('127.0.0.1:3212')

for b in haproxy.backends:
    print('%s: %s' % (b.name, b.status))
backend1: UP
backend2: UP
backend3: UP
haproxy.to_json()
{
  "127.0.0.1": {
    "backends": [
      {
        "status": "UP",
        "lastchg": 497805,
        "weight": 0,
         "..."
        "listeners": []
      }
    ],
    "frontends": []
  }
}

full docs available in the docs/ folder

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].