Traditionally ping has used the ICMP protocol which can hit any server independent of what services it might be running. We're looking for a Ping Service that is somewhere between this on the low end and full on synthetic monitoring on the high end.
ICMP probe in David Heidelberg's iputils. github
Could be another sample data provider. github
Node.js plain ICMP ping implementation. post
var ping = require('net-ping') var session = ping.createSession() var t0 = Date.now() session.pingHost ('46.101.237.224', (err, ip) => { var t1 = Date.now() if (err) console.log (ip + " " + err.toString()) else console.log (ip + " " + (t1-t0)) })
while sleep 1 do node test.js done 46.101.237.224 173 46.101.237.224 194 46.101.237.224 229 46.101.237.224 231 46.101.237.224 246 ping eu.wiki.org icmp_seq=29 time=190.386 ms icmp_seq=30 time=213.590 ms icmp_seq=31 time=234.038 ms icmp_seq=32 time=257.742 ms icmp_seq=33 time=170.315 ms icmp_seq=34 time=169.933 ms
Oh no. It seems the ICMP is so low level that it is hard to pair replies to requests except at the application level. The node.js library works unless you run more than one pingHost at the same time. Then chaos. The Datalog plugin is all about parallelism so this is going to be turning back the clock a decade to make ping reliable.