Systems Management functionality  Running the JMX agent

Chapter 13: Using Systems Management

SNMP functionality

This release of the Sybase Systems Management framework provides support for SNMP. The Systems Management framework allows SNMP clients (for example, management consoles) to view information about underlying system status using standard SNMP protocols. To access SNMP information in this way, use a management console or an SNMP-enabled client front-end that is capable of interacting with an SNMP master agent. This release includes a master agent that uses the AgentX protocol to interface with the JMX agent that runs on the machine hosting the monitored application. You can replace this master agent with your own, provided it is AgentX-enabled.


SNMP master agent

This version 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 protocols SNMPv1, SNMPv2, and SNMPv3.

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 SybMaster.sh or SybMaster.bat, located in ROOT/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 ROOT/bin 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 ROOT/bin directory, and enter:On UNIX or in an MKS shell on Windows – SybMaster.sh [-v]

    On Windows – SybMaster.bat [-v]

    Use the -v option to generate more verbose output. SybMaster writes output to master.stdout, in the EAServer SysMgmt directory.

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.


SNMP management console

To view SNMP information, you need a management console that connects to the SNMP master agent. The console connects to the SNMP agent on the port you specify when starting the SNMP agent. Various public domain management consoles or client front ends are available, as well as commercially provided ones.


SNMP MIBs

This release includes the following MIBs:

For each MIB, there is a MibManager MBean, which is responsible for registering the MIB (and its OID sub-tree) with the SNMP master agent, and for managing the creation of tables and scalars that the MIB is composed of.

With the J2EE MIB, EAServer start-up and shutdown events trigger an SNMP trap that is forwarded to the master agent, and then (depending on master agent configuration) to destination trap receivers. This allows management consoles that can receive these traps to be notified quickly when, for example, EAServer has gone down.


NETWORK-SERVICES MIB

The NETWORK-SERVICES MIB was originally defined in RFC (Request For Comments) 1565, and provides a means for listing network-available services through a standard MIB definition.

In this implementation, Sybase populates only the applTable table, creating a row for each service that is registered with the ServicesManager MBean. The service’s state is displayed in the applOperStatus column. The service name—as registered with the ServicesManager—is displayed in the applName column. The assocTable table is not used.


J2EE MIB

The J2EE MIB was defined under JSR 77, a Java community program to provide a management framework for application servers. It provides a number of groups, each of which contains a set of related tables, that are used to represent the contents or structure of an application server, and allow SNMP clients to obtain statistical information about the application server.

For this release of the System Management framework, not all the tables in the MIB are populated. Additional EAServer-specific information, not available in the standard J2EE MIB, is provided by extra tables that are included under the J2EE OID sub-tree. The following sections describe the current implementation of the J2EE MIB as shipped with this release.

j2eeMoGroup

The j2eeMoGroup contains tables for various objects and structures located in the application server. For example, it contains information about configured servers, JVMs, and EJBs.

This j2eeMoGroup contains the EAServer-specific tables described in Table 13-1.

Table 13-1: EAServer-specific tables

Table name

Contains information about

j2eeEasNetworkTable

Network connections

j2eeEasMSTable

Message service components

j2eeEasPackageTable

Packages

j2eeEasComponentTable

Components

j2eeEasConnCacheTable

Connection caches

j2eeEasClusterTable

Clusters

j2eeEasConnectedUserTable

Connected IIOP users

j2eeEasStatGroup

The j2eeEasStatGroup contains the EAServer statistics tables described in Table 13-2.

Table 13-2: EAServer statistics tables

Table name

Contains statistics for

j2eeEasNetworkStatTable

Network connections

j2eeEasMSStatTable

Message service entries

j2eeEasMSQueueStatTable

Message queues

j2eeEasMSTopicStatTable

Message topics

j2eeEasMSThreadPoolStatTable

Thread pools

j2eeEasPackageStatTable

Packages

j2eeEasComponentStatTable

Components

j2eeEasConnCacheStatTable

Connection caches

j2eeJvmStatGroup

The j2eeJvmStatGroup includes a single table, j2eeJvmStatTable, which contains statistics for the JVMs that are running.

Unsupported groups

The J2EE MIB groups listed below are not supported in this release:


SNMP MIB implementation details

When a SNMP client, such as an SNMP management console, requests information that is located within one of the supported MIBs, the values that are returned to the client are determined by the MBeans that are deployed in the JMX agent that supports the MIB. The MBeans interact directly with the underlying managed resource to obtain the values. For example, the J2EE MIB provides details associated with EAServer. This information is extracted from EAServer by the EAServer proxy MBean, using EAServer-specific APIs—see “EAServer proxy MBean”.

Because an SNMP client can generate many requests in rapid succession, it is not reasonable to generate a corresponding request against EAServer for each request that is received from the client. Instead, the JMX agent MBeans cache information retrieved from EAServer, and re-query the server only when the cached data becomes stale. Cached data includes information about the existence of rows in a table (there may be a row for each deployed EJB), and the values in each row. Cached data becomes stale at different rates; by default, 60 seconds for the existence of rows, and 10 seconds for the values in a row. JMX agent MBeans recalculate the existence or rows within a table when 60 seconds have elapsed since the last time the rows were calculated. The MBeans refresh the contents of a row when 10 seconds have elapsed since the last time the row was refreshed. Typically, the structure of a table changes infrequently, if at all; the content of rows is more dynamic.


SNMP MIBs and EAServer 4.x

EAServer 4.x shipped with an SNMP implementation that included a highly proprietary MIB (SYBASE-Easnew). Most of the information that was provided in this MIB is now located in the EAServer-specific tables of the J2EE MIB described above.

The SYBASE-Easnew MIB enabled you to start and stop EAServer over SNMP, using OIDs. This feature is not supported in the current version of the J2EE MIB. To achieve the same functionality, use the JMX APIs exposed in this release of the Systems Management framework.





Copyright © 2005. Sybase Inc. All rights reserved. Running the JMX agent