Removed /usr/local from CDPATH
[clearscm.git] / clearadm / README
1 CLEARADM:
2
3 Clearadm is a set of scripts and a web app designed to discover and monitor 
4 systems in your infrastructure with an eye towards servers as well as Clearcase.
5
6 DEPENDENCIES:
7
8 In order for graphics to work you need to install GD for Perl (libgd-graph-perl
9 and I also installed libgd-graph3d-perl) as well as GD::Graph from cpan.
10
11 While Clearadm is designed to monitor Unix, Linux and Windows machines, it 
12 requires the installation of Cygwin and Cygwin's Perl package to run on Windows.
13 Clearagent also requires Cygwin and Cygwin's Perl.
14
15 INSTALLATION
16
17 SERVER Selection
18
19 Clearadm is a distributed system. Various components can be set up to run on
20 different servers. For example, the database server machine need not be the same
21 machine that the web component of Clearadm runs. Additionally all systems report
22 status through clearagent.pl by running a small agent daemon. Finally 
23 cleartasks.pl performs scheduled tasks and it can run on a separate server.
24 Generally you only use one or two servers but you have the option to distribute
25 the load.
26
27 CLEARADM Database
28
29 Clearadm uses a MySQL database to store information about your infrastructure.
30 Unpack the clearadm.tar.gz file (normally rooted in /opt/clearscm) and set up
31 the MySQL database by executing mysql then sourcing:
32
33   clearadm.sql  -- Creates the database
34   users.sql     -- Sets up the database users
35   load.sql      -- Loads up some predefined tasks and schedules
36
37 CLEARAGENT Setup
38
39 Clearagent: This is a little agent program that receives requests from other
40 hosts and executes them on the host running clearagent. As such you want to have
41 clearagent.pl running all the time. Normally it backgrounds itself and it is
42 multithreaded so that it can handle multiple requests efficiently.
43
44 Clearagent components have been separated into the clearagent.tar.gz file. This
45 allows you to install only the clearagent portion on your servers.
46
47 Under Unix/Linux hosts there is a Sys/V init.d script under etc/init.d. 
48 Additionally for security concerns clearagent is run under a plain user named
49 clearagent. In order to set this up on a Unix/Linux host do the following as
50 root:
51
52   $ export CLEARADM=/opt/clearscm/clearadm
53   $ useradd -Mr clearagent
54   $ chmod 777 $CLEARADM/var $CLEARADM/var/run $CLEARADM/log
55   $ ln -s $CLEARADM/etc/init.d/clearagent /etc/init.d/clearagent
56   $ /etc/init.d/clearagent start
57
58 You can test to see if clearagent is running properly by executing:
59  
60   $ $CLEARADM/clearexec.pl -host localhost
61   clearexec:hostname
62   <localhost>
63   clearexec:exit
64   $
65
66   For Windows machines, assuming you have Cygwin installed, create a service for
67   clearagent:
68
69   $ cygrunsrv -I clearagent -p C:/Cygwin/bin/perl \
70   > -a '/opt/clearscm/clearadm/clearagent.pl -nodaemon'
71   $ net start clearagent
72
73   Note that -nodaemon is used but the Windows service will handle the 
74   backgrounding of clearagent. Testing clearagent is the same as for Unix/Linux.
75   
76 CLEARADM Discovery
77
78 You can use the discover.pl script to discover machines on the network and have
79 them added to the clearadm database. However, until you set up clearagent on
80 those machines, monitoring of these systems will be limited.
81   
82 CLEARADM Web
83
84 Clearadm Web component should be running on one server in your subnet. It is
85 designed to work with Apache 2 Web servers. Symlink
86 $CLEARADM/etc/conf.d/clearadm -> /etc/apache2/conf.d and restart Apache
87
88 CLEARADM Tasks
89
90 In additional to setting up the database, web server and installing agents on
91 the various machines you wish to monitor, you should run cleartasks.pl to 
92 perform the scheduled tasks on a periodic bases. Clearadm comes with some 
93 predefined tasks. You can add/develop your own. Simply run cleartasks.pl and it
94 will background itself, performing tasks when necessary (Should we make an 
95 init.d script for this? My worry is that if that gets configured on more than
96 one machine...)
97
98 CLEARADM Clearcase Reporting (Need to fill this out better)
99
100 Clearadm can show you where your views and vobs reside as well as provide useful
101 functionality like a view aging report, etc. In order to collect such 
102 information Clearadm needs to periodically collect information about those
103 Clearcase objects. Predefined scheduled tasks and alerts are set up to do this
104 but you must do some configuration yourself to tell Clearadm where your 
105 Clearcase objects reside. For example, you need to tell it where your registry
106 server(s) are, what regions you wish to report on as well as set other 
107 configuration settings as to how long to age views and vobs, etc.
108