-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ping plugin returns 0 although ping not successful #4893
Comments
This should be resolved in telegraf 1.8.2 by #4875 if it's not, please comment or reopen |
Ok thanks, I'll verify. |
Hello it seems that now result_code is 1 even if ping succeed ... this is not the correct behaviour. Influx version is : influxdb-1.6.4-1.x86_64 Os:
https://github.com/influxdata/telegraf/tree/master/plugins/inputs/ping
|
@david-guenault what OS are you running telegraf on, and can you run edit
|
Problem seems to be fixed for me on the latest telegraf release i.e 1.8.x |
For the OS:
For the ping command i get 0 as return code
This is what i get in influx
And the related configuration in telegraf
|
Ok, it's because it's being canceled. You are sending 3 pings, but with a deadline of 2, it sends/receives 2 then cancels the third, resulting in an exit code of |
Oh crap should have been reading (and testing) more carrefuly ... |
I've found a weird issue in Telegraf. Telegraf puts a 0 for the result_code even if the ping was not successful. But according to the documentation here https://github.com/influxdata/telegraf/tree/master/plugins/inputs/ping 0 stands for successful. The rest of the returned values from the ping plugin are set to null in my influxdb.
[ "2018-10-20T20:41:16Z", null, "host", null, null, null, null, null, 0, null, "tag1", "tag2", "twitter.com" ],
Besides that I also have the http plugin running which returns:
[ "2018-10-20T20:42:11Z", "host", null, "GET", null, "timeout", 4, "timeout", null, "itag1", "tag2" ],
Where 4 stands for timeout.
There must be something wrong in the ping plugin in my opinion.
The text was updated successfully, but these errors were encountered: