What is Yamon?

Yamon is a very simple Perl program designed to check whether a server is up-and-running and send an alert to a human when something appears to be broken.

Things you might want to monitor:

  • Is your web-server up and running?
  • Is it actually serving up the right pages?
  • Is your mail-server accepting e-mail?
  • Has your grandma's DSL line disconnected?

Yamon can check such things for you and let you know when stuff breaks.

It can also perform some basic troubleshooting (tests can depend on other tests), to venture a guess as to why things aren't working properly.

Yamon is designed with simplicity as it's number two goal. Number one is to get the job done.

What is Yamon not?

Yamon is not an "enterprise grade system monitoring solution". It probably isn't suitable for a large corporate network or a professional ISP, for example. If that's what you need, take a look at Nagios.

Yamon doesn't create graphs. It doesn't track trends or do capacity planning. It doesn't make toast.

But if you just have one or two systems and you just want to know when they break, Yamon might be what you're looking for.

Great, what do I need?

There should be a download link in the sidebar and some very basic documentation in the archive.

Yamon wants to run as a cron job on a Unix machine (any Linux, BSD or Mac box will probably do). The machine has to be able to send e-mail using the "mail" command-line utility. You'll need a working perl installation (all modern Unixes have this) and a connection to the Internet; somewhere to send alerts and something worth monitoring.

If you have a mobile phone and your telco provides an e-mail to SMS gateway, then you're all set to receive real-time alerts anytime, anywhere!




News...

Yamon 0.94

The other day I picked up Yamon again, for use at my latest gig, PageKite.net. As a result I ended up fixing a few bugs and adding some features that I needed. I've compiled those into a new release: Yamon 0.94

New hotness:

  • yamon.pl: Export a status summary as an HTML table.
  • yamon.pl: Tests based on arbitrary Unix commands: check_cmd
  • yamon.pl: Support for recording history using rrdtool.
  • yamon.pl: Fixed behavior to avoid bogus "OK" alerts for new tests.
  • yamon.pl: Fixed some minor scheduling bugs.
  • yamon.cgi: Improved to report memory stats (on Linux).
  • NOTE: New requirements: Digest::MD5 and Timer::HiRes
If you are using Yamon for anything important, it's probably worth upgrading to get the scheduling fixes, just beware of the new module dependencies in yamon.cgi and yamon.pl. I think most systems have these pre-installed, but you should probably check.

See the README for discussion and sample.yam for examples.

And check out PageKite, it's awesome!

Yamon 0.93

I've released a very minor update to Yamon.

The only new feature here is the addition of the check_dnsbl test. This test is good for making sure that mail servers aren't listed on one of the common DNS-based spam-fighting blacklists, such as bl.spamcop.net or SORBS.

Yamon 0.92

Here ye, here ye, there's a new Yamon available!

This release adds the following wonderfulness:

  • White-box monitoring: check_syshealth
  • yamon.cgi: a CGI-script which exposes most of the commonly monitored system metrics in the format expected by check_syshealth
That's all for now. But it's really cool, if you ask me!

The yamon.cgi program tries to autodetect all the things that matter; which filesystems exist, which log-files are actively rotated under /var/log. It works on Mac OS X and the Linux variants I've tested (CentOS 5 and RH7.3).

Probably the most unique feature here is my attempt to detect unexpected log-file growth and allow yamon.pl to alert on that. But I don't know if it's really unique, I'm just proud of it. :-P

Yamon 0.91

I've uploaded a new Yamon release. Improvements:

  • Different tests can have different alert targets
  • Alerts can be sent to syslog or other arbitrary programs
  • Direct SMTP can be used instead of invoking 'mail' to send e-mail alerts
So the alerting stuff is more or less feature complete now. Yay!

If you're one of the two or three people that actually downloaded the program, and if you happen to be using it, take care that the syntax for specifying multiple alert recipients has changed. Instead of using ',' as a delimiter, I've switched to ';'.

As far as I know I'm still the only user, so I don't expect this to matter much. I'll try to refrain from changing syntax in non-backwards compatibles ways in the future.

Yamon 0.9

I've uploaded my first public Yamon release, dubbed version 0.9.

Main features:

  1. It works!
  2. There is a HOWTO; installation should be a breeze.
  3. Built-in tests for HTTP, SMTP, SSH and of course 'ping'.
  4. A generic TCP test which can do expect-style testing of pretty much anything.
  5. Inter-test dependencies so when your network breaks, it won't report everything else as being broken too.
  6. Alerts sent via. e-mail only, at the moment.
I'm using it, it does most of what I want and is useful, so I'm releasing it to The Internets.

Things it doesn't do yet, but are planned for "version 1.0":
  1. Allow different tests to alert different people.
  2. Test system-health (using a helper CGI?) and fire alerts when machines run low on disk space, memory or other internal resources.
  3. Fire alerts using external programs (other than mail).
  4. Log to syslog.
  5. Possibly send e-mail via. direct SMTP instead of invoking mail?
  6. Make it export current status to an HTML file.
  7. Write stuff on this page about how to implement useful monitoring with this tool. For now, see the comments in the sample.yam file.
Any questions, comments, suggestions? Post a comment!

Web site up and running

So this is a rough first draft of a Yamon web-site. I'm going to try using Blogger for this for now, as it's fast, free and highly available. It may not be what all the cool kids do, but I'm lazy and I think this should do the job just fine.

If you have any questions, just post a comment.