A simple, lightweight vps monitoring tool?
June 26, 2008 9:05 AM   Subscribe

I have a server and some friends have servers, and we'd like to install a lightweight tool on each server that can monitor if the other servers are running, cpu/memory load is normal, httpd/mysql is running, and fire off an email if there are problems.

I'm not interested in the various "free" services out there. I want software!

I'm also looked at a few huge, complex packages (zenoss, zabbix, nagios) but they seem to be way too much for what I need. Basically, if a script can request a webpage every few minutes - scan for a particular string of text - and then fire off an email if it doesn't find it, that would probably do it.

The servers are virtual servers running linux. Any tips?
posted by kamelhoecker to Computers & Internet (10 answers total) 2 users marked this as a favorite
 
STAF could be what you are looking for. It provides a lightweight agent that runs on each server to be monitored, and is easily hooked into your scripting language of choice. It's one downside is that, since it was developed for testing environments, the security model is simplistic.
posted by nomisxid at 9:14 AM on June 26, 2008


Mon: Easy to use, lightweight, very flexible
posted by poppo at 9:14 AM on June 26, 2008


This looks promising.

I'm not using it currently, but I might be now :)
posted by tomierna at 9:15 AM on June 26, 2008 [1 favorite]


bash + wget + grep + mail -s "thing is down" foo@bar.com
posted by rhizome at 10:29 AM on June 26, 2008


I second mon, I've used it before and it is nice and simple. You can even write your own interfaces and plugins easily for it.
posted by gaby at 10:33 AM on June 26, 2008


Mon. I've evaluated, used and rejected Nagios, Monit, Munin, smokeping and several others.

For the dirt-simple "is $foo working" alerting nothing is as actually usable as mon.

If you need to keep track of statistics/graphs, Munin is quite good I just didn't like its alerting and Ganglia is nearly zero-configuration if you're on the same LAN.

For locally ensuring that services are/stay up Monit is fantastic.

You may have to modify the checks that ship with mon to check for a string, AFAIK they simply check if the page can be loaded. It's simple perl so that shouldn't be hard at all.

Also don't omit the "ping my own router" check and have your other checks depend on that otherwise you'll get a flood of notifications once the link comes back up at 3am and your phone will crash because of the text messages. Grr.
posted by Skorgu at 10:53 AM on June 26, 2008


If you want something quick and very easy to set up, I've used a perl script called Tinymonitor. Just pop it on the box, configure it by editing a text file, and have a cron job run it every 5 minutes. To monitor mySQL on a box, just have a simple PHP page that does a MySQL query and returns a value. I note that this guy's page is having trouble coming up today, but it's BSD licensed Open Source software, so if you're interested, just mefi mail me and I'll put a tarball up for you to download from my copy.
posted by barc0001 at 11:27 AM on June 26, 2008


Irony Of The Day! Tool to monitor server.... Tinymonitor.... the page where you get it is down...
posted by exphysicist345 at 3:22 PM on June 26, 2008


Moods is something you should check out as well.
posted by zap rowsdower at 5:51 PM on June 26, 2008


Response by poster: Thanks for the suggestions.

Mon was a trip down memory lane – tracking down and installing all the required perl modules on CPAN. I didn't actually get it working - but the fact that it is a perl daemon that listens on a port makes me nervous for computer that isn't on a private network. (Plus installing all the dependent perl modules is a pain.)

I think i'll do as rhizome suggests and roll my own. A PHP script on each VPS could run various various tests (df, uptime, connect and run a query on mysql, etc.) and then a script on a monitoring server could be called every 5 mins via cron to call the PHP script to look for strings in the response like "mysqld: OK".
posted by kamelhoecker at 7:28 AM on June 29, 2008


« Older Does the human brain respond to certain note...   |   MAGI May (Be Headed North of $100k) Newer »
This thread is closed to new comments.