Fping - no min/max/avg if I have multiple hosts configured as ping targets

Environment

Netdata agent on RaspberryPi4, with fping installed and configured.

Problem/Question

If I have multiple hosts configured in /etc/netdata/fping.conf:

hosts=“host1 host2 host3”

then min, max, and average are all the same. I think it is effectively just measuring a single ping to each host.

If I just have one host configured, then it works as I expect, and I get meaningful min/max/avg values.

What I expected to happen

I expected min/max/avg to work the same, regardless of having a single or multiple number of hosts configured.

Thanks, Brock

Hi, @brock.

Netdata just reads fping binary output (it supports reporting data in the netdata format).

See print_netdata() function, it iterates over a list of hosts. As I see in the code, the number of hosts (single vs multiple) shouldn’t matter because the code uses a host specific counters (h->...) when calculating data (this is true for all metrics, including the latency chart.)


Just to ensure, I configured 3 hosts and checked the charts

hosts=“127.0.0.1 8.8.8.8 87.250.250.242”

I see no problem.


See the debug output

/usr/bin/fping -N -l -Q 1 -p 200 -R -b 56 -i 1 -r 0 -t 5000 127.0.0.1 8.8.8.8 87.250.250.242 | grep -E "latency|min|avg|max"
CHART fping.127_0_0_1_latency '' 'FPing Latency for host 127.0.0.1' ms '127_0_0_1' fping.latency area 110000 1
DIMENSION min minimum absolute 10 1000
DIMENSION max maximum absolute 10 1000
DIMENSION avg average absolute 10 1000
BEGIN fping.127_0_0_1_latency
SET min = 9
SET avg = 11
SET max = 12
CHART fping.8_8_8_8_latency '' 'FPing Latency for host 8.8.8.8' ms '8_8_8_8' fping.latency area 110000 1
DIMENSION min minimum absolute 10 1000
DIMENSION max maximum absolute 10 1000
DIMENSION avg average absolute 10 1000
BEGIN fping.8_8_8_8_latency
SET min = 36
SET avg = 49
SET max = 81
CHART fping.87_250_250_242_latency '' 'FPing Latency for host 87.250.250.242' ms '87_250_250_242' fping.latency area 110000 1
DIMENSION min minimum absolute 10 1000
DIMENSION max maximum absolute 10 1000
DIMENSION avg average absolute 10 1000
BEGIN fping.87_250_250_242_latency
SET min = 5608
SET avg = 5612
SET max = 5615
BEGIN fping.127_0_0_1_latency
SET min = 9
SET avg = 11
SET max = 14
BEGIN fping.8_8_8_8_latency
SET min = 36
SET avg = 42
SET max = 51
BEGIN fping.87_250_250_242_latency
SET min = 5608
SET avg = 5632
SET max = 5664
BEGIN fping.127_0_0_1_latency
SET min = 10
SET avg = 12
SET max = 14
BEGIN fping.8_8_8_8_latency
SET min = 40
SET avg = 46
SET max = 54
BEGIN fping.87_250_250_242_latency
SET min = 5602
SET avg = 5607
SET max = 5619
BEGIN fping.127_0_0_1_latency
SET min = 8
SET avg = 11
SET max = 15
BEGIN fping.8_8_8_8_latency
SET min = 39
SET avg = 42
SET max = 49
BEGIN fping.87_250_250_242_latency
SET min = 5603
SET avg = 5620
SET max = 5659

My fping version is Version 3.15. What version are you using?

After further investigation, based on your comments, and then some config tweaking, it is working fine.

I think I may have had some combination of update_every and ping_every that was causing it to look like
this. I don’t know what was going on exactly, but it is now fine.

Thanks for your help, Brock