Sun GlassFish Enterprise Manager SNMP Monitoring 1.0 Installation and Quick Start Guide describes how to change logging levels and the SNMP port using the command line. This section describes how to perform these tasks using the GlassFish Administration Console. It also describes additional ways to change the SNMP port number.
Changing the SNMP Port Number Using the Command Line or Deployment Descriptor
Changing the SNMP Port Number Using the GlassFish Administration Console
Changing the SNMP Logging Level Using the Administration Console
The default SNMP port number is 10161. If you want to monitor multiple individual server instances that exist on the same machine, the default port values may not work. You may need to change the SNMP port for these instances to avoid a port conflict.
You can override the default port value in several different ways, which are listed in order of precedence from highest to lowest:
For each server instance, you can specify a port value by setting the snmp-adapter-port property for that server instance:
asadmin set server-instance-name.property.snmp-adapter-port=port-number |
where server-instance-name is the name of the server instance, and port-number is the new port value.
For each cluster, you can specify a port value by setting the snmp-adapter-port property for that cluster:
asadmin set cluster-name.property.snmp-adapter-port=port-number |
where cluster-name is the name of the cluster, and port-number is the new port value. When you set snmp-adapter-port as a cluster property, all the server instances in the cluster try to use the same port for SNMP monitoring. Therefore, using the cluster property may not help if two or more clustered instances exist on the same machine.
You can provide the port value through the init-param element of the servlet element in the web.xml deployment descriptor file for the __assnmp.war file. For example:
... <servlet> <servlet-name>Mediator</servlet-name> <servlet-class>MediatorServlet</servlet-class> ... <init-param> <param-name>snmp-adapter-port</param-name> <param-value>10161</param-value> </servlet> ....
Replace 10161 with the new port value.
See Configuring the Ports for some examples.
You can use the GlassFish Administration Console to change the server or cluster property snmp-adapter-port. You select the node for the appropriate server and/or cluster and provide a value for the snmp-adapter-port property. You may need to define the property if it is not already defined.
These tasks assume that you are already logged in to the Administration Console, as described in Admin Console in Sun GlassFish Enterprise Server 2.1 Administration Guide.
In the navigation tree, expand the Stand-Alone Instances node.
Select the node for the instance whose SNMP port number you want to change (for example, standalone-instance1).
On the page for the server instance, click the Properties tab.
Click the Instance Properties tab.
If the snmp-adapter-port property is in the Additional Properties list, specify the appropriate port number in the Value field, then go to step 7.
If the snmp-adapter-port property is not in the Additional Properties list, perform these steps:
Click Save.
Stop and restart the server.
In the navigation tree, expand the Clusters node.
Expand the node for the cluster whose cluster instance properties you want to change (for example, cluster1).
Expand the node for the cluster instance whose SNMP port number you want to change (for example, clustered-instance1.
On the page for the cluster instance, click the Properties tab.
Click the Instance Properties tab.
If the snmp-adapter-port property is in the Additional Properties list, specify the appropriate port number in the Value field, then go to step 8.
If the snmp-adapter-port property is not in the Additional Properties list, perform these steps:
Click Save.
Stop and restart the server.
In the navigation tree, expand the Clusters node.
Expand the node for the cluster whose SNMP port number you want to change (for example, cluster1.
On the page for the cluster, select the Properties tab.
Select the Cluster Properties tab.
If the snmp-adapter-port property is in the Additional Properties list, specify the appropriate port number in the Value field, then go to step 7.
If the snmp-adapter-port property is not in the Additional Properties list, perform these steps:
Click Save.
Stop and restart the server.
Changing the SNMP Logging Level in Sun GlassFish Enterprise Manager SNMP Monitoring 1.0 Installation and Quick Start Guide describes how to use the command line to change the logging level for the three SNMP loggers:
javax.enterprise.system.tools.admin.snmp
javax.enterprise.system.tools.admin.snmp.adapter
javax.enterprise.system.tools.admin.snmp.genericmediation
You can also use the Administration Console to change the logging level for these loggers.
In the navigation tree, expand the Configurations node.
Expand the node for the instance or cluster you want to configure.
Select the Logger Settings node.
On the Logger Settings page, select the Log Levels tab.
If the logger whose level you want to change is in the Additional Properties list, specify the new level in the Value field, then go to step 7.
The level may be any of the following: SEVERE, WARNING, INFO, CONFIG, FINE, FINER, and FINEST.
If the logger whose level you want to change is not in the Additional Properties list, perform these steps:
Click Save.
The change takes effect immediately.