this is obsolete doc -- see http://doc.nethence.com/ instead

Self made monitoring 

 

 

Create a user account on the target server, 

useradd -m monitor
passwd monitor

 

Make it possible to connect throught SSH without password to that server, from a monitoring server. 

 

Each night on a monitoring server, add this script to crontab, 

#!/bin/ksh
# no set -e, proceed anyways

 

[[ ! -x `whence wc 2>/dev/null` ]] && print "wc executable not found" && \
        exit 1

 

tmp=`mailq`
[[ $tmp = "Mail queue is empty." ]] || print "$tmp"
unset tmp

 

tmp=`pgrep postoffice`
tmpwcl=`echo "$tmp" | wc -l`
(( tmpwcl == 2 )) || print "$tmp"
unset tmp tmpwcl

 

find /var/spool/virtual | grep .lock$

 

tmp=`pgrep vm-pop3d`
tmpwcl=`echo "$tmp" | wc -l`
(( tmpwcl == 3 )) || print "$tmp"
unset tmp tmpwcl