Simple Remote Monitoring

Helping a public library with 3 cable circuits (from Optimum West which used to be Bresnan).

The 3 circuits randomly go down for just a few minutes at a time - which disrupts their business SaaS apps.

The ISP denies pretty much all downtime.

There is no money for a Pingdom account.

Plus we need something that will monitor at the 1 minute level (in order to catch the micro outages).

What's the easiest system to setup on a VPS in order to check the up/down status of 3 cable circuits?

We can't ping the cable modems, but we can ping the firewall interface just inside the cable modem on each three circuits.

It'd be nice if it had pretty graphs, email notification, etc, but I'd settle for just a simple table of up/down time.

To summarize we need either a FREE online service, or an app that can be hosted on a small VPS system that will monitor at 1 minute intervals the status of 3 cable circuits.

On behalf of book readers/lovers everywhere - thanks for any advice.

6 Replies

fffk, my message disappeared.

in short nagios/icinga, collectd, smokeping or any of the 1000s of choices out there (I'm only familiar with nagios/icinga and collectd)

raspberry pi on site, and a remote vps monitoring a few hops before and a few hops after the cable modem.

vonskippy… asking easily googlable question… Must resist snarky response about hypocrisy…

Nagios would seem to do what you want, although it does require a third party box like a Linode.

@Guspaz:

vonskippy… asking easily googlable question… Must resist snarky response about hypocrisy…
Snark away.

I was just hoping to get some real-world answers, instead of generic google info.

This is an off the clock project, so I hope to cut to the chase with a minimum of R&D time and just install a working solution first time around. In-house we use Nagios - it just seems like an overkill for such a simple 3-item monitoring job.

I'm donating the time, and most likely the vps (since google couldn't come up with a free service that offers 1 minute polling intervals), so I'm hoping for some useful info.

As to hypocrisy, I think I've offered a fair share of workable answers on this forum (and on several others) so I don't think I'm out of line asking for help here (snarky or otherwise).

@chesty:

smokeping

Smokeping looks like it does exactly what we're looking for - anyone actually get it to work on any modern Distro?

All the howto's (at least the ones I could find) are years out of date, and not only have the distro's changed, but so has the smokeping app.

You could just run something like this every minute from cron.

#!/bin/sh

host="foo.example.com"
logfile="/path/to/file"
email="vonskippy@example.net"
date=$(date +"%Y-%m-%d %T %Z")

if /bin/ping -w 10 -c 1 $host >/dev/null 2>&1
  then
    echo "$date: host $host contacted" >> $logfile
  else
    echo "$date: host $host unreachable" >> $logfile
    echo "$date: host $host unreachable" | mail -s "$host unreachable" "$email"
fi

If you don't want false positives in the event the machine you're running this on loses connectivity, you could add a check for that.

#!/bin/sh

host="foo.example.com"
logfile="/path/to/file"
email="vonskippy@example.net"
date=$(date +"%Y-%m-%d %T %Z")

if ! curl -m 30 -o /dev/null "http://google.com/" >/dev/null 2>&1
  then
    echo "$date: network connectivity lost" >> $logfile
    exit 0
fi

if /bin/ping -w 10 -c 1 $host >/dev/null 2>&1
  then
    echo "$date: host $host contacted" >> $logfile
  else
    echo "$date: host $host unreachable" >> $logfile
    echo "$date: host $host unreachable" | mail -s "$host unreachable" "$email"
fi

monit could be configured to do what you want, but writing the configuration is probably no simpler than tweaking the above script.

Whew - after much brain sweat, I got SMOKEPING up and running.

I used http://www.how2centos.com/installing-sm … entos-5-5/">http://www.how2centos.com/installing-smokeping-on-centos-5-5/ as my starting point, and then trial & error to figure out the rest.

Hopefully now, the library will have the proof that there is indeed random multiple drop outs and/or slowdowns on their three new cable circuits.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct