From 61be28a10639959bcb558b980ef6a971519e1a97 Mon Sep 17 00:00:00 2001 From: Greg Linton Date: Wed, 11 May 2016 08:28:00 -0400 Subject: [PATCH] Added lastsess, and fixed weight. --- plugins/inputs/haproxy/haproxy_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/inputs/haproxy/haproxy_test.go b/plugins/inputs/haproxy/haproxy_test.go index 5568dcf9f..5063d797b 100644 --- a/plugins/inputs/haproxy/haproxy_test.go +++ b/plugins/inputs/haproxy/haproxy_test.go @@ -93,6 +93,7 @@ func TestHaproxyGeneratesMetricsWithAuthentication(t *testing.T) { "hrsp_4xx": uint64(2345), "hrsp_5xx": uint64(1056), "hrsp_other": uint64(0), + "lastsess": uint64(0), "lbtot": uint64(171013), "qcur": uint64(0), "qmax": uint64(0), @@ -105,7 +106,7 @@ func TestHaproxyGeneratesMetricsWithAuthentication(t *testing.T) { "srv_abrt": uint64(1), "stot": uint64(171014), "ttime": uint64(2341), - "weight": uint(100), + "weight": uint64(100), "wredis": uint64(0), "wretr": uint64(1), } @@ -162,6 +163,7 @@ func TestHaproxyGeneratesMetricsWithoutAuthentication(t *testing.T) { "hrsp_4xx": uint64(2345), "hrsp_5xx": uint64(1056), "hrsp_other": uint64(0), + "lastsess": uint64(0), "lbtot": uint64(171013), "qcur": uint64(0), "qmax": uint64(0), @@ -174,7 +176,7 @@ func TestHaproxyGeneratesMetricsWithoutAuthentication(t *testing.T) { "srv_abrt": uint64(1), "stot": uint64(171014), "ttime": uint64(2341), - "weight": uint(100), + "weight": uint64(100), "wredis": uint64(0), "wretr": uint64(1), } @@ -230,6 +232,7 @@ func TestHaproxyGeneratesMetricsUsingSocket(t *testing.T) { "hrsp_4xx": uint64(2345), "hrsp_5xx": uint64(1056), "hrsp_other": uint64(0), + "lastsess": uint64(0), "lbtot": uint64(171013), "qcur": uint64(0), "qmax": uint64(0), @@ -242,7 +245,7 @@ func TestHaproxyGeneratesMetricsUsingSocket(t *testing.T) { "srv_abrt": uint64(1), "stot": uint64(171014), "ttime": uint64(2341), - "weight": uint(100), + "weight": uint64(100), "wredis": uint64(0), "wretr": uint64(1), }