-
Notifications
You must be signed in to change notification settings - Fork 251
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
added option -N to allow fping output statistics in the format expected by netdata #105
Conversation
thanks! |
Very cool, thanks to you! Btw. there is a bit of a conceptual problem on how -Q works, because the reporting interval might force a report when a ping was sent and there wasn't time to receive it yet. Also, I am going to improve the code a bit so that the reporting interval is going to be more precise. Currently it does "current_time + report_interval", which might be inaccurate. See also: #97 |
You are right. This is why I disabled the The problem gets even worst when multiple hosts are given. Because of the minimum It could be better to allow In netdata, I plan to add the following alarms:
|
I have just committed some changes to improve things on that front. Maybe you could test with the latest code from the develop branch? I changed the following:
You could try using for example -p 1007 with -Q 1, so that boundaries are mostly not the same for the loop and for the report. |
sure! You are the best! I'll do later today. |
ok, I tested it. This is what is see:
|
Regarding point 3, I meant I can't find a difference. In general, discarding a response before its timeout, is probably a bad idea: ea37408#diff-2ff0a524bb528090fe44f3dd1af5a11cR1405 What could be better, is to discard a response immediately upon reception and before counting it anywhere, only after the timeout specified with This means that if Of course, this means that |
Consider this: packet loss should exclusively be reported on timeout. I mean, a packet is sent at time So, counting packets sent and packets received to detect a packet loss is not good enough for What do you think? |
Keep in mind that fping now consumes 100% cpu. |
I think that -Q was more of a late addition and not the initial concept of how fping was meant to be used. That's why the data structures are the way they are. I think that we can make it work well enough though. Something to consider is that you should use a -p value that is bigger than the timeout, so -p 100 -Q 1 doesn't work well, because it uses an implicit -t 500 (timeout). Can you try again with -p 500 -Q 5, for example? I think that it should provide better data. |
hm... I use it with I'll give a try to the settings you suggest though. |
I think the patch that discards one packet, introduced another problem. Check this: http://registry.my-netdata.io/#menu_fping When a packet is discarded, the average reported is totally wrong. This is probably a better example: As you can see, the average crosses max. Shown as both above and below max... |
The problem is that because the received count is one less (artificially discarded), this line: Line 1360 in 2cb0860
does the wrong calculation: |
hmm, you are right. it probably can be fixed by not increasing total_time_i in the case the response is discarded |
I have committed a fix. can you test again? |
installed it at the same url: http://registry.my-netdata.io/#menu_fping it seems fixed. |
Hi,
I am the founder of firehol.org and https://github.com/firehol/netdata (http://my-netdata.io).
This PR adds the option
-N
tofping
to allow it output statistics in a netdata friendly format.For each host given, netdata will create 3 charts, like that:
A wrapper script (
/usr/libexec/netdata/plugins.d/fping.plugin
) is required only for passing the valid options to fping. It is shown below and I'll add it to the netdata repo:cc: netdata/netdata#1122