INSTALLING THE WLI 8.1 SNMP AGENT

The WLI SNMP agent consists of a Startup Application and an 
EJB. Both of these are contained in the snmpagent.zip file that is 
available for download on dev2dev. Instructions for uploading and 
installing startup applications and EJBs can be found in the WLS 
8.1 documentation set.

This document and the files in WLI SNMP Agent download 
archive are copyright 2003, BEA Systems, Inc, All Rights 
Reserved.

The SNMP Agent must be associated (see instructions below in the 
"Starting the Agent" section) with a valid WLS user account that 
has Administrator privileges (is in the Administrator group). You 
may use an existing administrator account or create a new 
administrator account for use by the SNMP Agent. Next, you must 
create a WLI Password Store entry for the password that is used 
with this administrator account. The Password Alias Name you use 
becomes the SNMP read-only and read-write community names. 
(All SNMP requests made from a manager to an agent contain a 
plain-text community name. This community name is the password 
that the SNMP Agent uses to determine if the manager can access 
the information provided by SNMP.) If you wish to use separate 
community names for read-only and read-write access then create 
two Password Store aliases with different names (but with the 
same administrator account password).

The Password Store is available in the WLI Console in the System 
Configuration section.

To install the EJB, open a web browser window and log into WLS,
using an account with Administrator privileges. In the navigation
tree on the left-hand side of the page click on "EJB Modules" in
the "Deployments" subtree. In the "Integration > EJB Deployments" 
page click "Deploy a new EJB Module" to start the EJB install. 
The EJB is contained in snmpagent.jar. 

Starting the Agent		
------------------

The SNMP Agent can be configured to start automatically when 
the WLS server is started or can be started and stopped manually. 
To have the SNMP Agent start automatically you must configure a 
WLS Startup/Shutdown application. To start and stop the agent 
manually you execute the StartSNMPAgent application from the 
command line. 

In the descriptions of each option below replace "<admin-acct>" 
with the WLS administrator account described in the preceding 
section, "<read-only-alias>" with the WLI Password Store alias to 
be used as the SNMP read-only community name and "<read-
write-alias>" with the Password Store alias to be used as the 
SNMP read-write community name. The port argument can be 
replaced with a different port number, if required.

Using a WLS Startup/Shutdown Application
----------------------------------------

To create a WLS Startup application click on "Startup & 
Shutdown" in the WLS Console navigation tree and then click 
"Configure a new Startup Class" For the "ClassName:" field 
enter:

	com.bea.wli.snmp.agent.SnmpStart

This application is contained in SNMPAgent.jar. You must add 
this .jar file to the WLS classpath. You may do this either by 
modifying the appropriate startweblogic.cmd script or by adding 
StartSNMPAgent.jar to the EXT_POST_CLASSPATH 
environment variable. When WLS is started you will see a warning 
message about the class FacadeBean and other related classes 
being loaded from the system classpath. This is normal behavior.

The startup arguments are:

   -username <admin-acct> -ro <read-only-alias> -rw<read-write-alias> -port 8161

8161 is the port on which the agent listens for SNMP requests. 
You may use another port as required.

Starting and stopping the SNMP Agent Manually
---------------------------------------------

If you do not wish to configure WLS with the SnmpStart startup 
application, or you want to restart the SNMP Agent, you can start 
it by executing the StartSNMPAgent application from the 
command line. The format of the command line is shown below:

	java cp StartSNMPAgent.jar;weblogic.jar;wli.jar    \
  	  com.bea.wli.snmp.startup.StartSNMPAgent           \
      -username <admin-acct> -ro <read-only-alias>      \
      -rw <read-write-alias> -port 8161

As above, replace <admin-acct>, <read-only-alias> and <read-
write-alias> with the appropriate WLS account name and WLI 
Password Store aliases. You will be prompted for the actual 
password for the account <admin-acct>. If you will be running this 
application from an automated script you can add the password 
argument: -password <admin-acct-password>.

Depending on the contents of your system's CLASSPATH environment
variable, you may need to alter the "-cp" parameter to include
full path names for the three .jar files. Also, if you are not
executing this application on the WLS Administration server you
will need to include the "-hostname" parameter to identify the
WLS Admin server; for example:

	-hostname   t3://adminsvr.wls.yourcompany.com:7001

Replace "adminsvr.wls.yourcompany.com" with the name or IP 
address of the WLS Admin server and replace "7001" with the port 
used on that server (7001 is the typical default value.)

To stop the SNMP Agent use the WLS Console to stop the SNMP 
Agent EJB. To restart the SNMP Agent without restarting WLS, 
first Deploy the SNMP Agent EJB (stopping and deploying an EJB 
are done on the "Deploy" panel of the WLS page for the EJB 
Module), then execute the StartSNMPAgent application as 
described above.
