SNMP master agent

EAServer includes the SNMP master agent, which is a public domain SNMP agent, freely obtainable from the J.AgentX Web site. You can also use your own SNMP master agent if it is AgentX-enabled. The SNMP master agent works with the SNMP protocol SNMPv1.

If you use the SNMP master agent that is included in this release, you can specify the ports it uses by supplying suitable arguments to the start-up script start-master-agent.sh or start-master-agent.bat, located in DJC_HOME/bin. The default SNMP UDP (User Datagram Protocol) port is 7776. The default port used by the AgentX protocol is 7777, and this is the port that the JMX agent connects to using its default configuration file.

StepsConfiguring the SNMP master agent

If you have an SNMP client tool that listens for traps, you can configure the master agent to send SNMP traps to a designated trap receiver by setting the SEND_TRAPS variable:

  1. Change to the DJC_HOME/config/jmx directory.

  2. Open the master.conf file and edit the values that you want to change. The following master.conf file is included with EAServer:

    ############################################
    # SNMP eXtensible Agent configuration file #
    ############################################
    VERBOSE=false
    SNMP_UDP_PORT=7776
    AGENTX_UDP_PORT=7777
    #SNMP_UDP_PORT=161
    #AGENTX_UDP_PORT=705
    
    # Values to fill in the system node of the MIB
    SYS_DESCR=SNMP eXtensible Agent developed at University of Coimbra, Portugal
    SYS_OBJECTID=0.0
    SYS_CONTACT=agentx@dei.uc.pt
    SYS_NAME=J.AgentX
    SYS_LOCATION=UC-PT
    SYS_SERVICES=0
    
    # IP and UDP port from the managers that receive the traps
    SEND_TRAPS=localhost:162;
    
    # Views over the MIB implemented in the master agent - note that
    # the SNMP MIB module is read only.
    VIEWS=public:system.read/snmp.read/agentx.read;admin:system.readwrite/
    snmp.read/agentx.readwrite;
    

StepsStarting the SNMP master agent

  1. Change to the DJC_HOME/bin directory, and enter:On UNIX or in an MKS shell on Windows – start-master-agent.sh

    On Windows – start-master-agent.bat

    start-master-agent writes output to logs/master.stdout.

Install production servers as Windows services, so the servers start automatically when Windows starts. Do not install development servers as Windows services, since you will often want to run the debug server on your development machine, and you cannot run the debug server as a Windows service.

StepsRunning the SNMP master agent as a Windows service

  1. Run the following command in the EAServer bin subdirectory, using the options described in Table 14-1.

    start-master-agent
    

    When the master agent is installed as a Windows service, the display name is “SybMaster.”

    Table 14-1: SNMP master agent service options

    Option

    Description

    -h

    Display the list of options available.

    -start

    Starts the master agent as a Windows service.

    -stop

    Stops the master agent service.

    -restart

    Stops, then starts the master agent service.

    -install

    Installs the master agent as the SybMaster Windows service.

    -remove

    Removes the master agent from the list of Windows services.

StepsStopping the SNMP master agent on UNIX

  1. Find the SybMaster process number and kill the process; for example:

    ps -ef | grep java
    kill -9 <process_ID>
    

    You can also run these commands from an MKS shell on Windows.

StepsStopping the SNMP master agent on Windows

  1. In the SybMaster window, enter Ctrl+C.