|
|
|
||||||||||||||||||||||||||
|
AMS menu
|
AMS is a client/server product. This installation is not as 'slick' as
it could be. One day I may get round to writing an install script for
it, but for now the step-by-step guide is below. The server runs only
on Unix platforms, whereas the client should run on any platform where
a Java runtime is available. Please read and understand the term of the AMS
license before proceeding. PrerequisitesThe server (ams_server) was written and tested using Perl
5.6.0, it may work with an earlier release - I don't know. It utilises
the IO::Socket and IO::Select modules.
Both these modules are part of the core 5.6 Perl release. The sole purpose
of the server is to pass syslog messages from syslog to the GUI front
end. The interpreter line at the top of the script specifies the Perl
interpreter to be /usr/bin/perl Server setupIn order to install the server you will need root access to the syslog
system. Be aware that there is no security or authentication between the client
and the server. Thus anyone who can connect to the server's port can
view you syslog output. # netstat -an | grep 4000 If port 4000 is already in use you will need to modify the ams_server
script. You simply need to add a PROGRAM entry for ams_server to syslog-ng's configuration file. If you are moving from a generic Solaris configuration the following line will do the trick; destination all { file("/var/adm/messages"); program("/usr/local/adm/ams_server.pl");};
Restart syslog-ng, with a sequence such as;
# sh /etc/init.d/syslog-ng stop
# sh /etc/init.d/syslog-ng start
Now skip to the section marked "Check that the server is running". The syslog-ng start/stop script is provided in the 'unsupported' directory under the main ams distribution directory - it is not supported.. Server setup with a generic
syslog Most generic syslog's seem incapable of sending their output in an unbuffered fashion to another program, thus the only reliable method is the use of named pipes(fifos). If anyone has a better mechanism please feel free to drop me a line Edit the ams_server.pl script, removing the first '#' character from
the line that reads You need to arrange to start ams_server.pl somehow. Because of fifo
semantics (esp. under Solaris) ams_server needs to be started before
syslog. The simplest way of doing this is to edit the syslog startup script
( on Solaris this is /etc/init.d/syslog ) and insert the line Finally, you need to add an entry to you syslogd.conf file. As syslog
config files differ considerably in this respect I suggest you consult
your documentation for the correct syntax. A common example is; Restart syslog in a manner appropriate to your installation. Check that the server is
running # ps -ef | grep ams_server root 149 148 0 14:15:06 ? 0:00 /bin/sh -c /usr/local/adm/ams_server.pl root 150 149 0 14:15:06 ? 0:17 /usr/bin/perl /usr/local/adm/ams_server.pl You should be able telnet to port 4000, and you ought to see a short message from the server, e.g; -Hello there. You are connected from "laptop [192.9.200.118], port 1066, (client id=0) -My time is Thu Oct 3 11:17:38 2002 *CLIENTID 0 If you intend to run the applet version of AMS, some sort of http/web server needs to be running on your syslog server. Web server setup is beyond the scope of this document. JavaIn order to run either the applet or standalone client you need to have a Java runtime for your client platform. AMS will run with any Java runtime from version 1.1 up. Many systems including, Microsoft's Windows98 and Windows2000, as well as Sun Solaris have this pre-installed. Some Linux distributions include it - Suse for example. A notable exception is Redhat 7 & 8. In any event the current version of Java for all these platforms is available for free download from from java.sun.com, you only need the J2SE.. Most common browsers come with a Java runtime configured ready to run the applet version of AMS. Thus if you never intend to use the AMS standalone (AMSClient ) you shouldn't need to configure Java at all. If you can a ticking clock at the top of this page then you browser is fine. Whilst Java is standard on most platforms it is not well integrated in the standard environment of any. Try typing 'java -version' at a Windows command prompt or a Unix shell. Most likely you'll get a Windows 'not recognized' or Unix 'Command not found' message. If you see a java version message then you're sorted can can skip the rest of this section. You need to arrange for the java interpreter to be in your Path. On Windows platforms this program is 'java.exe', and Unix simply 'java'. Unix users simply need to add the directory 'java' lives in to
their PATH environment via whatever shell startup file is appriopiate
- .cshrc, .bashrc, .kshrc, etc... export JAVAHOME=/usr/local/j2sdk1.4.0 export CLASSPATH=$JAVAHOME/lib/:$HOME/java/:. export PATH=$PATH:$JAVAHOME/bin Windows95/98 users will need to edit their autoexec.bat file.
Application Setup - AMSClientRunning the client is simple, a lot more simple than the applet. We recommend you give the client a try even if you don't intend to use it in practice - it's a great confidence lifter. Create a new directory/folder, call it say 'ams' and copy all the class
files from the tarball into it. We're using Windows syntax here and assuming
that the tarball was unpacked into a network drive called h: If you have a Java runtime available you can immediately run the client thus; c:\ams> java AMSClient host 4000Where you should substitute host with the name of the host,
or the IP address where ams_server.pl is running. If you needed
to change the port number from 4000 then that needs to be reflected in
this command. Obviously the hostname needs to be resolvable by the client
host - try a telnet host, to verify.. java AMSClient amscfg.txt amscfg.txt will need to be modified to reflect your site configuration. If you get "class not found" type errors, check that your CLASSPATH environment variable contains the directory where the AMS class files live. Applet SetupThe applet can only normally connect to an instance of ams_server.pl
running on the host that it, itself was loaded from. This is a standard
Java/Browser security measure. As a consequence of this your syslog host
must be running some sort of http server. All Applet parameters are documented in the Java doc file. Please check this out, especially the DEBUG parameter, prior to asking for help. Facility names Database search setupStarting with version 1.6, AMS includes a facility to search a Database for syslog messages. To achieve this AMS uses JDBC. This allows any database supporting JDBC ( most of them ) to be accessed by AMS. There are two steps required to configure AMS to access a database. 1. Provide AMS your database configuration via the "DB_*" parameters - either via applet parameters or the AMSClient configuration file. These parameters are documented elsewhere. The most important are JDBCDRIVER and DB_CONNECT_STRING. Once these parameters are provided a new button will appear on the UI labeled "Database". 2. Obtain and install a JDBC Driver for your database. The AMS database search was developed against a Postgres7 database, the driver for this being freely available. The JDBC driver Postgres is available via their JDBC website, and that for MySQL is available via this page Installing the JDBC driver: In essence this should simply be a case of copy the driver JAR file to a location that your client machine can access, and setting the CLASSPATH environment variable to point at it. Configuring CLASSPATH on Unix systems will be familar to anyone who has ever seen the PATH variable - essentially CLASSPATH works the same way, with the subtle difference that a JAR file needs to be explicitly named. E.g export CLASSPATH=$HOME/postgres.jar:. Windows users should read Sun's tutorial on the subject - Setting
CLASSPATH on Windows
Windows installation has proved problematic, largely because of differences
in way various versions of Browser and JavaVM handle the CLASSPATH issue.
Thus we recommend first getting AMSClient running with database access. 1. Netscape 4.51 ( Symantec JavaVM 1.1.5 ) will actually try to load class files specified in applet parameters from CLASSPATH in preference to using HTTP. We consider this is seriously broken behaviour. AMS will fail to operate in this situation because if loaded from via the filesystem it will be unable to perform any network connection - standard Java security constraints. 2. Internet explorer 5 with the Sun Java plugin seems to completely ignore
the CLASSPATH setting. This makes it nearly impossible to get a 3rd party
JDBC driver loaded....
One approach that you may wish to consider if you have difficulties with
CLASSPATH is appending the JDBC driver classes to the ams.jar file. Simply
create a empty folder/directory and use the Java SDK tool 'jar' to extract
both the ams and JDBC driver classes to that directory. Then repackage
them into a new ams.jar file. This is the only workaround we have found
to problem#2 above.
|
||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||