$Id: INSTALL,v 1.8 1999/04/18 17:45:47 trockij Exp $

INSTALLATION
------------

Several parts:

    1. mon, the server

    2. Mon::Client, the Perl library used by some clients.

    3. C programs in mon.d


REQUIREMENTS
------------

The "mon" daemon uses Perl 5.n, where n >= 004_04. You really want at
least 5.004_04, which fixes a few memory leaks, and has a Sys::Syslog
which works with Linux.

You'll need the following modules for the server to function, all of
which are available from your nearest CPAN archive:

    -Time::Period
    -Time::HiRes
    -Convert::BER

All of the monitor and alert scripts that are packaged with mon are
actually *optional*. However, this is what you'll need for each special
monitor:

    freespace.monitor
	The disk space monitor requires the "File::Df" Perl module from CPAN.

    fping.monitor
	Requires the "fping" code, probably available from the same
	place that you go this package.

    telnet.monitor
    tcp.monitor
	To use "telnet.monitor" and "tcp.monitor", you need the "tcp_scan" utility
	from Wietse Venema and Dan Farmer's Satan package.  If you're building
	under Linux, you'll need to patch the satan-1.1.1 distribution. Patches
	are available from ftp://sunsite.unc.edu/pub/Linux/system/network/admin.

    reboot.monitor
    netappfree.monitor
    process.monitor
    hpnp.monitor
	All use the UCD SNMP 3.3.1 package, along with G.S. Marzot's
	Perl module.

    ldap.monitor
	requires the Net::LDAPapi Perl module, available from CPAN.

    dialin.monitor
	requires the Perl Expect module, available from CPAN.

    dns.monitor
	requires the Net::DNS Perl module.

    msql-mysql.monitor
	requires the MSQL/MySQL DBD module and DBI front-end.


1. MON SERVER INSTALLATION
--------------------------

-Read the man page for "mon" and "moncmd" in the doc/ directory.

 cd doc
 nroff -man mon.1 | more

-Read the "READMEs" in the doc/ directory for some useful
 insight on system configuration.

-Be sure you have the required Perl modules, which are listed in the
 main README.

-cd mon.d
 (edit Makefile)
 make

 to build the RPC monitor.  Keep in mind that if this may fail for
 some reason (it works under Linux, Solaris, and AIX), it is not required
 for the operation of mon itself.

-Make your own mon.cf file, using the suppled "example.cf" (located
 in the etc/ directory) as a template.

-Edit the "auth.cf" file. This file controls which users can perform
 what command. The default is pretty restrictive (read-only), but that's
 only for safety. Currently, "moncmd" is the only client which
 is able to authenticate itself to the server; "mon.cgi" does not
 do authentication yet, and nor does the 2-way pager interface.
 However, these programs work fine in read-only mode.

-Add the following lines to /etc/services:

mon             2583/tcp                        # MON
mon             2583/udp                        # MON traps

-You may want to make a DNS CNAME entry called "monhost" for your
 host that will run "mon". You can then set the environment variable
 MONHOST to be this host. "moncmd" uses this variable.

-The Perl scripts look for perl in /usr/bin. You might want to change
 this. I'd advise keeping a locally-installed copy of Perl if you're
 going to monitor network resources and you expect this stuff to work
 when some component of the network is down.

-Test it by starting "mon" from the distribution directory. Use these
 arguments:

./mon -f -c mon.cf -s mon.d -a alert.d

To get see if it's running on your machine:

./clients/moncmd -d list pids

If you get some output, then things are probably OK.

Mon doesn't really need to be installed in any special location.  Just
keep it on the local disk of the machine which will be running the server.


2. INSTALLING THE PERL CLIENT MODULE
------------------------------------

cd Mon-0.01
perl Makefile.PL
make
make test

If the test doesn't fail, then

make install


3. COMPILING THE C CODE
-----------------------

cd mon.d
(edit Makefile)
make
make install
