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.