Updated haproxy_test.go to reflect CSV field names.
This commit is contained in:
parent
53caeca645
commit
ccb521b422
|
@ -73,36 +73,41 @@ func TestHaproxyGeneratesMetricsWithAuthentication(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fields := map[string]interface{}{
|
fields := map[string]interface{}{
|
||||||
"active_servers": uint64(1),
|
"act": uint64(1),
|
||||||
"backup_servers": uint64(0),
|
"bck": uint64(0),
|
||||||
"bin": uint64(510913516),
|
"bin": uint64(510913516),
|
||||||
"bout": uint64(2193856571),
|
"bout": uint64(2193856571),
|
||||||
"check_duration": uint64(10),
|
"check_duration": uint64(10),
|
||||||
"cli_abort": uint64(73),
|
"chkdown": uint64(0),
|
||||||
"ctime": uint64(2),
|
"chkfail": uint64(1),
|
||||||
"downtime": uint64(0),
|
"cli_abrt": uint64(73),
|
||||||
"dresp": uint64(0),
|
"ctime": uint64(2),
|
||||||
"econ": uint64(0),
|
"downtime": uint64(0),
|
||||||
"eresp": uint64(1),
|
"dresp": uint64(0),
|
||||||
"http_response.1xx": uint64(0),
|
"econ": uint64(0),
|
||||||
"http_response.2xx": uint64(119534),
|
"eresp": uint64(1),
|
||||||
"http_response.3xx": uint64(48051),
|
"hanafail": uint64(0),
|
||||||
"http_response.4xx": uint64(2345),
|
"hrsp_1xx": uint64(0),
|
||||||
"http_response.5xx": uint64(1056),
|
"hrsp_2xx": uint64(119534),
|
||||||
"lbtot": uint64(171013),
|
"hrsp_3xx": uint64(48051),
|
||||||
"qcur": uint64(0),
|
"hrsp_4xx": uint64(2345),
|
||||||
"qmax": uint64(0),
|
"hrsp_5xx": uint64(1056),
|
||||||
"qtime": uint64(0),
|
"hrsp_other": uint64(0),
|
||||||
"rate": uint64(3),
|
"lbtot": uint64(171013),
|
||||||
"rate_max": uint64(12),
|
"qcur": uint64(0),
|
||||||
"rtime": uint64(312),
|
"qmax": uint64(0),
|
||||||
"scur": uint64(1),
|
"qtime": uint64(0),
|
||||||
"smax": uint64(32),
|
"rate": uint64(3),
|
||||||
"srv_abort": uint64(1),
|
"rate_max": uint64(12),
|
||||||
"stot": uint64(171014),
|
"rtime": uint64(312),
|
||||||
"ttime": uint64(2341),
|
"scur": uint64(1),
|
||||||
"wredis": uint64(0),
|
"smax": uint64(32),
|
||||||
"wretr": uint64(1),
|
"srv_abrt": uint64(1),
|
||||||
|
"stot": uint64(171014),
|
||||||
|
"ttime": uint64(2341),
|
||||||
|
"weight": uint(100),
|
||||||
|
"wredis": uint64(0),
|
||||||
|
"wretr": uint64(1),
|
||||||
}
|
}
|
||||||
acc.AssertContainsTaggedFields(t, "haproxy", fields, tags)
|
acc.AssertContainsTaggedFields(t, "haproxy", fields, tags)
|
||||||
|
|
||||||
|
@ -137,36 +142,41 @@ func TestHaproxyGeneratesMetricsWithoutAuthentication(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fields := map[string]interface{}{
|
fields := map[string]interface{}{
|
||||||
"active_servers": uint64(1),
|
"act": uint64(1),
|
||||||
"backup_servers": uint64(0),
|
"bck": uint64(0),
|
||||||
"bin": uint64(510913516),
|
"bin": uint64(510913516),
|
||||||
"bout": uint64(2193856571),
|
"bout": uint64(2193856571),
|
||||||
"check_duration": uint64(10),
|
"check_duration": uint64(10),
|
||||||
"cli_abort": uint64(73),
|
"chkdown": uint64(0),
|
||||||
"ctime": uint64(2),
|
"chkfail": uint64(1),
|
||||||
"downtime": uint64(0),
|
"cli_abrt": uint64(73),
|
||||||
"dresp": uint64(0),
|
"ctime": uint64(2),
|
||||||
"econ": uint64(0),
|
"downtime": uint64(0),
|
||||||
"eresp": uint64(1),
|
"dresp": uint64(0),
|
||||||
"http_response.1xx": uint64(0),
|
"econ": uint64(0),
|
||||||
"http_response.2xx": uint64(119534),
|
"eresp": uint64(1),
|
||||||
"http_response.3xx": uint64(48051),
|
"hanafail": uint64(0),
|
||||||
"http_response.4xx": uint64(2345),
|
"hrsp_1xx": uint64(0),
|
||||||
"http_response.5xx": uint64(1056),
|
"hrsp_2xx": uint64(119534),
|
||||||
"lbtot": uint64(171013),
|
"hrsp_3xx": uint64(48051),
|
||||||
"qcur": uint64(0),
|
"hrsp_4xx": uint64(2345),
|
||||||
"qmax": uint64(0),
|
"hrsp_5xx": uint64(1056),
|
||||||
"qtime": uint64(0),
|
"hrsp_other": uint64(0),
|
||||||
"rate": uint64(3),
|
"lbtot": uint64(171013),
|
||||||
"rate_max": uint64(12),
|
"qcur": uint64(0),
|
||||||
"rtime": uint64(312),
|
"qmax": uint64(0),
|
||||||
"scur": uint64(1),
|
"qtime": uint64(0),
|
||||||
"smax": uint64(32),
|
"rate": uint64(3),
|
||||||
"srv_abort": uint64(1),
|
"rate_max": uint64(12),
|
||||||
"stot": uint64(171014),
|
"rtime": uint64(312),
|
||||||
"ttime": uint64(2341),
|
"scur": uint64(1),
|
||||||
"wredis": uint64(0),
|
"smax": uint64(32),
|
||||||
"wretr": uint64(1),
|
"srv_abrt": uint64(1),
|
||||||
|
"stot": uint64(171014),
|
||||||
|
"ttime": uint64(2341),
|
||||||
|
"weight": uint(100),
|
||||||
|
"wredis": uint64(0),
|
||||||
|
"wretr": uint64(1),
|
||||||
}
|
}
|
||||||
acc.AssertContainsTaggedFields(t, "haproxy", fields, tags)
|
acc.AssertContainsTaggedFields(t, "haproxy", fields, tags)
|
||||||
}
|
}
|
||||||
|
@ -200,36 +210,41 @@ func TestHaproxyGeneratesMetricsUsingSocket(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fields := map[string]interface{}{
|
fields := map[string]interface{}{
|
||||||
"active_servers": uint64(1),
|
"act": uint64(1),
|
||||||
"backup_servers": uint64(0),
|
"bck": uint64(0),
|
||||||
"bin": uint64(510913516),
|
"bin": uint64(510913516),
|
||||||
"bout": uint64(2193856571),
|
"bout": uint64(2193856571),
|
||||||
"check_duration": uint64(10),
|
"check_duration": uint64(10),
|
||||||
"cli_abort": uint64(73),
|
"chkdown": uint64(0),
|
||||||
"ctime": uint64(2),
|
"chkfail": uint64(1),
|
||||||
"downtime": uint64(0),
|
"cli_abrt": uint64(73),
|
||||||
"dresp": uint64(0),
|
"ctime": uint64(2),
|
||||||
"econ": uint64(0),
|
"downtime": uint64(0),
|
||||||
"eresp": uint64(1),
|
"dresp": uint64(0),
|
||||||
"http_response.1xx": uint64(0),
|
"econ": uint64(0),
|
||||||
"http_response.2xx": uint64(119534),
|
"eresp": uint64(1),
|
||||||
"http_response.3xx": uint64(48051),
|
"hanafail": uint64(0),
|
||||||
"http_response.4xx": uint64(2345),
|
"hrsp_1xx": uint64(0),
|
||||||
"http_response.5xx": uint64(1056),
|
"hrsp_2xx": uint64(119534),
|
||||||
"lbtot": uint64(171013),
|
"hrsp_3xx": uint64(48051),
|
||||||
"qcur": uint64(0),
|
"hrsp_4xx": uint64(2345),
|
||||||
"qmax": uint64(0),
|
"hrsp_5xx": uint64(1056),
|
||||||
"qtime": uint64(0),
|
"hrsp_other": uint64(0),
|
||||||
"rate": uint64(3),
|
"lbtot": uint64(171013),
|
||||||
"rate_max": uint64(12),
|
"qcur": uint64(0),
|
||||||
"rtime": uint64(312),
|
"qmax": uint64(0),
|
||||||
"scur": uint64(1),
|
"qtime": uint64(0),
|
||||||
"smax": uint64(32),
|
"rate": uint64(3),
|
||||||
"srv_abort": uint64(1),
|
"rate_max": uint64(12),
|
||||||
"stot": uint64(171014),
|
"rtime": uint64(312),
|
||||||
"ttime": uint64(2341),
|
"scur": uint64(1),
|
||||||
"wredis": uint64(0),
|
"smax": uint64(32),
|
||||||
"wretr": uint64(1),
|
"srv_abrt": uint64(1),
|
||||||
|
"stot": uint64(171014),
|
||||||
|
"ttime": uint64(2341),
|
||||||
|
"weight": uint(100),
|
||||||
|
"wredis": uint64(0),
|
||||||
|
"wretr": uint64(1),
|
||||||
}
|
}
|
||||||
acc.AssertContainsTaggedFields(t, "haproxy", fields, tags)
|
acc.AssertContainsTaggedFields(t, "haproxy", fields, tags)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue