diff --git a/CHANGELOG.md b/CHANGELOG.md index bb0eea6bb..7d13ce2ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -68,6 +68,7 @@ continue sending logs to /var/log/telegraf/telegraf.log. - [#1344](https://github.com/influxdata/telegraf/issues/1344): Fix config file parse error logging. - [#1771](https://github.com/influxdata/telegraf/issues/1771): Delete nil fields in the metric maker. - [#870](https://github.com/influxdata/telegraf/issues/870): Fix MySQL special characters in DSN parsing. +- [#1742](https://github.com/influxdata/telegraf/issues/1742): Ping input odd timeout behavior. ## v1.0.1 [2016-09-26] diff --git a/plugins/inputs/ping/ping.go b/plugins/inputs/ping/ping.go index b6baa7d99..089248efe 100644 --- a/plugins/inputs/ping/ping.go +++ b/plugins/inputs/ping/ping.go @@ -52,13 +52,13 @@ const sampleConfig = ` ## urls to ping urls = ["www.google.com"] # required ## number of pings to send per collection (ping -c ) - count = 1 # required + # count = 1 ## interval, in s, at which to ping. 0 == default (ping -i ) - ping_interval = 0.0 + # ping_interval = 1.0 ## per-ping timeout, in s. 0 == no timeout (ping -W ) - timeout = 1.0 + # timeout = 1.0 ## interface to send ping from (ping -I ) - interface = "" + # interface = "" ` func (_ *Ping) SampleConfig() string { @@ -200,6 +200,11 @@ func processPingOutput(out string) (int, int, float64, error) { func init() { inputs.Add("ping", func() telegraf.Input { - return &Ping{pingHost: hostPinger} + return &Ping{ + pingHost: hostPinger, + PingInterval: 1.0, + Count: 1, + Timeout: 1.0, + } }) }