HP Open Source Middleware Stacks White Paper: How to Monitor JBoss v4.0.3 SP1 with HP SIM using SNMP Printed in the US HP Part Number: 5991-5856 Published: May 2006 Edition: 1.
© Copyright 2006 Hewlett-Packard Development Company, L.P. Legal Notice Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. The information contained herein is subject to change without notice.
Table of Contents Introduction..............................................................................................................................................9 Executive Summary..............................................................................................................................9 Intended Audience...............................................................................................................................9 Scope and Purpose..............................
List of Figures 1 2 3 4 5 SNMP Components................................................................................................................................10 Enterprise HP MIB Object Identifier Hierarchy.........................................................................................11 HP SIM Events Tab Example...................................................................................................................20 Cold Start Event Example...................................
List of Tables 1 Wrapper Class Tags and Descriptions......................................................................................................
Introduction Executive Summary • • • Building block applications, such as the JBoss Application Server (AS). Technical blueprints, which describe how to integrate the individual technical components of a technology stack. Consulting services to speed the successful implementation of an open source strategy. Additionally, HP Open Source Support Services provide a single source for technical support of all the products that HP sells including hardware, operating systems, and open source middleware.
Introduction to SNMP Familiarity with the background and fundamentals of SNMP, Object Identifiers (OIDs) and Management Information Base (MIB) is useful in understanding the concepts presented in this white paper. As networks have grown and additional components added (for example, routers, switches, hubs, servers, printers, workstations, and SANs), the management of enterprise networks has become very complex and expensive.
The management station receives and sets objects in the MIB, and an agent notifies the management station of significant but unsolicited events called traps. All communication between the management station and its agents take place using SNMP. The structure of management information (SMI), an SNMP standard, defines the rules for how MIB objects are structured, described, and organized.
An MBean is a Java object that implements one of the standard MBean interfaces and follows the associated design patterns. The MBean for a resource exposes all necessary information and operations that a management application needs to manage the resource. The scope of the management interface of an MBean includes the following: • Attributes values that may be accessed by name. • Operations or functions that may be invoked. • Notifications or events that may be emitted.
http://www.vmware.com/ Configuring the SNMP Service The service resides in the /usr/local/jboss/server/all/deploy/snmp-adaptor.sar directory. As mentioned in the previous section, all three JBoss configurations (all, default and minimal) were installed to ensure the availablitiy of the SNMP service. NOTE: If JBoss is running, you must stop it using one of the following commands: /etc/init.d/jboss stop or /usr/local/jboss/bin/shutdown.
--> localhost 1162 1 10.1.1.57 160 1 The notifications.xml configuration file is used to specify how the intercepted JMX notifications, to which the snmp-adaptor subscribes, will be mapped to SNMP traps.
n:message 1.2.3.4.5.6.7.7 n:sequenceNumber 1.2.3.4.5.6.7.8 jboss.snmp.agent.coldstart 0 0 1.2.3.4.5.6.7 a:startTime 1.2.3.4.5.6.7.
to the wrapper class implementation as the key to be mapped to a corresponding value. A default implementation of this interface comes with the class, org.jboss.jmx.adaptor.snmp.agent.NotificationWrapperSupport. This implementation recognizes the following set of tags: Table 1 Wrapper Class Tags and Descriptions Tag Description n:message n.getMessage() n:sequenceNumber n.getSequenceNumber() n:timeStamp n.getSequenceNumber() n:type n.getType() n:all n.toString() n:class n.getClass().
configuration to redirect the log output to a file. SnmpAgentService and TrapdService and not dependent from each other. Enjoy! --> 1162 PAGE 18That completes the JBoss configuration that enables the SnmpAgentService. HP SIM Configuration For HP SIM to listen for SNMP traps from the JBoss SnmpAgentService, you must identify the system running this agent to HP SIM. The easiest way to do this is with the HP SIM Web-based GUI using the following steps: 1. Using your browser, access HP SIM using the following default URL: http://mySIMserver:280 2. 3. 4. 5. Log in to HP SIM. The home page appears. Click Options then select Discovery.
22:10:29,168 INFO [Server] Server Config URL: file:/usr/local/jboss-4.0.1sp1/server/default/conf/ 22:10:29,169 INFO [Server] Server Library URL: file:/usr/local/jboss-4.0.1sp1/server/default/lib/ 22:10:29,169 INFO [Server] Root Deployment Filename: jboss-service.xml 22:10:29,179 INFO [Server] Starting General Purpose Architecture (GPA)... 22:10:29,806 INFO [ServerInfo] Java version: 1.5.0_03,BEA Systems, Inc.
Figure 3 HP SIM Events Tab Example Clicking on an event in the Event Type column causes a detailed description of the event to appear. For instance, the following is the detailed information for the “Cold Start" event: Figure 4 Cold Start Event Example NOTE: The messages regarding incorrect MIB data are erroneous. Since there is not a MIB file defining the OIDs sent by the agent, HP SIM has tried to use the default RFC1215 MIB.
2006-04-17 18:42:37,552 DEBUG [org.jboss.jmx.adaptor.snmp.trapd.TrapdService] V1 Trap from agent /10.1.1.149 on port 32771 IP Address......... 10.1.1.149 Enterprise Id...... .1.2.3.4.5.6.7 Generic ........... 3 Specific .......... 0 TimeStamp ......... 3600335 Length............. 4 Community string... public Varbind[0] := .1.2.3.4.5.6.7.5 --> 3600335 Varbind[1] := .1.2.3.4.5.6.7.6 --> 4 Varbind[2] := .1.2.3.4.5.6.7.7 --> heartbeat report Varbind[3] := .1.2.3.4.5.6.7.
Resources and Related Information • HP SIM www.hp.com/go/hpsim • SNMP: http://en.wikipedia.org/wiki/Simple_Network_Management_Protocol • The JBoss SNMP adapter http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossSNMPAdapter • JMX By Billy Newport, EJB Consultant http://www.theserverside.com/articles/article.