GlassFish Enterprise Manager SNMP Monitoring provides SNMP support for Sun GlassFishTM Enterprise Server version 2.1. This feature uses the J2EE MIB to expose the Enterprise Server for monitoring by SNMP clients. The J2EE MIB is described in Java Specification Request (JSR) 77.
In this release, GlassFish Enterprise Manager SNMP Monitoring only supports SNMP versions 1 and 2 and does not support traps.
This Installation and Quick Start Guide explains how to install and use SNMP monitoring in the following sections:
For information for advanced users, see the Sun GlassFish Enterprise Manager SNMP Monitoring 1.0 Reference. For the latest GlassFish Enterprise Manager SNMP Monitoring updates, see the Sun GlassFish Enterprise Manager SNMP Monitoring 1.0 Release Notes. See also the documentation set for Sun GlassFish Enterprise Server.
SNMP monitoring is available for download to Sun customers with any of these entitlements:
Sun GlassFish Enterprise Server
Sun GlassFish Enterprise Server Unlimited Offering
Sun GlassFish Enterprise Suite (Gold or Platinum Support levels only)
Sun GlassFish Enterprise Suite Unlimited Offering
Sun Java Application Platform Suite
Sun Java Enterprise System
Sun Java Web Infrastructure Suite
Sun Web Space Server
To download this component, follow these steps:
Go to the SunSolve site at http://sunsolve.sun.com/.
Click on the Accept button to accept the SunSolve license agreement.
Click on the Login link in the right column and enter your support username and password.
Click on the Patches and Updates link in the right column.
Enter the SNMP Monitoring patch number, 140750–01, in the PatchFinder field and click on the Find Patch button.
Click on the HTTP link next to Download Patch.
A file named 140750–01.zip is copied to your machine.
Unzip the 140750–01.zip file. For example:
unzip 140750–01.zip |
When you unzip the file, an snmp-monitoring directory is created within the current directory. This new directory contains the __assnmp.war file.
Do not rename the __assnmp.war file.
To install SNMP monitoring, deploy the __assnmp.war file as you would any other web application.
You can use the asadmin deploy command. For example:
asadmin deploy __assnmp.war |
For more information about the asadmin deploy command, see the Sun GlassFish Enterprise Server 2.1 Reference Manual.
To use the Admin Console, follow these steps:
Open the Applications component.
Go to the Web Applications page.
Click on the Deploy button.
Next to Location:, make sure that Packaged file to be uploaded to the server is selected.
Enter the location of the __assnmp.war file in the Location: field, or use the Browse... button to locate it.
If you have installed the cluster or enterprise profile and are deploying to a cluster or multiple server instances, go to Targets at the bottom of the page and select targets.
Select the OK button.
For more information about using SNMP monitoring with clusters, see the Sun GlassFish Enterprise Manager SNMP Monitoring 1.0 Reference.
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.
You can change the configuration of SNMP monitoring in the following ways:
Set Enterprise Server monitoring levels to get accessible GlassFish SNMP data as follows:
Set web container monitoring to HIGH to get all j2eeServletStatTable data.
Set EJB container monitoring to HIGH to get all j2eeEjbEntityStatTable, j2eeEjbStatelessStatTable, j2eeEjbStatefulStatTable, and j2eeEjbMessageDrivenStatTable data.
Set transaction service monitoring to HIGH to get all j2eeJtaStatTable data.
Set connector connection pool monitoring to HIGH to get all j2eeJcaConPoolStatTable data.
Set JDBC connection pool monitoring to HIGH to get all j2eeJDBCConPoolStatTable data.
All j2eeJVMStatTable data is always displayed regardless of the JVM monitoring setting.
Use the following asadmin set commands to set monitoring levels. Substitute the name of the configuration for server-config. For example:
asadmin set server-config.monitoring-service.module-monitoring-levels.web-container=HIGH asadmin set server-config.monitoring-service.module-monitoring-levels.ejb-container=HIGH asadmin set server-config.monitoring-service.module-monitoring-levels.transaction-service=HIGH asadmin set server-config.monitoring-service.module-monitoring-levels.connector-connection-pool=HIGH asadmin set server-config.monitoring-service.module-monitoring-levels.jdbc-connection-pool=HIGH asadmin set server-config.monitoring-service.module-monitoring-levels.jvm=HIGH |
For more information about the asadmin set command, see the Sun GlassFish Enterprise Server 2.1 Reference Manual.
To use the Admin Console, follow these steps:
Go to the Monitoring page for your configuration.
Change the value to HIGH in the drop-down list for any or all of the following settings:
JVM
Transaction Service
JMS/Connector Service
Web Container
EJB Container
JDBC Connection Pool
Select the Save button.
The default SNMP port is 10161. To change this port, use the asadmin set command. Substitute the name of the server instance for server. For example:
asadmin set server.property.snmp-adapter-port=10165 |
You must restart the server for the port change to take effect. You can use the following asadmin commands. Once again, substitute the name of the server instance for server.
asadmin stop-instance server asadmin start-instance server |
For more information about the asadmin set, asadmin stop-instance, and asadmin start-instance commands, see the Sun GlassFish Enterprise Server 2.1 Reference Manual.
SNMP monitoring logs its messages to the Enterprise Server log file, server.log. This component uses three loggers:
javax.enterprise.system.tools.admin.snmp
javax.enterprise.system.tools.admin.snmp.adapter
javax.enterprise.system.tools.admin.snmp.genericmediation
Use the following asadmin set commands to set log levels for these loggers. Substitute the name of the server instance for server. For example, on a Solaris or Linux installation you would specify commands like the following:
asadmin set server.log-service.module-log-levels.property.javax\\.enterprise\\.system\\.tools\\.admin\\.snmp=WARNING asadmin set server.log-service.module-log-levels.property.javax\\.enterprise\\.system\\.tools\\.admin\\.snmp\\. adapter=INFO asadmin set server.log-service.module-log-levels.property.javax\\.enterprise\\.system\\.tools\\.admin\\.snmp\\. genericmediation=FINE |
On a Windows system, use a single backslash (\) as an escape character, not a double backslash (\\).
For more information about the asadmin set command, see the Sun GlassFish Enterprise Server 2.1 Reference Manual.
The tables accessible through SNMP monitoring are summarized in this section. For detailed information, see the Sun GlassFish Enterprise Manager SNMP Monitoring 1.0 Reference.
SNMP Tables Mapped in Sun GlassFish Enterprise Server
j2eeObject Tables
j2eeDomTable
j2eeSrvTable
j2eeJVMTable
j2eeAppTable
j2eeModTable
j2eeBeanTable
j2eeSletTable
j2eeAdapTable
j2eeRsrcTable
j2eeJCATable
j2eeJDBCTable
j2eeStatistics Tables
j2eeServletStatTable
j2eeEjbEntityStatTable
j2eeEjbStatelessStatTable
j2eeEjbStatefulStatTable
j2eeMessageDrivenStatTable
j2eeJtaStatTable
j2eeJcaConnPoolStatTable
j2eeJDBCConnPoolStatTable
j2eeJVMStatTable
SNMP Tables Not Mapped in Sun GlassFish Enterprise Server