All Projects → prometheus → Haproxy_exporter

prometheus / Haproxy_exporter

Licence: apache-2.0
Simple server that scrapes HAProxy stats and exports them via HTTP for Prometheus consumption

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Haproxy exporter

Kube State Metrics
Add-on agent to generate and expose cluster-level metrics.
Stars: ✭ 3,433 (+638.28%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Query Exporter
Export Prometheus metrics from SQL queries
Stars: ✭ 166 (-64.3%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Sidekiq Prometheus Exporter
All the basic metrics of Sidekiq with pluggable contribs prepared for Prometheus
Stars: ✭ 129 (-72.26%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Memcached exporter
Exports metrics from memcached servers for consumption by Prometheus.
Stars: ✭ 109 (-76.56%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Consul exporter
Exporter for Consul metrics
Stars: ✭ 323 (-30.54%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Bigbluebutton Exporter
Prometheus exporter for BigBlueButton
Stars: ✭ 117 (-74.84%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Pagespeed exporter
Prometheus pagespeed exporter
Stars: ✭ 149 (-67.96%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Promcord
📊 Analyze your entire discord guild in grafana using prometheus. Message, User, Game and Voice statistics...
Stars: ✭ 39 (-91.61%)
Mutual labels:  metrics, prometheus, prometheus-exporter
github exporter
Prometheus exporter for GitHub
Stars: ✭ 21 (-95.48%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Github Exporter
Prometheus exporter for github metrics
Stars: ✭ 231 (-50.32%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Tomcat exporter
A Prometheus exporter for Apache Tomcat
Stars: ✭ 99 (-78.71%)
Mutual labels:  metrics, prometheus, prometheus-exporter
s3 exporter
Exports Prometheus metrics about S3 buckets and objects
Stars: ✭ 65 (-86.02%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Systemd exporter
Exporter for systemd unit metrics
Stars: ✭ 82 (-82.37%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Prometheus To Cloudwatch
Utility for scraping Prometheus metrics from a Prometheus client endpoint and publishing them to CloudWatch
Stars: ✭ 127 (-72.69%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Citrix Adc Metrics Exporter
Export metrics from Citrix ADC (NetScaler) to Prometheus
Stars: ✭ 67 (-85.59%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Redis exporter
Prometheus Exporter for Redis Metrics. Supports Redis 2.x, 3.x, 4.x, 5.x and 6.x
Stars: ✭ 2,092 (+349.89%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Iperf3 exporter
Simple server that probes iPerf3 endpoints and exports results via HTTP for Prometheus consumption
Stars: ✭ 30 (-93.55%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Kafka exporter
Kafka exporter for Prometheus
Stars: ✭ 996 (+114.19%)
Mutual labels:  metrics, prometheus, prometheus-exporter
Ssl exporter
Exports Prometheus metrics for SSL certificates
Stars: ✭ 211 (-54.62%)
Mutual labels:  metrics, prometheus, prometheus-exporter
aws-ec2-sg-exporter
A dockerized Prometheus exporter that compares desired/wanted IPv4/IPv6 CIDR against currently applied inbound CIDR rules in your security group(s).
Stars: ✭ 23 (-95.05%)
Mutual labels:  metrics, prometheus, prometheus-exporter

HAProxy Exporter for Prometheus

This is a simple server that scrapes HAProxy stats and exports them via HTTP for Prometheus consumption.

Note: since HAProxy 2.0.0, the official source includes a Prometheus exporter module that can be built into your binary with a single flag during build time and offers an exporter-free Prometheus endpoint. More information down below.

Getting Started

To run it:

./haproxy_exporter [flags]

Help on flags:

./haproxy_exporter --help

For more information check the source code documentation. All of the core developers are accessible via the Prometheus Developers mailinglist.

Usage

HTTP stats URL

Specify custom URLs for the HAProxy stats port using the --haproxy.scrape-uri flag. For example, if you have set stats uri /baz,

haproxy_exporter --haproxy.scrape-uri="http://localhost:5000/baz?stats;csv"

Or to scrape a remote host:

haproxy_exporter --haproxy.scrape-uri="http://haproxy.example.com/haproxy?stats;csv"

Note that the ;csv is mandatory (and needs to be quoted).

If your stats port is protected by basic auth, add the credentials to the scrape URL:

haproxy_exporter  --haproxy.scrape-uri="http://user:[email protected]/haproxy?stats;csv"

You can also scrape HTTPS URLs. Certificate validation is enabled by default, but you can disable it using the --no-haproxy.ssl-verify flag:

haproxy_exporter --no-haproxy.ssl-verify --haproxy.scrape-uri="https://haproxy.example.com/haproxy?stats;csv"

Unix Sockets

As alternative to localhost HTTP a stats socket can be used. Enable the stats socket in HAProxy with for example:

stats socket /run/haproxy/admin.sock mode 660 level admin

The scrape URL uses the 'unix:' scheme:

haproxy_exporter --haproxy.scrape-uri=unix:/run/haproxy/admin.sock

Docker

Docker Repository on Quay Docker Pulls

To run the haproxy exporter as a Docker container, run:

docker run -p 9101:9101 quay.io/prometheus/haproxy-exporter:v0.12.0 --haproxy.scrape-uri="http://user:[email protected]/haproxy?stats;csv"

Development

Go Report Card Code Climate

Building

make build

Testing

CircleCI

make test

TLS and basic authentication

The HAProxy Exporter supports TLS and basic authentication.

To use TLS and/or basic authentication, you need to pass a configuration file using the --web.config.file parameter. The format of the file is described in the exporter-toolkit repository.

License

Apache License 2.0, see LICENSE.

Alternatives

Official Prometheus exporter

As of 2.0.0, HAProxy includes a Prometheus exporter module that can be built into your binary during build time.

To build with the official Prometheus exporter module, make with the following EXTRA_OBJS flag:

make TARGET=linux-glibc EXTRA_OBJS="contrib/prometheus-exporter/service-prometheus.o"

Once built, you can enable and configure the Prometheus endpoint from your haproxy.cfg file as a typical frontend:

frontend stats
    bind *:8404
    http-request use-service prometheus-exporter if { path /metrics }
    stats enable
    stats uri /stats
    stats refresh 10s

For more information, see this official blog post.

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].