Sun GlassFish Enterprise Manager SNMP Monitoring 1.0 Installation and Quick Start Guide

Accessing GlassFish SNMP Data Using snmpwalk

The snmpwalk command is one of the standard ways of accessing SNMP data. Any basic SNMP reference on the Internet or in print includes information about using snmpwalk. On the Solaris operating system, the snmpwalk command is available in the /usr/sfw/bin directory. For other platforms, consult the documentation for your operating system.

To make sure that SNMP monitoring is properly installed, use the following snmpwalk command. If you are using a remote machine, substitute the machine name for localhost. Note that the default port is 10161. To change the port, see Changing the SNMP Port Number.


snmpwalk -c public -v 1 localhost:10161 1.3.6.1.4.1.42.2.9999.1.1.1.1.1.2

The output of this command looks like this:


SNMPv2-SMI::enterprises.42.2.9999.1.1.1.1.1.2.1.2.1.1 = STRING: "name=server"
SNMPv2-SMI::enterprises.42.2.9999.1.1.1.1.1.2.1.3.1.1 = OID: SNMPv2-SMI::enterprises.42
SNMPv2-SMI::enterprises.42.2.9999.1.1.1.1.1.2.1.5.1.1 = STRING: "Sun Microsystems, Inc."
SNMPv2-SMI::enterprises.42.2.9999.1.1.1.1.1.2.1.6.1.1 = STRING: "Sun GlassFish Enterprise Server v2.1"
SNMPv2-SMI::enterprises.42.2.9999.1.1.1.1.1.2.1.7.1.1 = INTEGER: 1
SNMPv2-SMI::enterprises.42.2.9999.1.1.1.1.1.2.1.8.1.1 = INTEGER: 1
SNMPv2-SMI::enterprises.42.2.9999.1.1.1.1.1.2.1.9.1.1 = INTEGER: 2
SNMPv2-SMI::enterprises.42.2.9999.1.1.1.1.1.2.1.10.1.1 = INTEGER: 4
SNMPv2-SMI::enterprises.42.2.9999.1.1.1.1.1.2.1.11.1.1 = STRING: "Fri Dec 19 09:37:27 PST 2008"

To generate more human-readable output, use the J2EE-MIB file, available at http://java.sun.com/j2ee/tools/management/downloads/index.html. Make sure this file is located in the directory from which you are running snmpwalk. You can then use the following snmpwalk command to view GlassFish SNMP data:


snmpwalk -c public -v 1 -m ./J2EE-MIB localhost:10161 J2EE-MIB::j2eeSrvTable

If you have just installed the Enterprise Server and have only one server instance, the output of this command looks like this:


J2EE-MIB::j2eeSrvMoName.1.1 = STRING: "name=server"
J2EE-MIB::j2eeSrvEnterprise.1.1 = OID: J2EE-MIB::sun
J2EE-MIB::j2eeSrvVendor.1.1 = STRING: Sun Microsystems, Inc.
J2EE-MIB::j2eeSrvVersion.1.1 = STRING: Sun GlassFish Enterprise Server v2.1
J2EE-MIB::j2eeSrvMoStateManaged.1.1 = INTEGER: true(1)
J2EE-MIB::j2eeSrvMoStatProv.1.1 = INTEGER: true(1)
J2EE-MIB::j2eeSrvMoEventProv.1.1 = INTEGER: false(2)
J2EE-MIB::j2eeSrvSMState.1.1 = INTEGER: running(4)
J2EE-MIB::j2eeSrvSMStartTime.1.1 = STRING: "Fri Dec 19 09:40:21 PST 2008"

If you have a more complex setup that includes clusters, the output of this command looks more like this:


J2EE-MIB::j2eeSrvMoName.1.1 = STRING: "cluster=cl1,name=cl1_ins1"
J2EE-MIB::j2eeSrvMoName.1.2 = STRING: "name=sa_ins3"
J2EE-MIB::j2eeSrvMoName.1.3 = STRING: "name=server"
J2EE-MIB::j2eeSrvMoName.1.4 = STRING: "cluster=cl1,name=cl1_ins2"
J2EE-MIB::j2eeSrvEnterprise.1.1 = OID: J2EE-MIB::sun
J2EE-MIB::j2eeSrvEnterprise.1.2 = OID: J2EE-MIB::sun
J2EE-MIB::j2eeSrvEnterprise.1.3 = OID: J2EE-MIB::sun
J2EE-MIB::j2eeSrvEnterprise.1.4 = OID: J2EE-MIB::sun
J2EE-MIB::j2eeSrvVendor.1.1 = STRING: Sun Microsystems, Inc.
J2EE-MIB::j2eeSrvVendor.1.2 = STRING: Sun Microsystems, Inc.
J2EE-MIB::j2eeSrvVendor.1.3 = STRING: Sun Microsystems, Inc.
J2EE-MIB::j2eeSrvVendor.1.4 = STRING: Sun Microsystems, Inc.
J2EE-MIB::j2eeSrvVersion.1.1 = STRING: Sun GlassFish Enterprise Server v2.1
J2EE-MIB::j2eeSrvVersion.1.2 = STRING: Sun GlassFish Enterprise Server v2.1
J2EE-MIB::j2eeSrvVersion.1.3 = STRING: Sun GlassFish Enterprise Server v2.1
J2EE-MIB::j2eeSrvVersion.1.4 = STRING: Sun GlassFish Enterprise Server v2.1
J2EE-MIB::j2eeSrvMoStateManaged.1.1 = INTEGER: true(1)
J2EE-MIB::j2eeSrvMoStateManaged.1.2 = INTEGER: true(1)
J2EE-MIB::j2eeSrvMoStateManaged.1.3 = INTEGER: true(1)
J2EE-MIB::j2eeSrvMoStateManaged.1.4 = INTEGER: true(1)
J2EE-MIB::j2eeSrvMoStatProv.1.1 = INTEGER: true(1)
J2EE-MIB::j2eeSrvMoStatProv.1.2 = INTEGER: true(1)
J2EE-MIB::j2eeSrvMoStatProv.1.3 = INTEGER: true(1)
J2EE-MIB::j2eeSrvMoStatProv.1.4 = INTEGER: true(1)
J2EE-MIB::j2eeSrvMoEventProv.1.1 = INTEGER: false(2)
J2EE-MIB::j2eeSrvMoEventProv.1.2 = INTEGER: false(2)
J2EE-MIB::j2eeSrvMoEventProv.1.3 = INTEGER: false(2)
J2EE-MIB::j2eeSrvMoEventProv.1.4 = INTEGER: false(2)
J2EE-MIB::j2eeSrvSMState.1.1 = INTEGER: running(4)
J2EE-MIB::j2eeSrvSMState.1.2 = INTEGER: stopped(3)
J2EE-MIB::j2eeSrvSMState.1.3 = INTEGER: running(4)
J2EE-MIB::j2eeSrvSMState.1.4 = INTEGER: running(4)
J2EE-MIB::j2eeSrvSMStartTime.1.1 = STRING: "Fri Dec 19 14:25:20 MET 2008"
J2EE-MIB::j2eeSrvSMStartTime.1.2 = STRING: "NOT_APPLICABLE"
J2EE-MIB::j2eeSrvSMStartTime.1.3 = STRING: "Fri Dec 19 13:47:44 MET 2008"
J2EE-MIB::j2eeSrvSMStartTime.1.4 = STRING: "Fri Dec 19 14:25:21 MET 2008"

The GlassFish SNMP data varies according to the applications and resources deployed. Monitoring levels also affect the GlassFish SNMP data; see Changing Monitoring Levels.

For a summary of the SNMP tables supported in the Enterprise Server, see GlassFish SNMP Tables. For a complete listing of the GlassFish SNMP data you can access, see the Sun GlassFish Enterprise Manager SNMP Monitoring 1.0 Reference.