geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [CONF] Apache Geronimo v2.2 > Monitoring components on Geronimo Server
Date Thu, 09 Dec 2010 08:11:00 GMT
    <base href="">
            <link rel="stylesheet" href="/confluence/s/1810/9/1/_/styles/combined.css?spaceKey=GMOxDOC22&amp;forWysiwyg=true"
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="">Monitoring
components on Geronimo Server</a></h2>
    <h4>Page <b>edited</b> by             <a href="">Runhua
                         <h4>Changes (9)</h4>
<div id="page-diffs">
            <table class="diff" cellpadding="0" cellspacing="0">
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" > <br>Fill in the fields, and
click *Add*. For example: <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">#*</span>
<span class="diff-added-words"style="background-color: #dfd;">*</span> Name=Local
System <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">#*</span>
<span class="diff-added-words"style="background-color: #dfd;">*</span> IP/Hostname=localhost
            <tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">#*</span>
<span class="diff-added-words"style="background-color: #dfd;">*</span> Protocol=\[EJB/JMX\]
(The JMX protocol requires a plugin named {{agent-car-jmx}} must be [installed|Administering
plugins#Installing a plugin|Install a plugin from the repository] and [enabled|config.xml|Enable
a module in <span class="diff-added-words"style="background-color: #dfd;">the</span>
config.xml file].) <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">#*</span>
<span class="diff-added-words"style="background-color: #dfd;">*</span> Port=\[4201/1099\]
(4201 for *EJB* and 1099 for *JMX*.) <br></td></tr>
            <tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">#*</span>
<span class="diff-added-words"style="background-color: #dfd;">*</span> Username=system
            <tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">#*</span>
<span class="diff-added-words"style="background-color: #dfd;">*</span> Password=manager
            <tr><td class="diff-changed-lines" ><span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">#*</span>
<span class="diff-added-words"style="background-color: #dfd;">*</span> Password(verify)=manager
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">#
Alternatively, it is possible to test the connection using the information provided via the
*Test these settings* link on the right navigation pane. <br></td></tr>
            <tr><td class="diff-unchanged" > <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">Note
that if you change the default protocol from *EJB* to *JMX*, the default port will be 1099.
You need to install agent-car-jmx plugin first. <br></td></tr>
            <tr><td class="diff-unchanged" >Alternatively, it is possible to test
the connection using the information provided via the *Test these settings* link on the right
navigation pane. <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
</div>                            <h4>Full Content</h4>
                    <div class="notificationGreySide">
        <style type='text/css'>/*<![CDATA[*/
table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color:
table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}

/*]]>*/</style><div class="Scrollbar"><table class='ScrollbarTable'><tr><td
class='ScrollbarPrevIcon'><a href="/confluence/display/GMOxDOC22/Displaying+JVM+information"><img
border='0' align='middle' src='/confluence/images/icons/back_16.gif' width='16' height='16'></a></td><td
width='33%' class='ScrollbarPrevName'><a href="/confluence/display/GMOxDOC22/Displaying+JVM+information">Displaying
JVM information</a>&nbsp;</td><td width='33%' class='ScrollbarParent'><sup><a
border='0' align='middle' src='/confluence/images/icons/up_16.gif' width='8' height='8'></a></sup><a
the health of the Apache Geronimo server</a></td><td width='33%' class='ScrollbarNextName'>&nbsp;<a
href="/confluence/display/GMOxDOC22/Monitoring+thread+pools">Monitoring thread pools</a></td><td
class='ScrollbarNextIcon'><a href="/confluence/display/GMOxDOC22/Monitoring+thread+pools"><img
border='0' align='middle' src='/confluence/images/icons/forwd_16.gif' width='16' height='16'></a></td></tr></table></div>

<p>The Geronimo monitoring plug-in is broken down between server and client plug-ins,
referred to as the 'Agent' and 'Console' respectively. When properly setup, these plug-ins
provide both local and remote real-time JSR77 compliant statistic monitoring, as well as historical
tracking of any exposed statistic with visual representations drawn in the form of graphs
through the Dojo Toolkit's dojoX Charting packages.</p>

<p><b>Agent (Server)</b>  The Agent plug-in can be deployed headless on
an instance of Geronimo requiring no administrative console able to be polled by the console
plug-in from any instance of Geronimo that can communicate with it. There are two flavors
of the Agent plug-in available; the first allowing for EJB connections, and the second allowing
for JMX connections between the Console and Agent.</p>

<p>While the EJB Agent is the default plug-in installed with the full JEE5 assembly
of Geronimo, the JMX is recommended for those that otherwise would require no form of EJB
in their assembly but still require monitoring ability.</p>

<p><b>Console (Client)</b> The console plug-in, which requires the Geronimo
administrative console, can connect to multiple Agent plug-ins across multiple instances of
Geronimo, allowing centralized monitoring of statistics on a multitude of machines. The same
console is able to connect to either the EJB or the JMX flavor of the Agent plug-in, or even
connect to both types on different instances of Geronimo.</p>

<h2><a name="MonitoringcomponentsonGeronimoServer-WhatcanImonitor%3F"></a>What
can I monitor?</h2>

<p>From within the Agent plug-in in the administrative console, it is possible to define
a connection to any instance of Geronimo that has the Monitoring Agent plug-in deployed. Furthermore,
any MBean deployed on the Geronimo instance with the Monitoring Agent that provides statistics
can be historically tracked, allowing for graph generation from any statistic element exactly
as defined.</p>

<p>Standard behavior of the Monitoring Agent is to take snapshots of the JSR77 defined
JVM statistics, as well as the web container statistics for the web container being used (either
Jetty or Tomcat). Additional MBeans can be added, or these defaults can be easily removed
through the Monitoring Console plug-in.</p>

<p>Currently available statistics:</p>
	<li>TransactionManager Statistics</li>
	<li>JVM Statistics</li>
	<li>AJP/Web/WebSSL Connector Statistics</li>
	<li>ThreadPool Statistics</li>
	<li>Web Application Statistics</li>

<h2><a name="MonitoringcomponentsonGeronimoServer-Whatistheimpactonperformance%3F"></a>What
is the impact on performance?</h2>

<p>Generally speaking, the more monitoring that is enabled, the greater impact on overall
performance. Following this rule, the more MBeans being tracked by the monitoring plug-in
on a given server, the greater the impact. It is generally good practice to limit enabled
MBeans to only those that are necessary as opposed to having everything enabled.</p>

<p>Additionally, the monitoring plug-in is in a dormant state when not collecting snapshots.
On a default deployment, it will only consume cycles once every 5 minutes.</p>

<h2><a name="MonitoringcomponentsonGeronimoServer-Installation"></a>Installation</h2>

<p>Both Agent(Server) and Console(Client) plug-ins are pre-installed on the full JEE
distributions. If you are using a little-G distribution or customized server assembly and
want to leverage Monitoring Plug-ins, you might need to read this section to learn how to
install them. </p>

<p>There are two methods for installing the necessary Monitoring Plug-ins. The first
(and easiest), is to log into the Geronimo administrative console for the instance of Geronimo
onto which the plug-in(s) will be installed, and select 'Plugins' from the left navigation

<p>In the Plugins portlet:</p>
	<li>Click <b>Update repository list</b></li>
	<li>Select a valid Geronimo repository from the list available</li>
	<li>Click <b>Show Plugins in selected repository</b></li>
	<li>To install the Monitoring Agent, select the appropriate plug-in from the list shown
		<li>If the OpenEJB component is not already present on the assembly, it may be beneficial
to use the JMX flavor of the Monitoring Agent</li>
	<li>To install the Monitoring Console, select the plugin appropriate for the web container
in use from the list shown</li>
	<li>If the goal is to both view and record statistics from the same instance of Geronimo,
both the Agent and Console plugins must be installed</li>

<p>The second method is required if starting from a minimal assembly, or if the Geronimo
administrative console is otherwise unavailable.</p>

<p>In terminal:</p>
	<li>Go to the Geronimo bin directory</li>
	<li>Execute: <tt>java &#45;jar deployer.jar search-plugins</tt></li>
	<li>At the prompt, enter the appropriate number(s) for the desired plugins</li>

<h2><a name="MonitoringcomponentsonGeronimoServer-Customization"></a>Customization</h2>

<p>One of the primary goals in developing the monitoring and management plugin was to
allow an administrator to monitor any exposed component on any Geronimo server.</p>

<h3><a name="MonitoringcomponentsonGeronimoServer-Datasources"></a>Datasources</h3>

<p>The datasources used to communicate to the DB on the server and client side are all
packaged into separate plugins. By default, the provided datasources are used to connect an
Apache Derby database (the reason for this is because the default DB that Geronimo uses is
also Derby). However, since these datasources are packaged as plugins, anyone is able to write
their own datasource deployment descriptor, package it into a plugin, and use it instead of
the one provided by default. Check the <a href="/confluence/display/GMOxDOC22/Configuring+your+own+Monitoring+Plugin+DataSource"
title="Configuring your own Monitoring Plugin DataSource">Configuring your own Monitoring
Plugin DataSource</a> section for further details.</p>

<h3><a name="MonitoringcomponentsonGeronimoServer-Monitoring"></a>Monitoring</h3>
<p>For monitoring the Web server performance the <b>Monitoring</b> portlet
is available by selecting <b>Monitoring</b> on the <b>Console Navigation</b>
menu on the left hand side. This feature will allow you to view a number of server statistics
on the system JVM, web servers, and information via the AJP protocol. The graph information
is provided by the data exposed by the connector MBean.</p>

<p>In this example, we attempt to determine if there is a correlation between the server
JVM heap space and the web containers number of bytes downloaded. In other words, this monitoring
session will show if the server is releasing heap memory after client downloads.</p>

<p>First, select the <b>Monitoring</b> link on the <b>Console Navigation</b>
menu. If this is your first monitoring session, you should see an empty set of Servers, Views,
and Graphs as shown in this figure.<br/>
<span class="image-wrap" style=""><img src="/confluence/download/attachments/93284/consoleMonitoringStart.png?version=1&amp;modificationDate=1203516273000"
style="border: 0px solid black" /></span></p>

<h4><a name="MonitoringcomponentsonGeronimoServer-AddingaServer"></a>Adding
a Server</h4>
<p>Select a server to monitor by providing a host name or IP address. Select the protocol
for communication and any security credentials. Save this server definition by pressing <b>Save</b>.<br/>
<span class="image-wrap" style=""><img src="/confluence/download/attachments/93284/consoleMonitoringServerAdd.png?version=1&amp;modificationDate=1203516273000"
style="border: 0px solid black" /></span></p>

<p>Fill in the fields, and click <b>Add</b>. For example:</p>
	<li>Name=Local System</li>
	<li>Protocol=[EJB/JMX] (The JMX protocol requires a plugin named <tt>agent-car-jmx</tt>
must be <a href="/confluence/display/GMOxDOC22/Administering+plugins#Administeringplugins-Installingaplugin"
title="Install a plugin from the repository">installed</a> and <a href="/confluence/display/GMOxDOC22/config.xml"
title="Enable a module in the config.xml file">enabled</a>.)</li>
	<li>Port=[4201/1099] (4201 for <b>EJB</b> and 1099 for <b>JMX</b>.)</li>

<p>Alternatively, it is possible to test the connection using the information provided
via the <b>Test these settings</b> link on the right navigation pane.</p>

<p>After a server is successfully added, the browser will be redirected to the main
monitoring console page, again listing all <b>Views</b>, <b>Servers</b>,
and <b>Graphs</b> configured on the console.</p>

<p>If configuring monitoring on a freshly deployed instance of the monitoring agent,
you need to click the <b>Enable Query</b> link associated with the added server.
This will enable snapshot collection on the default duration of 5 minutes.</p>

<h4><a name="MonitoringcomponentsonGeronimoServer-AddingaGraph"></a>Adding
a Graph</h4>

<p>Select information to display by adding a graph. Select the server you are monitoring,
and then choose an MBean that publishes server information by choosing an MBean from the MBean
drop down control. Once you have selected an MBean, you can see what information is available
by selecting data from the Data series drop down control. When you have described the data,
save this graph by pressing <b>Save</b>.<br/>
<span class="image-wrap" style=""><img src="/confluence/download/attachments/93284/consoleMonitoringGraphAddJVM.png?version=1&amp;modificationDate=1203516273000"
style="border: 0px solid black" /></span></p>

<p>Select more information to display by adding a second graph. As the two data series
scroll in time, we will be able to detect any correlation between the data. Once again, choose
a server and an MBean to monitor. Select data from the Data series drop down control. Since
data sent increases over time, also select <b>delta</b> for the Data series, so
we see the rise and fall of the data over time. Save this graph by pressing <b>Save</b>.<br/>
<span class="image-wrap" style=""><img src="/confluence/download/attachments/93284/consoleMonitoringGraphAddBytes.png?version=1&amp;modificationDate=1203516273000"
style="border: 0px solid black" /></span></p>

<p>After the graph is added, the browser is redirected to the main monitoring console
page, where selecting the name of the graph will open a window that displays the graph.</p>

<h4><a name="MonitoringcomponentsonGeronimoServer-AddingaView"></a>Adding
a View</h4>
<p>Now group one or more graphs into a view. Here we add a view for "JVM vs Bytes Sent"
by selecting two of the graphs we created in earlier steps. Save the view by pressing <b>Save</b>.<br/>
<span class="image-wrap" style=""><img src="/confluence/download/attachments/93284/consoleMonitoringViewAdd.png?version=1&amp;modificationDate=1203516273000"
style="border: 0px solid black" /></span></p>

<p>This figure shows the console monitoring portlet after we have added the server,
graphs, and views.<br/>
<span class="image-wrap" style=""><img src="/confluence/download/attachments/93284/consoleMonitoringReady.png?version=1&amp;modificationDate=1203516294000"
style="border: 0px solid black" /></span></p>

<h4><a name="MonitoringcomponentsonGeronimoServer-TheMonitoringGraphView"></a>The
Monitoring Graph View</h4>
<p>Click on a view to start monitoring server information over time. This view shows
the JVM heap and web server bytes sent over a one hour period. As you see in the example,
the JVM heap memory goes up and down over time with little correlation to the number of bytes
users request from the web server. <br/>
<span class="image-wrap" style=""><img src="/confluence/download/attachments/93284/consoleMonitoringView.png?version=1&amp;modificationDate=1203516294000"
style="border: 0px solid black" /></span></p>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href=""
class="grey">Change Notification Preferences</a>
        <a href="">View
        <a href="">View
        <a href=";showCommentArea=true#addcomment">Add

View raw message