-
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
[[inputs.ping]] percent_packet_loss not written to InfluxDB when ping command fails #5499
Comments
What was the error message that telegraf output with that result 2?
wherever we set
|
Looking back through previous telegraf versions, I don't see where we set |
@glinton Unfortunately I'm not able to say with which version it changed, I just noticed it now because my alert about the package loss didn't fire any more when a host went down. |
Are you able to paste the error message from the telegraf logs that's associated with that ping? |
These are the logs when a host is not available
|
In the case that ping cannot be ran there isn't any packet loss, in this case we shouldn't fill out the Are you alerting with Kapacitor? It would be nice to add an example to the README. |
We are alerting with grafana. Unfortunately it is not possible there at the moment to get an alert if no data is recorded unless you have a single series per graph which is not practical. If it would be useful I could still add an example. Should that go to the README of the ping plugin then ? As for the |
We usually only add Kapacitor scripts, and soon Flux queries, to the README. This Would it be possible to set multiple alerts, one for percent packet loss and one for the result code? |
Just using defaults. And yes, have set up another alert based on the status now. Still thought, the percent_packet_loss needs to be adjusted. |
I too am curious as I am trying to actually log packet loss. As soon as it times out, it just gives the error of Edit:
|
This issue is resolved by #6267 (specifically the Now that the proper error is being returned on a timeout, this will work as normal. Check the nightlies or wait for 1.12. |
Relevant telegraf.conf:
System info:
telegraf version: 1.9.5
operating system: Ubuntu 16.04.5 LTS
Steps to reproduce:
We used to monitor all the hosts in our infrastructure using the
percent_packet_loss
returned from the ping plugin. When the value would exceed a given treshold an alert was triggered. Formerly it appeared to always write the percent_packet_loss even when the ping command failed. Since some of the latest updates (#4703 looks like a candidate) it seems to return early and write theresult_code
but does not fill thepercent_packet_loss
which leads to the respective alert not being triggered.Expected behavior:
percent_packet_loss
is always 100 when an error occurs during the ping command execution.Actual behavior:
percent_packet_loss
is always empty when an error occurs during the ping command execution.Additional info:
Is it really expected that
percent_packet_loss
is empty in case of an ping error ? I would expect thatpercent_packet_loss
is always 100 when an error occurs during ping execution. If that assumption is correct (and as it was like that earlier) I would try to implement a fix.The text was updated successfully, but these errors were encountered: