fping-exporter icon indicating copy to clipboard operation
fping-exporter copied to clipboard

Retrieve Targets is too long and reacts weirdly

Open oijkn opened this issue 5 years ago • 1 comments

Between the moment I run fping-export and the moment it runs the ping it takes a long time just to find 5 targets. As shown below it took 5 minutes just for 5 targets...

And oddly in the process of retrieving the targets, I see that it starts by pinging the first host and then it keeps on scanning for targets.

mai 04 12:40:44 TIG fping-exporter[33069]: 2020/05/04 12:40:44 New worker (period: 5m0s )
mai 04 12:40:44 TIG fping-exporter[33069]: 2020/05/04 12:40:44 new target: host01
mai 04 12:40:45 TIG fping-exporter[33069]: start fping:  [-q -p 30000 -C 5 -i 1000 host1]
mai 04 12:41:30 TIG fping-exporter[33069]: 2020/05/04 12:41:30 new target: host2
mai 04 12:42:34 TIG fping-exporter[33069]: 2020/05/04 12:42:34 new target: host3
mai 04 12:43:10 TIG fping-exporter[33069]: 2020/05/04 12:43:10 new target: host4
mai 04 12:43:24 TIG fping-exporter[33069]: 2020/05/04 12:43:24 new target: host5
mai 04 12:45:45 TIG fping-exporter[33069]: start fping:  [-q -p 30000 -C 5 -i 1000 host1 host2 host3 host4 host5]

oijkn avatar May 04 '20 11:05 oijkn

prometheus initiates the probing. What are you using as scrape_interval?

It is by design that the probing is done asynchronously, so when prometheus first wants to probe a host, that host is added to the list of hosts to be pinged, and the first probe sent by prometheus will not contain results. When it comes for the second probe, the results will be there, and also fping-exporter will stop pinging after a while when a host is not probed by prometheus anymore.

schweikert avatar Aug 06 '20 04:08 schweikert