From 4bfef75fdb7825eef0517a54359c963d1a6c2f2e Mon Sep 17 00:00:00 2001 From: Mariusz Brzeski Date: Tue, 6 Jun 2017 20:55:01 +0200 Subject: [PATCH] Fix timeout option in Windows ping input sample configuration (#2885) --- plugins/inputs/ping/ping_windows.go | 4 ++-- plugins/inputs/ping/ping_windows_test.go | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/inputs/ping/ping_windows.go b/plugins/inputs/ping/ping_windows.go index b1212eaaae8b2..fb7cde4898ab7 100644 --- a/plugins/inputs/ping/ping_windows.go +++ b/plugins/inputs/ping/ping_windows.go @@ -44,8 +44,8 @@ const sampleConfig = ` ## number of pings to send per collection (ping -n ) count = 4 # required - ## Ping timeout, in seconds. 0 means default timeout (ping -w ) - Timeout = 0 + ## Ping timeout, in seconds. 0.0 means default timeout (ping -w ) + #timeout = 0.0 ` func (s *Ping) SampleConfig() string { diff --git a/plugins/inputs/ping/ping_windows_test.go b/plugins/inputs/ping/ping_windows_test.go index cb90b16866eba..7709cbd65ef31 100644 --- a/plugins/inputs/ping/ping_windows_test.go +++ b/plugins/inputs/ping/ping_windows_test.go @@ -163,9 +163,9 @@ func TestLossyPingGather(t *testing.T) { "reply_received": 7, "percent_packet_loss": 22.22222222222222, "percent_reply_loss": 22.22222222222222, - "average_response_ms": 115, - "minimum_response_ms": 114, - "maximum_response_ms": 119, + "average_response_ms": 115.0, + "minimum_response_ms": 114.0, + "maximum_response_ms": 119.0, } acc.AssertContainsTaggedFields(t, "ping", fields, tags) }