in reply to Alerting On Critical State Changes

Your question could mean anything from how do I build a raft till how to rule the oceans with my fleet. ;)

Nagios and other system monitoring tools where already mentioned.

CPAN is also full of modules.

But if you need a self made approach with deeper insights I'd certainly recommend having a look at Perl for System Administration from O'Reilly

You'll find plenty of well explained best practices there.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)

PS: Je suis Charlie!