Configuration of SNMP Monitoring in Glassfish Enterprise Manager

This blog explains how to configure SNMP monitoring feature of Glassfish Enterprise Manager (part of Glassfish Portfolio).  SNMP adapter can be configured to use user specific adapter port and log levels.

The SNMP adapter can be configured to use user desired port to listen for snmp queries, log level can be changed to user desired level.


SNMP adapter port configuration

When you deploy the  __assnmp.war file to your DAS the snmp adapter starts in the default port 10161. If user decides to run the adapter in different port than 10161, user can create a property called snmp-adapter-port in domain.xml and restart the instance. This property in domain.xml can be added in two different ways, either use the asadmin command line interface or use the Administration GUI that is part of the Glassfish installation.


Changing
snmp-adapter-port property using asadmin

For example user wants to use 21000 as the desired port for snmp adapter.

<glassfish_installation>/bin/asadmin set server.property.snmp-adapter-port=2100

The property is created in domain.xml under DAS configuration but the SNMP adapter doesn't dynamically changes and listens in the new port to 21000. The DAS needs to restarted to make the adapter listen in new port. Restart your DAS using the following commands

<glassfish_installation>/bin/asadmin stop-domain domain1
<glassfish_installation>/bin/asadmin start-domain domain1

Changing snmp-adapter-port property using Administration GUI

Login to you glassfish admin gui

  • In the navigation tree on left frame, expand the Standalone Instances node.
  • Select the node for the instance whose SNMP port number youwant to change (for example,server).
  • 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 skip the next steps (a,b,c)
    
  • If the snmp-adapter-port property is not in the Additional Properties list, perform these steps:
    • a. Click Add Property.
    • b. In the Name field, specify snmp-adapter-port.
    • c. In theValue field, specify an appropriate port value.
  • Click Save.
  • Stop and restart the server.

Changing the SNMP Logging level

Using the asadmin command line interface

The following loggers are available for snmp adapter and changed through asadmin cli

javax.enterprise.system.tools.admin.snmp
javax.enterprise.system.tools.admin.snmp.adapter
javax.enterprise.system.tools.admin.snmp.genericmediation


Based on  where the snmp adapter is deployed in glassfish ( DAS , cluster , stand alone instance) use the appropriate target to change the log level.
The following commands change the log level of the snmp adapter deployed in DAS.


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"

Note: the "\\" is used to escape the "." in the logger name.

Changing the SNMP Logging level using the Administration Console


Login into Administration console

  • 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 skip the next steps (a,b,c)
  • 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:
  • a. Click Add Property.
  • b. In the Property field, specify the name of the logger.
  • c. In theValue field, specify the level.
  • Click Save.
  • The change takes effect immediately.



Comments:

Thanks Sankar for sharing. This is a great blog with good info and easy to follow. Waiting to read your next blog :-)

Posted by Judy Tang on February 10, 2009 at 04:06 AM PST #

Is there a way to add other attributes to monitor? For example, Free Memory isn't in any of the tables, but Total Memory is. I find monitoring Free Memory much more useful then Total Memory (which I set statically in the first place).

I've submitted an RFE through our support contract but I can't view the status of it. I was wondering if there was a simple way to add this to the snmp adaptor monitoring?

Posted by Andrew on April 03, 2009 at 05:27 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Sankar Periyathambi Neelakandan

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today