Purpose
=======

 This package was assembled for the purpose of monitoring. 

 Since the probes are to be done on a regularly scheduled basis, you
need to have a scheduling system in place. You could use UNIX cron jobs,
or you could merge this package into your chosen monitoring software,
thereby relying on it for recording metrics while monitoring the health of
your system.

NOTICE!!! You MUST have ksh installed for these scripts to work.

Metrics Gathering Scripts
=========================

check_rndtrip

	* Time it takes to send a round trip message through the messaging system.

check_queues

	*  Total number of messages in the queues (including HELD messages)

check_sys

	* Enqueue/Dequeue Rate of the iMS channels over the last 5 minutes
	* Total established connections via smtp,imap,pop3,imaps,pop3s,ldap,http
	* Number of separate remote hosts connection to the ports listed above
	* The iMS dispatcher statistics
	* Disk usage for the SERVERROOT and any store partitions
 

Monitoring And Alarm Scripts
============================

 The following is a list of the main scripts and the items that they record

check_files

	* Checks for build up of checkpoint files. 

check_mconn

	* Checks that there is real response from the SMTP server by sending
          a simple messaging and recording the SMTP statistics. 
	  (Connect Time, Greeting time, etc)

check_msgs

	* Checks log files for bad messages

check_procs

	* Checks that a number of processes are up and running


Tips for installiong this package.
==================================

 Take a look at the README in the docs directory. 

Documentation
=============
 
 See the healthmon.html file in the docs directory. 


Quick start  
===========

1) Edit the etc/alarms.cfg file and change the options to  your site 
   preferences.

2) Modify the etc/sequence.cfg file to setup a schedule for the roundtrip tests
   between your various machines.

   Of course, be sure to setup test accounts on the mailhosts you probe.

3) If you use other monitoring frameworks other than Big Brother, you should
   modify the etc/alarms.cfg file to define your default reporting format
   and you should append your customizations the plugins/report_formats.cfg file.

4) Setup the jobs to run either via scheduler process or via cron 

   a) For crontab you could use: 

	# change <path-name-here> to the actual path name
	0,5,10,15,20,25,30,35,40,45,50,55 * * * * <path-name-here>/check_queues"
	0,5,10,15,20,25,30,35,40,45,50,55 * * * * <path-name-here>/check_sys"
	0,5,10,15,20,25,30,35,40,45,50,55 * * * * <path-name-here>/check_ldap"
	0,5,10,15,20,25,30,35,40,45,50,55 * * * * <path-name-here>/check_files"
	0,5,10,15,20,25,30,35,40,45,50,55 * * * * <path-name-here>/check_mconn"
	0,5,10,15,20,25,30,35,40,45,50,55 * * * * <path-name-here>/check_procs"
	0,5,10,15,20,25,30,35,40,45,50,55 * * * * <path-name-here>/check_rndtrip"
	59 23 * * * <path-name-here>/check_rndtrip -r"

   b) For the messaging server scheduler you could use:

	# change <path-name-here> to the actual path name
	setconf local.schedule.check_qm  "0,5,10,15,20,25,30,35,40,45,50,55 * * * * <path-name-here>/check_queues"
	setconf local.schedule.check_sys  "0,5,10,15,20,25,30,35,40,45,50,55 * * * * <path-name-here>/check_sys"
	setconf local.schedule.check_ldap  "0,5,10,15,20,25,30,35,40,45,50,55 * * * * <path-name-here>/check_ldap"
	setconf local.schedule.check_files  "0,5,10,15,20,25,30,35,40,45,50,55 * * * * <path-name-here>/check_files"
	setconf local.schedule.check_mconn  "0,5,10,15,20,25,30,35,40,45,50,55 * * * * <path-name-here>/check_mconn"
	setconf local.schedule.check_procs  "0,5,10,15,20,25,30,35,40,45,50,55 * * * * <path-name-here>/check_procs"
	setconf local.schedule.check_rndtrip "0,5,10,15,20,25,30,35,40,45,50,55 * * * * <path-name-here>/check_rndtrip"
	setconf local.schedule.sendreport "59 23 * * * <path-name-here>/check_rndtrip -r"
	# stop and start the scheduler
	stop-msg sched; start-msg sched

   c) If you use Big Brother:

        The default reporting style is to use BB, edit the etc/alarms.cfg to setup the 
        location of the BBHOME variable. No need to create an ext script. 

        However, if you do wish to have all the scheduling control rest inside of the bigbrother framework,
        you will want to define an ext script which does ssh or rsh as the "mailsrv" user to execute the scripts.

