Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Adding Missing Metrics #132

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions haproxy_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ var (
18: newServerMetric("weight", "Current weight of the server.", nil),
21: newServerMetric("check_failures_total", "Total number of failed health checks.", nil),
24: newServerMetric("downtime_seconds_total", "Total downtime in seconds.", nil),
30: newServerMetric("server_selected_total", "Total number of times a server was selected, either for new sessions, or when re-dispatching.", nil),
33: newServerMetric("current_session_rate", "Current number of sessions per second over last elapsed second.", nil),
35: newServerMetric("max_session_rate", "Maximum observed number of sessions per second.", nil),
38: newServerMetric("check_duration_milliseconds", "Previously run health check duration, in milliseconds", nil),
Expand Down Expand Up @@ -137,6 +138,10 @@ var (
43: newFrontendMetric("http_responses_total", "Total of HTTP responses.", prometheus.Labels{"code": "5xx"}),
44: newFrontendMetric("http_responses_total", "Total of HTTP responses.", prometheus.Labels{"code": "other"}),
48: newFrontendMetric("http_requests_total", "Total HTTP requests.", nil),
51: newFrontendMetric("compressor_bytes_in_total", "Number of HTTP response bytes fed to the compressor", nil),
52: newFrontendMetric("compressor_bytes_out_total", "Number of HTTP response bytes emitted by the compressor", nil),
53: newFrontendMetric("compressor_bytes_bypassed_total", "Number of bytes that bypassed the HTTP compressor", nil),
54: newFrontendMetric("http_responses_compressed_total", "Number of HTTP responses that were compressed", nil),
79: newFrontendMetric("connections_total", "Total number of connections", nil),
}
backendMetrics = metrics{
Expand All @@ -155,6 +160,7 @@ var (
17: newBackendMetric("up", "Current health status of the backend (1 = UP, 0 = DOWN).", nil),
18: newBackendMetric("weight", "Total weight of the servers in the backend.", nil),
19: newBackendMetric("current_server", "Current number of active servers", nil),
30: newBackendMetric("server_selected_total", "Total number of times a server was selected, either for new sessions, or when re-dispatching.", nil),
33: newBackendMetric("current_session_rate", "Current number of sessions per second over last elapsed second.", nil),
35: newBackendMetric("max_session_rate", "Maximum number of sessions per second.", nil),
39: newBackendMetric("http_responses_total", "Total of HTTP responses.", prometheus.Labels{"code": "1xx"}),
Expand All @@ -163,6 +169,10 @@ var (
42: newBackendMetric("http_responses_total", "Total of HTTP responses.", prometheus.Labels{"code": "4xx"}),
43: newBackendMetric("http_responses_total", "Total of HTTP responses.", prometheus.Labels{"code": "5xx"}),
44: newBackendMetric("http_responses_total", "Total of HTTP responses.", prometheus.Labels{"code": "other"}),
51: newBackendMetric("compressor_bytes_in_total", "Number of HTTP response bytes fed to the compressor", nil),
52: newBackendMetric("compressor_bytes_out_total", "Number of HTTP response bytes emitted by the compressor", nil),
53: newBackendMetric("compressor_bytes_bypassed_total", "Number of bytes that bypassed the HTTP compressor", nil),
54: newBackendMetric("http_responses_compressed_total", "Number of HTTP responses that were compressed", nil),
58: newBackendMetric("http_queue_time_average_seconds", "Avg. HTTP queue time for last 1024 successful connections.", nil),
59: newBackendMetric("http_connect_time_average_seconds", "Avg. HTTP connect time for last 1024 successful connections.", nil),
60: newBackendMetric("http_response_time_average_seconds", "Avg. HTTP response time for last 1024 successful connections.", nil),
Expand Down