Sun Java System Web Server 7.0 Update 5 Administrator's Guide

Configuring SNMP Subagent

SNMP is a protocol used to exchange data about network activity. With SNMP, data travels between a managed device and a network management station (NMS). A managed device is anything that runs SNMP: hosts, routers, your web server, and other servers on your network. The NMS is a machine used to remotely manage that network. Usually, the NMS software will provide a graph to display collected data or use that data to make sure the server is operating within a particular tolerance.

The NMS is usually a powerful workstation with one or more network management applications installed. A network management application such as Sun Management Center graphically shows information about managed devices, such as your web servers. For example, it might show which servers in your enterprise are up or down, or the number and type of error messages received. When you use SNMP with a Sun Java System Web Server, this information is transferred between the NMS and the server through the use of two types of agents, the subagent and the master agent.

The subagent gathers information about the server and passes the information to the server’s master agent.

To start the SNMP subagent, perform the following tasks:

  1. Click the Nodes tab.

  2. Select an available node from the nodes list.

  3. Click the SNMP Subagent tab.

  4. Click Start SNMP Subagent to start the subagent.


Note –

Before starting the SNMP subagent, verify that the master agent is running. The subagent is started only when the master agent is running.


To stop the SNMP subagent, perform the following tasks:

  1. Click theNodes tab.

  2. Select an available node from the nodes list.

  3. Click the SNMP Subagent tab.

  4. Click Stop SNMP Subagent to stop the subagent.

To use SNMP you must have a master agent and at least one subagent installed and running on a your system. You need to install the master agent before you can enable a subagent.

The procedures for setting up SNMP are different depending upon your system. The following table provides an overview of procedures you will follow for different situations. The actual procedures are described in detail later in the chapter.

Before you begin, you should verify two things:

See the system documentation for information on how to verify this information.


Note –

After changing SNMP settings in the Administration Server, installing a new server, or deleting an existing server, you must perform the following steps:


Table 13–4 General Guidelines

If your server meets these conditions

Follow these procedures

  • No native agent is currently running

  1. Start the master agent.

  2. Enable the subagent for each server installed on the system.

  • Native agent is currently running

  • No SMUX

  • No need to continue using native agent

  1. Stop the native agent when you install the master agent for your Administration Server.

  2. Start the master agent.

  3. Enable the subagent for each server installed on the system.

  • Native agent is currently running

  • No SMUX

  • Needs to continue using native agent

  1. Install a proxy SNMP agent.

  2. Start the master agent.

  3. Start the proxy SNMP agent.

  4. Restart the native agent using a port number other than the master agent port number.

  5. Enable the subagent for each server installed on the system.

  • Native agent is currently running

  • SMUX supported

  1. Reconfigure the SNMP native agent.

  2. Enable the subagent for each server installed on the system.

Configuring SNMP Using CLI

ProcedureTo Activate SNMP on Solaris

  1. Configure SNMP Parameters.

    Set the SNMP parameters for the configuration.


    wadm> enable-snmp --user=admin --password-file=../admin.passwd 
    --host=serverhost --port=8989 --ssl=true --no-prompt --rcfile=null 
    --config=config1 --loconfig1ion=india --master-host=hostname 
    --description=cli-snmp --organization=sun --contact=internal
  2. Deploy the Configuration.


    wadm> deploy-config --user=admin --password-file=admin.pwd 
    --host=serverhost --port=8989 config1
  3. Start the Server Instance.


    $ ./https-test/bin/startserv
  4. Run the Master Agent (magt) as root.


    Note –

    To run magt, native snmpd must be stopped.



    $ cd /etc/init.d/
    		   $ init.dmi stop; init.snmpdx stop; init.sma stop

    Remove the file https-admserv/config/logs/pid.masteragt (If present).


    $ rm ./https-admserv/config/logs/pid.masteragt
        	   wadm>  start-snmp-master-agent --snmp-port 161 hostname
  5. Start the Sub Agent.

    Remove the file https-admserv/config/logs/pid.httpagt( If present).


    $ rm ./https-admserv/config/logs/pid.httpagt

    Kill the httpagt if it is already running


    wadm> start-snmp-subagent hostname

ProcedureTo Activate SNMP on Linux

  1. Configure SNMP Parameters.

    Set the SNMP parameters for the configuration.


    wadm> enable-snmp --user=admin --password-file=../admin.passwd 
    --host=serverhost --port=8989 --ssl=true --no-prompt --rcfile=null 
    --config=config1 --loconfig1ion=india --master-host=hostname 
    --description=cli-snmp --organization=sun --contact=internal
  2. Deploy the Configuration.


    wadm deploy-config --user=admin --password-file=admin.pwd 
    --host=serverhost --port=8989 config1
  3. Start the Server Instance.


    $ ./https-test/bin/startserv
  4. Run the Native Master Agent (snmpd) as root.

    To allow direct communication with snmpd , add the following line in /etc/snmp/snmpd.conf and restart snmpd.

    smuxpeer 1.3.6.1.4.1.42.2.190.1

    view systemview included .1.3.6.1.4.1.42.2.190.1


    # cd /etc/init.d/
          # ./snmpd stop
          # ./snmpd start
  5. Start the Sub Agent.

    Remove the file https-admserv/config/logs/pid.httpagt( If present).


    $ rm ./https-admserv/config/logs/pid.httpagt

    Kill the httpagt if it is already running


    wadm> start-snmp-subagent hostname

ProcedureTo Activate SNMP on Windows

  1. Configure SNMP Parameters.

    Set the SNMP parameters for the configuration.


    wadm> enable-snmp --user=admin --password-file=../admin.passwd 
    --host=serverhost --port=8989 --ssl=true --no-prompt --rcfile=null 
    --config=config1 --loconfig1ion=india --master-host=hostname 
    --description=cli-snmp --organization=sun --contact=internal
  2. Deploy the configuration.


    <install_root>\bin\wadm.bat deploy-config --user=admin --host=<hostname> --port=8989 <config1>

    You can check whether the SNMP service has been enabled, by running the command:


    <install_root>\bin>wadm.bat get-snmp-prop --user=admin --port=8989 -c <config1>
    
    contact=internal
    enabled=true
    description=snmp
    master-host=127.0.0.1
    location=us
    organization=sun
  3. Start the Web Server instance using Windows Services option.

  4. Configure both SNMP and SNMP Trap Services according to the MSDN document.

  5. Start SNMP Service and SNMP Trap Service using Windows Services option.


    Note –

    Ensure that <install_root>/lib directory is present in the System Path environment variable.


ProcedureTo Configure Peer Based Master Agent (magt)

You can configure peer based master agent to integrate with OS Native Master Agent on Solaris 10 and Linux by following these steps.


Note –

The Solaris 10 OS Native Master Agent is snmpd. By default it runs on SNMP default UDP port 161. This agent is configurable using the /etc/sma/snmp/snmpd.conf file. The agent provides a proxy directive for forwarding the request/response to other Master Agents or to a Subagent. For more information, refer to the snmpd.conf manual page.

For Solaris 8 and 9, there is no clean integration with the OS Native Master Agent snmpd. For Linux, the httpagt can directly integrate with snmpd, in which case there is no need to run magt. For Windows, the Sun Java System Web Server snmp library directly communicates with windows SNMP service.


  1. Start the master agent specifying the SNMP port (11161) as mentioned in the note above.

  2. Add the following in /etc/sma/snmp/snmpd.conf for Solaris 10 .


    proxy -v 1 -c public myserver:11161 .1.3.6.1.4.1.42.2.190.1
  3. Restart the snmpd.


    # cd /etc/init.d
    # init.dmi stop; init.snmpdx stop; init.sma stop
    # init.dmi start; init.snmpdx start; init.sma start
  4. To get the SNMP data use the snmpwalk on port:


    $ snmpwalk -c public -v 1 <host-name>:<port> 1.3.6.1.4.1.42.2.190.1