Low commit activity in last 3 years
No release in over a year
This plugin provides native HAProxy instrumentation for monitoring and metrics collection, including: service health and backend server metrics.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.1
~> 0.10
~> 13.0
~> 3.2
~> 3.1
~> 0.80.1
~> 0.8

Runtime

 Project Readme

Sensu-Plugins-haproxy

Build Status Gem Version Code Climate Test Coverage Dependency Status Sensu Bonsai Asset

Sensu Asset

The Sensu assets packaged from this repository are built against the Sensu Ruby runtime environment. When using these assets as part of a Sensu Go resource (check, mutator or handler), make sure you include the corresponding Sensu Ruby runtime asset in the list of assets needed by the resource. The current ruby-runtime assets can be found here in the Bonsai Asset Index.

Functionality

Files

  • bin/check-haproxy.rb
  • bin/metrics-haproxy.rb

Usage

Metrics

$ /opt/sensu/embedded/bin/metrics-haproxy.rb --help
Usage: /opt/sensu/embedded/bin/metrics-haproxy.rb (options)
    -f BACKEND1[,BACKEND2],          comma-separated list of backends to fetch stats from. Default is all backends
        --backends
    -c HOSTNAME|SOCKETPATH,          HAproxy web stats hostname or path to stats socket (required)
        --connect
    -a, --expose-all                 Expose all possible metrics, includes "--server-metrics", "--backends" will still in effect
    -p, --pass PASSWORD              HAproxy web stats password
    -q, --statspath STATUSPATH       HAproxy web stats path (the / will be prepended to the STATUSPATH e.g stats)
    -P, --port PORT                  HAproxy web stats port
    -r, --retries RETRIES            Number of times to retry fetching stats from haproxy before giving up.
    -i, --retry_interval SECONDS     Interval (seconds) between retries
    -s, --scheme SCHEME              Metric naming scheme, text to prepend to metric
        --server-metrics             Gathers additional frontend metrics, i.e. total requests
        --use-explicit-names         Use explicit names for frontend, backend, server, listener
        --use-haproxy-names          Use raw names as used in haproxy CSV format definition rather than human friendly names
    -S, --use-ssl                    Use SSL to connect to HAproxy web stats
    -u, --user USERNAME              HAproxy web stats username
$

Installation

Installation and Setup

Notes