Some Bits: Nelson's log

Smokeping notes

I’m trying to improve my Internet uptime monitoring. Right now I have a junky script that sends an ICMP ping every 1 or 5 seconds to a few carefully chosen IP addresses; my router, my upstream link, Google DNS, etc. It logs a text summary when a string of pings fail in a row. It works OK but is janky.

So I asked on the Internet for a better ping monitoring system and was reminded about smokeping. I have it sorta set up on my Ubuntu box now and it’s OK. Before I deep dive on that I also want to give a shout out to vaping, a rewrite of smokeping in Python. It’s not as featureful but then it’s not as old and idiosyncratic, either.

So the setup. I have smokeping sending 3 pings every 5 seconds to a total of 8 hosts. It makes graphs of latency for the ping replies along with highlighting packet loss. Eazy peazy.

Why 3 pings every 5 seconds? Well smokeping is really designed to send a whole lot of pings at once and show the distribution of latencies. The default is 20 pings! Also the default is only to measure every 5 minutes, which is fine for long term monitoring but I’m trying to catch short failures. It turns out 3 pings is the minimum smokeping is willing to send. 5 seconds was a compromise for me not wanting to spam too much. Works out to 3 * 8 / 5 = ~ 5 ping packets a second.

I’m using the default FPing probe. It’s fairly smart about handling timeouts, spacing an interval between pings, rotating through different hosts, etc. There’s also an FPing_Continuous probe option in smokeping whose main difference is it uses the “--loop” option in FPing. Near as I can tell that just moves the control loop from smokeping to fping, not sure that really buys you anything. Maybe it spreads the pings out more evenly?

As near as I can tell there’s no way to get smokeping to ping once a second. I found some years-old discussion about architectural assumptions in smokeping about the minimum interval between pings, and how much time the pings should take, etc that make it sound like that “20 pings every 5 minutes” really is the intended use case. Also I now have a giant RRD file I’m sure, and the code seems to be regenerating all the graphs every 5 seconds whether I need them or not. It’s all a bit silly and overkill but I think harmless for now.

I might also yet replace smokeping with vaping. It’s not nearly as fancy, but then it seems designed precisely for my 1 ping-per-second desired scenario.

Sample to ping.ubnt.com