Add HTTP 5xx stats to HAProxy plugin. Closes #194
This commit is contained in:
parent
aac9ba6c1e
commit
311c14f9e7
|
@ -245,6 +245,11 @@ func importCsvResult(r io.Reader, acc plugins.Accumulator, host string) ([][]str
|
||||||
if err == nil {
|
if err == nil {
|
||||||
acc.Add("http_response.4xx", ival, tags)
|
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:
|
case HF_EREQ:
|
||||||
ival, err := strconv.ParseUint(v, 10, 64)
|
ival, err := strconv.ParseUint(v, 10, 64)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
|
|
@ -60,6 +60,7 @@ func TestHaproxyGeneratesMetricsWithAuthentication(t *testing.T) {
|
||||||
{"http_response.2xx", 1314093},
|
{"http_response.2xx", 1314093},
|
||||||
{"http_response.3xx", 537036},
|
{"http_response.3xx", 537036},
|
||||||
{"http_response.4xx", 123452},
|
{"http_response.4xx", 123452},
|
||||||
|
{"http_response.5xx", 11966},
|
||||||
{"dreq", 1102},
|
{"dreq", 1102},
|
||||||
{"dresp", 80},
|
{"dresp", 80},
|
||||||
{"wretr", 17},
|
{"wretr", 17},
|
||||||
|
|
Loading…
Reference in New Issue