diff --git a/plugins/haproxy/haproxy.go b/plugins/haproxy/haproxy.go index df03ecced..351b4a8e7 100644 --- a/plugins/haproxy/haproxy.go +++ b/plugins/haproxy/haproxy.go @@ -245,6 +245,11 @@ func importCsvResult(r io.Reader, acc plugins.Accumulator, host string) ([][]str if err == nil { acc.Add("http_response.4xx", ival, tags) } + case HF_HRSP_5xx: + ival, err := strconv.ParseUint(v, 10, 64) + if err == nil { + acc.Add("http_response.5xx", ival, tags) + } case HF_EREQ: ival, err := strconv.ParseUint(v, 10, 64) if err == nil { diff --git a/plugins/haproxy/haproxy_test.go b/plugins/haproxy/haproxy_test.go index b54f516c9..0d63985d4 100644 --- a/plugins/haproxy/haproxy_test.go +++ b/plugins/haproxy/haproxy_test.go @@ -60,6 +60,7 @@ func TestHaproxyGeneratesMetricsWithAuthentication(t *testing.T) { {"http_response.2xx", 1314093}, {"http_response.3xx", 537036}, {"http_response.4xx", 123452}, + {"http_response.5xx", 11966}, {"dreq", 1102}, {"dresp", 80}, {"wretr", 17},