Simple Remote Monitoring
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.
On behalf of book readers/lovers everywhere - thanks for any advice.
6 Replies
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.
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.
#!/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
I used
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.