Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Simple Remote Monitoring
PostPosted: Wed Sep 26, 2012 1:59 am 
Offline
Senior Member
User avatar

Joined: Sun Dec 27, 2009 11:12 pm
Posts: 1038
Location: Colorado, USA
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.

_________________
Either provide enough details for people to help, or sit back and listen to the crickets chirp.
Security thru obscurity is a myth - and really really annoying.


Top
   
PostPosted: Wed Sep 26, 2012 2:53 am 
Offline
Senior Member

Joined: Tue Feb 19, 2008 10:55 am
Posts: 164
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.


Top
   
PostPosted: Wed Sep 26, 2012 3:11 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
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.


Top
   
PostPosted: Wed Sep 26, 2012 3:49 pm 
Offline
Senior Member
User avatar

Joined: Sun Dec 27, 2009 11:12 pm
Posts: 1038
Location: Colorado, USA
Guspaz wrote:
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).

_________________
Either provide enough details for people to help, or sit back and listen to the crickets chirp.
Security thru obscurity is a myth - and really really annoying.


Top
   
PostPosted: Wed Sep 26, 2012 7:49 pm 
Offline
Senior Member
User avatar

Joined: Sun Dec 27, 2009 11:12 pm
Posts: 1038
Location: Colorado, USA
chesty wrote:
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.

_________________
Either provide enough details for people to help, or sit back and listen to the crickets chirp.
Security thru obscurity is a myth - and really really annoying.


Top
   
PostPosted: Thu Sep 27, 2012 12:44 am 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
You could just run something like this every minute from cron.
Code:
#!/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.
Code:
#!/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.


Top
   
PostPosted: Sun Oct 07, 2012 7:57 pm 
Offline
Senior Member
User avatar

Joined: Sun Dec 27, 2009 11:12 pm
Posts: 1038
Location: Colorado, USA
Whew - after much brain sweat, I got SMOKEPING up and running.

I used http://www.how2centos.com/installing-sm ... entos-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.

_________________
Either provide enough details for people to help, or sit back and listen to the crickets chirp.
Security thru obscurity is a myth - and really really annoying.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group