You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue: Telegraf ping input plugin assumes a default ping_interval of 0, which should be 1 instead.
Steps to reproduce:
run the ping input plugin against any URL with a count > 1 , leaving the interval and timeout config parameters default to 0.
Details:
The default Linux ping interval is to wait for one second between each packet, but Telegraf assigns a default value of 0.
This does not affect the actual ping exec command as no argument is passed to it in this case, but it does affect the calculation of totalTimeout as per totalTimeout := float64(p.Count)*p.Timeout + float64(p.Count-1)*p.PingInterval , which results to 0.
When the CombinedOutputTimeout function is called as out, err := internal.CombinedOutputTimeout(c,time.Second*time.Duration(timeout+1)) the Duration passed to it as argument is timeout+1=1.
If the actual execution time for the execution of "ping" lasts longer than 1 second (which it will , when count is >1 ), a timeout error is thrown by CombinedOutputTimeout.
Setting the timeout config option to a value other than 0 can conceal the issue.
The text was updated successfully, but these errors were encountered:
Issue: Telegraf ping input plugin assumes a default ping_interval of 0, which should be 1 instead.
Steps to reproduce:
run the ping input plugin against any URL with a count > 1 , leaving the interval and timeout config parameters default to 0.
Details:
The default Linux ping interval is to wait for one second between each packet, but Telegraf assigns a default value of 0.
This does not affect the actual ping exec command as no argument is passed to it in this case, but it does affect the calculation of totalTimeout as per
totalTimeout := float64(p.Count)*p.Timeout + float64(p.Count-1)*p.PingInterval
, which results to 0.When the CombinedOutputTimeout function is called as
out, err := internal.CombinedOutputTimeout(c,time.Second*time.Duration(timeout+1))
the Duration passed to it as argument is timeout+1=1.If the actual execution time for the execution of "ping" lasts longer than 1 second (which it will , when count is >1 ), a timeout error is thrown by CombinedOutputTimeout.
Setting the timeout config option to a value other than 0 can conceal the issue.
The text was updated successfully, but these errors were encountered: