Page MenuHomePhabricator

Backport prometheus haproxy exporter for Jessie
Closed, ResolvedPublic

Description

Since a Debian developer made an attempt to package this: https://salsa.debian.org/go-team/packages/prometheus-haproxy-exporter we should backport it to Jessie.

Event Timeline

Gilles triaged this task as Low priority.Sep 13 2018, 5:17 PM
Gilles created this task.

After some minor adjustments to the package and what I had installed on my dev machine, I was able to get pretty far, but I'm running into a Go error, probably due to the version of Go itself or of the dependencies:

gilles@packaging:~/prometheus-haproxy-exporter$ dpkg-buildpackage -us -uc
dpkg-buildpackage: source package prometheus-haproxy-exporter
dpkg-buildpackage: source version 0.9.0-1~bpo8+1
dpkg-buildpackage: source distribution jessie-backports
dpkg-buildpackage: source changed by Gilles Dubuc <gilles@wikimedia.org>
dpkg-buildpackage: host architecture amd64
 dpkg-source --before-build prometheus-haproxy-exporter
 fakeroot debian/rules clean
dh clean --buildsystem=golang --with=golang
   dh_testdir -O--buildsystem=golang
   dh_auto_clean -O--buildsystem=golang
   dh_autoreconf_clean -O--buildsystem=golang
   dh_clean -O--buildsystem=golang
 dpkg-source -b prometheus-haproxy-exporter
dpkg-source: info: using source format `3.0 (quilt)'
dpkg-source: info: building prometheus-haproxy-exporter using existing ./prometheus-haproxy-exporter_0.9.0.orig.tar.gz
dpkg-source: info: building prometheus-haproxy-exporter in prometheus-haproxy-exporter_0.9.0-1~bpo8+1.debian.tar.xz
dpkg-source: info: building prometheus-haproxy-exporter in prometheus-haproxy-exporter_0.9.0-1~bpo8+1.dsc
 debian/rules build
dh build --buildsystem=golang --with=golang
   dh_testdir -O--buildsystem=golang
   dh_update_autotools_config -O--buildsystem=golang
   dh_autoreconf -O--buildsystem=golang
   dh_auto_configure -O--buildsystem=golang
   dh_auto_build -O--buildsystem=golang
	go install -v -p 1 github.com/prometheus/haproxy_exporter
github.com/beorn7/perks/quantile
github.com/golang/protobuf/proto
github.com/prometheus/client_model/go
github.com/matttproud/golang_protobuf_extensions/pbutil
github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg
github.com/prometheus/common/model
github.com/prometheus/common/expfmt
github.com/prometheus/procfs
github.com/prometheus/client_golang/prometheus
github.com/Sirupsen/logrus
github.com/prometheus/common/log
github.com/prometheus/common/version
github.com/alecthomas/units
gopkg.in/alecthomas/kingpin.v2
github.com/prometheus/haproxy_exporter
# github.com/prometheus/haproxy_exporter
src/github.com/prometheus/haproxy_exporter/haproxy_exporter.go:485: cannot use kingpin.CommandLine (type *kingpin.Application) as type *flag.FlagSet in argument to "github.com/prometheus/common/log".AddFlags
dh_auto_build: go install -v -p 1 github.com/prometheus/haproxy_exporter returned exit code 2
debian/rules:6: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
gilles@packaging:~/prometheus-haproxy-exporter

Seems like the culprit is kingpin. Looking at the versions used in prometheus-haproxy-exporter: https://github.com/prometheus/haproxy_exporter/blob/0cae8ee3e3f3b7c517db2cc68f386672d8b1b6a7/vendor/vendor.json it points to this commit: https://github.com/alecthomas/kingpin/commit/1087e65c9441605df944fb12c33f0fe7072d18ca which shows the earliest version of kingpin it's part of is 2.2.5. Jessie-backports is currently on 2.2.3...

Seems like the next logical step is to backport a more recent version of kingpin to Jessie and see if it helps.

Backported kingpin 2.2.6 and I still get the same error. I have a feeling this might be an issue of Go being too old on jessie-backports... It's 1.7 there and the Travis CI configuration for prometheus-haproxy-exporter uses 1.9

Next option is to fix the actual error, I guess, on that line: https://github.com/prometheus/haproxy_exporter/blob/v0.9.0/haproxy_exporter.go#L485

The docs suggest that this is a fairly standard call, though:

https://godoc.org/github.com/prometheus/common/log#AddFlags

Maybe it's that library that's too old? The version available in jessie-backports is from 2016:

https://packages.debian.org/jessie-backports/golang-github-prometheus-common-dev

Sure enough, going back to the Debian version of that library, it explains the error:

https://github.com/prometheus/common/blob/85637ea67b04b5c3bb25e671dacded2977f8f9f6/log/log.go#L117

Let's try to backport a more recent version of this library to Jessie, then...

For the sid version golang-github-prometheus-common to be backported, the following need backporting as well:

golang-github-opentracing-opentracing-go-dev
golang-github-go-stack-stack-dev
golang-github-go-logfmt-logfmt-dev
golang-github-dgrijalva-jwt-go-v3-dev

golang-github-go-kit-kit-dev
golang-github-mwitkow-go-conntrack-dev
golang-github-sirupsen-logrus-dev (>= 1.0.2)
golang-yaml.v2-dev (>= 2.2.1)

Gilles added a comment.EditedSep 13 2018, 6:33 PM

Currently stuck on golang-github-go-kit-kit-dev. Got all its dependencies backported or installed, and then:

github.com/go-kit/kit/transport/grpc
# github.com/go-kit/kit/transport/grpc
src/github.com/go-kit/kit/transport/grpc/client.go:94: undefined: metadata.NewOutgoingContext
src/github.com/go-kit/kit/transport/grpc/server.go:76: undefined: metadata.FromIncomingContext
github.com/go-kit/kit/log/deprecated_levels
github.com/go-kit/kit/log/level
github.com/go-kit/kit/log/term
github.com/go-kit/kit/tracing
github.com/opentracing/opentracing-go/log
github.com/opentracing/opentracing-go
github.com/opentracing/opentracing-go/ext
github.com/go-kit/kit/tracing/opentracing
github.com/go-kit/kit/transport
github.com/go-kit/kit/transport/httprp
github.com/go-kit/kit/util/conn
	cd /home/gilles/golang-github-go-kit-kit
dh_auto_build: go install -v -p 1 github.com/go-kit/kit/auth/basic github.com/go-kit/kit/auth/jwt github.com/go-kit/kit/endpoint github.com/go-kit/kit/log github.com/go-kit/kit/log/deprecated_levels github.com/go-kit/kit/log/level github.com/go-kit/kit/log/term github.com/go-kit/kit/tracing github.com/go-kit/kit/tracing/opentracing github.com/go-kit/kit/transport github.com/go-kit/kit/transport/grpc github.com/go-kit/kit/transport/http github.com/go-kit/kit/transport/httprp github.com/go-kit/kit/util/conn returned exit code 2
debian/rules:16: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
gilles@packaging:~/golang-github-go-kit-kit$

Which might suggest an issue with github.com/go-kit/kit/transport/grpc ?

Offending line: https://github.com/go-kit/kit/blob/v0.6.0/transport/grpc/client.go#L94

Which is something defined in the google.golang.org/grpc/metadata package

golang-google-grpc-dev from jessie-backports is probably too old. Let's try to backport that too...

The list keeps growing:

golang-golang-x-net-dev (>= 1:0.0+git20170629)
protobuf-compiler (>= 3.0.0~)

And the rabbit hole continues on golang-golang-x-net-dev:

golang.org/x/net/http/httpproxy
# golang.org/x/net/http/httpproxy
src/golang.org/x/net/http/httpproxy/proxy.go:201: url.Hostname undefined (type *url.URL has no field or method Hostname)
src/golang.org/x/net/http/httpproxy/proxy.go:205: url.Port undefined (type *url.URL has no field or method Port)

Pointing to https://github.com/golang/net/blob/0ed95abb35c445290478a5348a7b38bb154135fd/http/httpproxy/proxy.go#L201

At that point I'm getting a bit lost, though, because the import seems to be from the same package:

https://github.com/golang/net/blob/0ed95abb35c445290478a5348a7b38bb154135fd/http/httpproxy/proxy.go#L17

Sadly said "url" class is part of go itself. And this functionality was added in Go 1.8:

https://github.com/golang/go/commit/1ff19201fd898c3e1a0ed5d3458c81c1f062570b

jessie-backports has, of course, 1.7.

At this point my only hope is to backport a less recent version of golang-golang-x-net-dev, the one I was currently trying was the sid version, 1:0.0+git20180124.0ed95ab+dfsg-2. Sigh...

It worked, yay.

now protobuf-compiler is actually coming from the protobuf source package... not a small thing to backport. I tried anyway, and ran into its use of an option only available in gcc 6+. Jessie is on 4.9.2...

echo "TEST(NoWarningTest, Empty) {}" >> no_warning_test.cc
g++ -DHAVE_CONFIG_H -I. -I..  -I./../gmock/gtest/include -D_FORTIFY_SOURCE=2 -pthread -DHAVE_PTHREAD=1 -DHAVE_ZLIB=1 -Wall -Werror -Wno-error=misleading-indentation -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -c -o no_warning_test-no_warning_test.o `test -f 'no_warning_test.cc' || echo './'`no_warning_test.cc
cc1plus: error: -Werror=misleading-indentation: no option -Wmisleading-indentation
Makefile:3878: recipe for target 'no_warning_test-no_warning_test.o' failed

This is discussed here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835337

The error actually seems to be coming from a patch in the Debian package. I'll try to get rid of it or tweak it.

Undoing the patch that adds the gcc6 option -Wno-error=misleading-indentation worked and allowed me to backport protobuf 3.0.0!

Now back to trying to backport golang-google-grpc I get:

# google.golang.org/grpc/transport
src/google.golang.org/grpc/transport/http_util.go:486: f.fr.SetReuseFrames undefined (type *http2.Framer has no field or method SetReuseFrames)

Offending lines:

	f.fr = http2.NewFramer(f.writer, f.reader)
	// Opt-in to Frame reuse API on framer to reduce garbage.
	// Frames aren't safe to read from after a subsequent call to ReadFrame.
	f.fr.SetReuseFrames()

Which in turns sounds like an outdated golang.org/x/net/http2. The problem I'm having is that I backported golang-go.net-dev to get the right version (not too recent) and it this package is expecting golang-golang-x-net-dev. They're the same code, I think, just the package has been migrated to a new name for some reason.

Nevermind, the source package actually builds both. Back on track...

At first glance, I've managed to backport everything. Now I'll need to actually test the program to see if it runs properly...

I've uploaded the motherload here: https://github.com/gi11es/prometheus-haproxy-exporter-jessie-backports

Gilles reassigned this task from Gilles to fgiunchedi.Sep 17 2018, 8:38 AM

Tested it on WMCS and it works:

gilles@packaging:~$ haproxy_exporter --haproxy.scrape-uri="http://localhost:8020/?stats;csv"
INFO[0000] Starting haproxy_exporter (version=, branch=, revision=)  source="haproxy_exporter.go:495"
INFO[0000] Build context (go=go1.7.4, user=, date=)      source="haproxy_exporter.go:496"
INFO[0000] Listening on :9101                            source="haproxy_exporter.go:521"
gilles@packaging:~$ curl http://localhost:9101/metrics
# HELP go_gc_duration_seconds A summary of the GC invocation durations.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 0
go_gc_duration_seconds{quantile="0.25"} 0
go_gc_duration_seconds{quantile="0.5"} 0
go_gc_duration_seconds{quantile="0.75"} 0
go_gc_duration_seconds{quantile="1"} 0
go_gc_duration_seconds_sum 0
go_gc_duration_seconds_count 0
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
go_goroutines 14
# HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.
# TYPE go_memstats_alloc_bytes gauge
go_memstats_alloc_bytes 1.43392e+06
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed.
# TYPE go_memstats_alloc_bytes_total counter
go_memstats_alloc_bytes_total 1.43392e+06
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table.
# TYPE go_memstats_buck_hash_sys_bytes gauge
go_memstats_buck_hash_sys_bytes 1.443394e+06
# HELP go_memstats_frees_total Total number of frees.
# TYPE go_memstats_frees_total counter
go_memstats_frees_total 1199
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata.
# TYPE go_memstats_gc_sys_bytes gauge
go_memstats_gc_sys_bytes 163840
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and still in use.
# TYPE go_memstats_heap_alloc_bytes gauge
go_memstats_heap_alloc_bytes 1.43392e+06
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used.
# TYPE go_memstats_heap_idle_bytes gauge
go_memstats_heap_idle_bytes 843776
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use.
# TYPE go_memstats_heap_inuse_bytes gauge
go_memstats_heap_inuse_bytes 1.974272e+06
# HELP go_memstats_heap_objects Number of allocated objects.
# TYPE go_memstats_heap_objects gauge
go_memstats_heap_objects 11896
# HELP go_memstats_heap_released_bytes_total Total number of heap bytes released to OS.
# TYPE go_memstats_heap_released_bytes_total counter
go_memstats_heap_released_bytes_total 0
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system.
# TYPE go_memstats_heap_sys_bytes gauge
go_memstats_heap_sys_bytes 2.818048e+06
# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.
# TYPE go_memstats_last_gc_time_seconds gauge
go_memstats_last_gc_time_seconds 0
# HELP go_memstats_lookups_total Total number of pointer lookups.
# TYPE go_memstats_lookups_total counter
go_memstats_lookups_total 31
# HELP go_memstats_mallocs_total Total number of mallocs.
# TYPE go_memstats_mallocs_total counter
go_memstats_mallocs_total 13095
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures.
# TYPE go_memstats_mcache_inuse_bytes gauge
go_memstats_mcache_inuse_bytes 2400
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system.
# TYPE go_memstats_mcache_sys_bytes gauge
go_memstats_mcache_sys_bytes 16384
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures.
# TYPE go_memstats_mspan_inuse_bytes gauge
go_memstats_mspan_inuse_bytes 28160
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system.
# TYPE go_memstats_mspan_sys_bytes gauge
go_memstats_mspan_sys_bytes 32768
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place.
# TYPE go_memstats_next_gc_bytes gauge
go_memstats_next_gc_bytes 4.194304e+06
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations.
# TYPE go_memstats_other_sys_bytes gauge
go_memstats_other_sys_bytes 803510
# HELP go_memstats_stack_inuse_bytes Number of bytes in use by the stack allocator.
# TYPE go_memstats_stack_inuse_bytes gauge
go_memstats_stack_inuse_bytes 327680
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator.
# TYPE go_memstats_stack_sys_bytes gauge
go_memstats_stack_sys_bytes 327680
# HELP go_memstats_sys_bytes Number of bytes obtained by system. Sum of all system allocations.
# TYPE go_memstats_sys_bytes gauge
go_memstats_sys_bytes 5.605624e+06
# HELP haproxy_backend_bytes_in_total Current total of incoming bytes.
# TYPE haproxy_backend_bytes_in_total gauge
haproxy_backend_bytes_in_total{backend="nodes"} 2383
haproxy_backend_bytes_in_total{backend="stats"} 261
# HELP haproxy_backend_bytes_out_total Current total of outgoing bytes.
# TYPE haproxy_backend_bytes_out_total gauge
haproxy_backend_bytes_out_total{backend="nodes"} 94137
haproxy_backend_bytes_out_total{backend="stats"} 34632
# HELP haproxy_backend_connection_errors_total Total of connection errors.
# TYPE haproxy_backend_connection_errors_total gauge
haproxy_backend_connection_errors_total{backend="nodes"} 0
haproxy_backend_connection_errors_total{backend="stats"} 0
# HELP haproxy_backend_current_queue Current number of queued requests not assigned to any server.
# TYPE haproxy_backend_current_queue gauge
haproxy_backend_current_queue{backend="nodes"} 0
haproxy_backend_current_queue{backend="stats"} 0
# HELP haproxy_backend_current_server Current number of active servers
# TYPE haproxy_backend_current_server gauge
haproxy_backend_current_server{backend="nodes"} 1
haproxy_backend_current_server{backend="stats"} 0
# HELP haproxy_backend_current_session_rate Current number of sessions per second over last elapsed second.
# TYPE haproxy_backend_current_session_rate gauge
haproxy_backend_current_session_rate{backend="nodes"} 0
haproxy_backend_current_session_rate{backend="stats"} 0
# HELP haproxy_backend_current_sessions Current number of active sessions.
# TYPE haproxy_backend_current_sessions gauge
haproxy_backend_current_sessions{backend="nodes"} 0
haproxy_backend_current_sessions{backend="stats"} 0
# HELP haproxy_backend_http_connect_time_average_seconds Avg. HTTP connect time for last 1024 successful connections.
# TYPE haproxy_backend_http_connect_time_average_seconds gauge
haproxy_backend_http_connect_time_average_seconds{backend="nodes"} 0
haproxy_backend_http_connect_time_average_seconds{backend="stats"} 0
# HELP haproxy_backend_http_queue_time_average_seconds Avg. HTTP queue time for last 1024 successful connections.
# TYPE haproxy_backend_http_queue_time_average_seconds gauge
haproxy_backend_http_queue_time_average_seconds{backend="nodes"} 0
haproxy_backend_http_queue_time_average_seconds{backend="stats"} 0
# HELP haproxy_backend_http_response_time_average_seconds Avg. HTTP response time for last 1024 successful connections.
# TYPE haproxy_backend_http_response_time_average_seconds gauge
haproxy_backend_http_response_time_average_seconds{backend="nodes"} 0.001
haproxy_backend_http_response_time_average_seconds{backend="stats"} 0
# HELP haproxy_backend_http_responses_total Total of HTTP responses.
# TYPE haproxy_backend_http_responses_total gauge
haproxy_backend_http_responses_total{backend="nodes",code="1xx"} 0
haproxy_backend_http_responses_total{backend="nodes",code="2xx"} 9
haproxy_backend_http_responses_total{backend="nodes",code="3xx"} 9
haproxy_backend_http_responses_total{backend="nodes",code="4xx"} 1
haproxy_backend_http_responses_total{backend="nodes",code="5xx"} 0
haproxy_backend_http_responses_total{backend="nodes",code="other"} 0
haproxy_backend_http_responses_total{backend="stats",code="1xx"} 0
haproxy_backend_http_responses_total{backend="stats",code="2xx"} 0
haproxy_backend_http_responses_total{backend="stats",code="3xx"} 0
haproxy_backend_http_responses_total{backend="stats",code="4xx"} 0
haproxy_backend_http_responses_total{backend="stats",code="5xx"} 0
haproxy_backend_http_responses_total{backend="stats",code="other"} 0
# HELP haproxy_backend_http_total_time_average_seconds Avg. HTTP total time for last 1024 successful connections.
# TYPE haproxy_backend_http_total_time_average_seconds gauge
haproxy_backend_http_total_time_average_seconds{backend="nodes"} 0.025
haproxy_backend_http_total_time_average_seconds{backend="stats"} 0
# HELP haproxy_backend_limit_sessions Configured session limit.
# TYPE haproxy_backend_limit_sessions gauge
haproxy_backend_limit_sessions{backend="nodes"} 200
haproxy_backend_limit_sessions{backend="stats"} 200
# HELP haproxy_backend_max_queue Maximum observed number of queued requests not assigned to any server.
# TYPE haproxy_backend_max_queue gauge
haproxy_backend_max_queue{backend="nodes"} 0
haproxy_backend_max_queue{backend="stats"} 0
# HELP haproxy_backend_max_session_rate Maximum number of sessions per second.
# TYPE haproxy_backend_max_session_rate gauge
haproxy_backend_max_session_rate{backend="nodes"} 2
haproxy_backend_max_session_rate{backend="stats"} 0
# HELP haproxy_backend_max_sessions Maximum observed number of active sessions.
# TYPE haproxy_backend_max_sessions gauge
haproxy_backend_max_sessions{backend="nodes"} 1
haproxy_backend_max_sessions{backend="stats"} 0
# HELP haproxy_backend_redispatch_warnings_total Total of redispatch warnings.
# TYPE haproxy_backend_redispatch_warnings_total gauge
haproxy_backend_redispatch_warnings_total{backend="nodes"} 0
haproxy_backend_redispatch_warnings_total{backend="stats"} 0
# HELP haproxy_backend_response_errors_total Total of response errors.
# TYPE haproxy_backend_response_errors_total gauge
haproxy_backend_response_errors_total{backend="nodes"} 0
haproxy_backend_response_errors_total{backend="stats"} 0
# HELP haproxy_backend_retry_warnings_total Total of retry warnings.
# TYPE haproxy_backend_retry_warnings_total gauge
haproxy_backend_retry_warnings_total{backend="nodes"} 0
haproxy_backend_retry_warnings_total{backend="stats"} 0
# HELP haproxy_backend_sessions_total Total number of sessions.
# TYPE haproxy_backend_sessions_total gauge
haproxy_backend_sessions_total{backend="nodes"} 19
haproxy_backend_sessions_total{backend="stats"} 0
# HELP haproxy_backend_up Current health status of the backend (1 = UP, 0 = DOWN).
# TYPE haproxy_backend_up gauge
haproxy_backend_up{backend="nodes"} 1
haproxy_backend_up{backend="stats"} 1
# HELP haproxy_backend_weight Total weight of the servers in the backend.
# TYPE haproxy_backend_weight gauge
haproxy_backend_weight{backend="nodes"} 1
haproxy_backend_weight{backend="stats"} 0
# HELP haproxy_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, and goversion from which haproxy_exporter was built.
# TYPE haproxy_exporter_build_info gauge
haproxy_exporter_build_info{branch="",goversion="go1.7.4",revision="",version=""} 1
# HELP haproxy_exporter_csv_parse_failures Number of errors while parsing CSV.
# TYPE haproxy_exporter_csv_parse_failures counter
haproxy_exporter_csv_parse_failures 0
# HELP haproxy_exporter_total_scrapes Current total HAProxy scrapes.
# TYPE haproxy_exporter_total_scrapes counter
haproxy_exporter_total_scrapes 2
# HELP haproxy_frontend_bytes_in_total Current total of incoming bytes.
# TYPE haproxy_frontend_bytes_in_total gauge
haproxy_frontend_bytes_in_total{frontend="localnodes"} 2383
haproxy_frontend_bytes_in_total{frontend="stats"} 261
# HELP haproxy_frontend_bytes_out_total Current total of outgoing bytes.
# TYPE haproxy_frontend_bytes_out_total gauge
haproxy_frontend_bytes_out_total{frontend="localnodes"} 94324
haproxy_frontend_bytes_out_total{frontend="stats"} 34632
# HELP haproxy_frontend_current_session_rate Current number of sessions per second over last elapsed second.
# TYPE haproxy_frontend_current_session_rate gauge
haproxy_frontend_current_session_rate{frontend="localnodes"} 0
haproxy_frontend_current_session_rate{frontend="stats"} 0
# HELP haproxy_frontend_current_sessions Current number of active sessions.
# TYPE haproxy_frontend_current_sessions gauge
haproxy_frontend_current_sessions{frontend="localnodes"} 0
haproxy_frontend_current_sessions{frontend="stats"} 1
# HELP haproxy_frontend_http_requests_total Total HTTP requests.
# TYPE haproxy_frontend_http_requests_total gauge
haproxy_frontend_http_requests_total{frontend="localnodes"} 20
haproxy_frontend_http_requests_total{frontend="stats"} 4
# HELP haproxy_frontend_http_responses_total Total of HTTP responses.
# TYPE haproxy_frontend_http_responses_total gauge
haproxy_frontend_http_responses_total{code="1xx",frontend="localnodes"} 0
haproxy_frontend_http_responses_total{code="1xx",frontend="stats"} 0
haproxy_frontend_http_responses_total{code="2xx",frontend="localnodes"} 9
haproxy_frontend_http_responses_total{code="2xx",frontend="stats"} 3
haproxy_frontend_http_responses_total{code="3xx",frontend="localnodes"} 9
haproxy_frontend_http_responses_total{code="3xx",frontend="stats"} 0
haproxy_frontend_http_responses_total{code="4xx",frontend="localnodes"} 2
haproxy_frontend_http_responses_total{code="4xx",frontend="stats"} 0
haproxy_frontend_http_responses_total{code="5xx",frontend="localnodes"} 0
haproxy_frontend_http_responses_total{code="other",frontend="localnodes"} 0
# HELP haproxy_frontend_limit_session_rate Configured limit on new sessions per second.
# TYPE haproxy_frontend_limit_session_rate gauge
haproxy_frontend_limit_session_rate{frontend="localnodes"} 0
haproxy_frontend_limit_session_rate{frontend="stats"} 0
# HELP haproxy_frontend_limit_sessions Configured session limit.
# TYPE haproxy_frontend_limit_sessions gauge
haproxy_frontend_limit_sessions{frontend="localnodes"} 2000
haproxy_frontend_limit_sessions{frontend="stats"} 2000
# HELP haproxy_frontend_max_session_rate Maximum observed number of sessions per second.
# TYPE haproxy_frontend_max_session_rate gauge
haproxy_frontend_max_session_rate{frontend="localnodes"} 2
# HELP haproxy_frontend_max_sessions Maximum observed number of active sessions.
# TYPE haproxy_frontend_max_sessions gauge
haproxy_frontend_max_sessions{frontend="localnodes"} 3
haproxy_frontend_max_sessions{frontend="stats"} 1
# HELP haproxy_frontend_request_errors_total Total of request errors.
# TYPE haproxy_frontend_request_errors_total gauge
haproxy_frontend_request_errors_total{frontend="localnodes"} 1
haproxy_frontend_request_errors_total{frontend="stats"} 0
# HELP haproxy_frontend_requests_denied_total Total of requests denied for security.
# TYPE haproxy_frontend_requests_denied_total gauge
haproxy_frontend_requests_denied_total{frontend="localnodes"} 0
haproxy_frontend_requests_denied_total{frontend="stats"} 0
# HELP haproxy_frontend_sessions_total Total number of sessions.
# TYPE haproxy_frontend_sessions_total gauge
haproxy_frontend_sessions_total{frontend="localnodes"} 18
haproxy_frontend_sessions_total{frontend="stats"} 3
# HELP haproxy_server_bytes_in_total Current total of incoming bytes.
# TYPE haproxy_server_bytes_in_total gauge
haproxy_server_bytes_in_total{backend="nodes",server="web01"} 2383
# HELP haproxy_server_bytes_out_total Current total of outgoing bytes.
# TYPE haproxy_server_bytes_out_total gauge
haproxy_server_bytes_out_total{backend="nodes",server="web01"} 94137
# HELP haproxy_server_check_duration_milliseconds Previously run health check duration, in milliseconds
# TYPE haproxy_server_check_duration_milliseconds gauge
haproxy_server_check_duration_milliseconds{backend="nodes",server="web01"} 0
# HELP haproxy_server_check_failures_total Total number of failed health checks.
# TYPE haproxy_server_check_failures_total gauge
haproxy_server_check_failures_total{backend="nodes",server="web01"} 0
# HELP haproxy_server_connection_errors_total Total of connection errors.
# TYPE haproxy_server_connection_errors_total gauge
haproxy_server_connection_errors_total{backend="nodes",server="web01"} 0
# HELP haproxy_server_current_queue Current number of queued requests assigned to this server.
# TYPE haproxy_server_current_queue gauge
haproxy_server_current_queue{backend="nodes",server="web01"} 0
# HELP haproxy_server_current_session_rate Current number of sessions per second over last elapsed second.
# TYPE haproxy_server_current_session_rate gauge
haproxy_server_current_session_rate{backend="nodes",server="web01"} 0
# HELP haproxy_server_current_sessions Current number of active sessions.
# TYPE haproxy_server_current_sessions gauge
haproxy_server_current_sessions{backend="nodes",server="web01"} 0
# HELP haproxy_server_downtime_seconds_total Total downtime in seconds.
# TYPE haproxy_server_downtime_seconds_total gauge
haproxy_server_downtime_seconds_total{backend="nodes",server="web01"} 0
# HELP haproxy_server_http_responses_total Total of HTTP responses.
# TYPE haproxy_server_http_responses_total gauge
haproxy_server_http_responses_total{backend="nodes",code="1xx",server="web01"} 0
haproxy_server_http_responses_total{backend="nodes",code="2xx",server="web01"} 9
haproxy_server_http_responses_total{backend="nodes",code="3xx",server="web01"} 9
haproxy_server_http_responses_total{backend="nodes",code="4xx",server="web01"} 1
haproxy_server_http_responses_total{backend="nodes",code="5xx",server="web01"} 0
haproxy_server_http_responses_total{backend="nodes",code="other",server="web01"} 0
# HELP haproxy_server_max_queue Maximum observed number of queued requests assigned to this server.
# TYPE haproxy_server_max_queue gauge
haproxy_server_max_queue{backend="nodes",server="web01"} 0
# HELP haproxy_server_max_session_rate Maximum observed number of sessions per second.
# TYPE haproxy_server_max_session_rate gauge
haproxy_server_max_session_rate{backend="nodes",server="web01"} 2
# HELP haproxy_server_max_sessions Maximum observed number of active sessions.
# TYPE haproxy_server_max_sessions gauge
haproxy_server_max_sessions{backend="nodes",server="web01"} 1
# HELP haproxy_server_redispatch_warnings_total Total of redispatch warnings.
# TYPE haproxy_server_redispatch_warnings_total gauge
haproxy_server_redispatch_warnings_total{backend="nodes",server="web01"} 0
# HELP haproxy_server_response_errors_total Total of response errors.
# TYPE haproxy_server_response_errors_total gauge
haproxy_server_response_errors_total{backend="nodes",server="web01"} 0
# HELP haproxy_server_retry_warnings_total Total of retry warnings.
# TYPE haproxy_server_retry_warnings_total gauge
haproxy_server_retry_warnings_total{backend="nodes",server="web01"} 0
# HELP haproxy_server_sessions_total Total number of sessions.
# TYPE haproxy_server_sessions_total gauge
haproxy_server_sessions_total{backend="nodes",server="web01"} 19
# HELP haproxy_server_up Current health status of the server (1 = UP, 0 = DOWN).
# TYPE haproxy_server_up gauge
haproxy_server_up{backend="nodes",server="web01"} 1
# HELP haproxy_server_weight Current weight of the server.
# TYPE haproxy_server_weight gauge
haproxy_server_weight{backend="nodes",server="web01"} 1
# HELP haproxy_up Was the last scrape of haproxy successful.
# TYPE haproxy_up gauge
haproxy_up 1
# HELP http_request_duration_microseconds The HTTP request latencies in microseconds.
# TYPE http_request_duration_microseconds summary
http_request_duration_microseconds{handler="prometheus",quantile="0.5"} 3828.217
http_request_duration_microseconds{handler="prometheus",quantile="0.9"} 3828.217
http_request_duration_microseconds{handler="prometheus",quantile="0.99"} 3828.217
http_request_duration_microseconds_sum{handler="prometheus"} 3828.217
http_request_duration_microseconds_count{handler="prometheus"} 1
# HELP http_request_size_bytes The HTTP request sizes in bytes.
# TYPE http_request_size_bytes summary
http_request_size_bytes{handler="prometheus",quantile="0.5"} 63
http_request_size_bytes{handler="prometheus",quantile="0.9"} 63
http_request_size_bytes{handler="prometheus",quantile="0.99"} 63
http_request_size_bytes_sum{handler="prometheus"} 63
http_request_size_bytes_count{handler="prometheus"} 1
# HELP http_requests_total Total number of HTTP requests made.
# TYPE http_requests_total counter
http_requests_total{code="200",handler="prometheus",method="get"} 1
# HELP http_response_size_bytes The HTTP response sizes in bytes.
# TYPE http_response_size_bytes summary
http_response_size_bytes{handler="prometheus",quantile="0.5"} 21027
http_response_size_bytes{handler="prometheus",quantile="0.9"} 21027
http_response_size_bytes{handler="prometheus",quantile="0.99"} 21027
http_response_size_bytes_sum{handler="prometheus"} 21027
http_response_size_bytes_count{handler="prometheus"} 1
# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
# TYPE process_cpu_seconds_total counter
process_cpu_seconds_total 0.01
# HELP process_max_fds Maximum number of open file descriptors.
# TYPE process_max_fds gauge
process_max_fds 65536
# HELP process_open_fds Number of open file descriptors.
# TYPE process_open_fds gauge
process_open_fds 8
# HELP process_resident_memory_bytes Resident memory size in bytes.
# TYPE process_resident_memory_bytes gauge
process_resident_memory_bytes 7.880704e+06
# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.
# TYPE process_start_time_seconds gauge
process_start_time_seconds 1.53717341979e+09
# HELP process_virtual_memory_bytes Virtual memory size in bytes.
# TYPE process_virtual_memory_bytes gauge
process_virtual_memory_bytes 1.19496704e+08

@fgiunchedi you can now add all these Debian packages to our repos: https://github.com/gi11es/prometheus-haproxy-exporter-jessie-backports

Gilles moved this task from Inbox to Doing on the Performance-Team board.Sep 17 2018, 8:11 PM
fgiunchedi moved this task from Backlog to Doing on the User-fgiunchedi board.Sep 18 2018, 3:42 PM
fgiunchedi closed this task as Resolved.Sep 19 2018, 8:44 AM

Thanks for your help @Gilles ! I've uploaded prometheus-haproxy-exporter 0.9.0-1~bpo8+1 internally