Hacker News new | ask | show | jobs
by ajsharma 4124 days ago
I dont suppose you have a tool that does this? I've been pondering building one, but I'd rather just skip to the part where I can start complaining about my service :p
5 comments

It's not on a machine I have access to right now, but I'm fairly certain it went something like:

    while [ "true" ]
    do
        printf 'google_ping %f %s' $(ping -c1 www.google.com | awk '/ms/ {print $7};' | awk -F '=' '{print $2};') $(date +%s) | nc graphite_host 2003
        sleep 10
    done
Awesome, thanks :)
fwiw I use

    ping -n www.google.com | awk '/ms/ {split($7,p,"="); print "ping.google " p[2] " " strftime("%s")}; fflush()' | nc -q0 127.0.0.1 2003 &
I bow before your awk-fu. :)
It's not pretty, but I use Routers2, which is a layer on top of MRTG. We have TimeWarner's commercial cable internet service, and our latency spikes to ~800ms at a regular and consistent interval. I've been 10 rounds with TimeWarner over the issue, but they refuse to acknowledge that it's an issue because they have no latency SLA. We ended up bringing in a second Windstream Ethernet over copper circuit for our VoIP application because the TW circuit latency was so bad.

I have a local VM with Routers2 installed, which pings our LAN router, the TW modem, the first TW hop, and one of our VMs at Linode. The latency spikes start at the first TW hop. Routers2 provides great insight in to how TW is performing.

You can get Routers2 here: http://www.steveshipway.org/software/

Any recent version of collectd has the write_graphite plugin. Mix that with the ping plugin and you're all set. About five minutes of work (assuming you have a graphite stack already). My raspberry pi runs graphite / statsd and my personal servers write all sorts of useful system / network metrics to it via collectd.
Collectd is pretty awesome for tracking the state of a machine. I use it all over the place.
I modified a munin plugin that pings google and charts it: http://imgur.com/jaaLaJP
smokeping does this.
came here to post about smokeping. here's their demo: http://oss.oetiker.ch/smokeping-demo/?target=Customers.OP