Sun Java System Web Proxy Server 4.0.3 2006Q2 Administration Guide

Enabling and Starting the SNMP Master Agent

Master agent operation is defined in an agent configuration file named CONFIG. You can edit the CONFIG file using the Server Manager, or you can edit the file manually. You must install the master SNMP agent before you can enable the SNMP subagent.

If you get a bind error similar to “System Error: Could not bind to port,” when restarting the master agent, use ps -ef | grep snmp to check if magt is running. If it is running, use the command kill -9 pid to end the process. The CGIs for SNMP will then start working again.

This section includes the following topics:

Starting the Master Agent on Another Port

The Administration Interface will not start the SNMP master agent on ports other than 161.

ProcedureTo manually start the master agent on another port

Steps
  1. Edit /server_root/plugins/snmp/magt/CONFIG to specify the desired port.

  2. Run the start script as follows:

    cd /server_root/proxy-admserv

    ./start -shell /server_root/plugins/snmp/magt/magt

    /server_root/plugins/snmp/magt/CONFIG

    /server_root/plugins/snmp/magt/INIT

    The master agent will then start on the desired port. However, the user interface will be able to detect that the master agent is running.

Manually Configuring the SNMP Master Agent

ProcedureTo configure the master SNMP agent manually

Steps
  1. Log in as superuser.

  2. Check to see if there is an SNMP daemon (snmpd) running on port 161.

    If an SNMP daemon is running, make sure you know how to restart it and which MIB trees it supports. Then kill its process.

  3. Edit the CONFIG file located in plugins/snmp/magt in the server root directory.

  4. (Optional) Define sysContact and sysLocation variables in the CONFIG file.

Editing the Master Agent CONFIG File

ProcedureTo configure the master SNMP agent manually

Steps
  1. Log in as superuser.

  2. Check to see if there is an SNMP daemon (snmpd) running on port 161.

    If an SNMP daemon is running, make sure you know how to restart it and which MIB trees it supports. Then kill its process.

  3. Edit the CONFIG file located in plugins/snmp/magt in the server root directory.

  4. (Optional) Define sysContact and sysLocation variables in the CONFIG file.

Defining sysContact and sysLocation Variables

You can edit the CONFIG file to add initial values for sysContact and sysLocation which specify the sysContact and sysLocation MIB-II variables. The strings for sysContact and sysLocation in this example are enclosed in quotes. Any string that contains spaces, line breaks, tabs, and so on must be in quotes. You can also specify the value in hexadecimal notation.

Here is an example of a CONFIG file with sysContract and sysLocation variables defined:

COMMUNITY public

ALLOW ALL OPERATIONS

MANAGER nms2

SEND ALL TRAPS TO PORT 162

WITH COMMUNITY public

INITIAL sysLocation "Server room

987 East Cannon RoadMountain View, CA 94043 USA" INITIAL sysContact "Jill Dawson email: jdawson@example.com"

Configuring the SNMP Subagent

You can configure the SNMP subagent to monitor your server.

ProcedureTo configure the SNMP subagent

Steps
  1. Access the Server Manager, and click the Server Status tab.

  2. Click the Configure SNMP Subagent link.

    The Configure SNMP Subagent page displays.

  3. Enter the name and domain of the server in the Master Host field.

  4. Enter the Description of the server, including operating system information.

  5. Enter the Organization responsible for the server.

  6. Enter the absolute path for the server in the Location field.

  7. Enter the name of the person responsible for the server and the person’s contact information in the Contact field.

  8. Select On to Enable the SNMP Statistics Collection.

  9. Click OK.

  10. Click Restart Required.

    The Apply Changes page appears.

  11. Click the Restart Proxy Server button to apply the changes.

Starting the SNMP Master Agent

Once you have installed the SNMP master agent, you can start it manually or by using the Administration Server.

Starting the SNMP Master Agent Manually

To start the master agent manually, enter the following at the command prompt:

# magt CONFIG INIT&

The INIT file is a nonvolatile file that contains information from the MIB-II system group, including system location and contact information. If INIT does not already exist, starting the master agent for the first time will create it. An invalid manager name in the CONFIG file will cause the master agent start-up to fail.

To start a master agent on a nonstandard port, use one of two methods:

Method one: In the CONFIG file, specify a transport mapping for each interface over which the master agent listens for SNMP requests from managers. Transport mappings allow the master agent to accept connections at the standard port and at a nonstandard port. The master agent can also accept SNMP traffic at a nonstandard port. The maximum number of concurrent SNMP is limited by your target system’s limits on the number of open sockets or file descriptors per process. Here is an example of a transport mapping entry:

TRANSPORT extraordinary SNMP

OVER UDP SOCKET

AT PORT 11161

After editing the CONFIG file manually, you should start the master agent manually by typing the following at the command prompt:

# magt CONFIG INIT&

Method two: Edit the /etc/services file to allow the master agent to accept connections at the standard port as well as a nonstandard port.

Starting the SNMP Master Agent Using the Administration Server

ProcedureTo start the SNMP master agent using the Administration Server

Steps
  1. Log in to the Administration Server.

  2. From the Administration Server , choose the Control SNMP Master Agent page from the Global Settings tab.

  3. Click Start.

    You can also stop and restart the SNMP master agent from the Control SNMP Master Agent page.