Browse Source

Add JMX documentation

pull/1/head
Mark Pollack 15 years ago
parent
commit
32cb21eed6
  1. 4
      src/docbkx/index.xml
  2. 109
      src/docbkx/reference/jmx.xml
  3. BIN
      src/docbkx/resources/images/jconsole.png

4
src/docbkx/index.xml

@ -56,7 +56,7 @@ @@ -56,7 +56,7 @@
<xi:include href="reference/introduction.xml"/>
<xi:include href="reference/mongodb.xml"/>
<xi:include href="reference/mongo-repositories.xml"/>
<!-- <xi:include href="reference/couchdb.xml"/> -->
<xi:include href="reference/jmx.xml"/>
</part>
</book>
</book>

109
src/docbkx/reference/jmx.xml

@ -0,0 +1,109 @@ @@ -0,0 +1,109 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<chapter id="mongo.jmx">
<title>JMX support</title>
<para>The JMX support for MongoDB exposes the results of executing the
'serverStatus' command on the admin database for a single MongoDB server
instance. It also exposes an administrative MBean, MongoAdmin which will let
you perform administrative operations such as drop or create a database. The
JMX features build upon the JMX feature set available in the Spring
Framework. See <ulink
url="http://static.springsource.org/spring/docs/3.0.x/reference/jmx.html">here</ulink>
for more details.</para>
<section id="mongodb:jmx-configuration">
<title>MongoDB JMX Configuration</title>
<para>Spring's Mongo namespace enables you to easily enable JMX
functionality</para>
<example>
<title>XML schmea to configure MongoDB</title>
<programlisting language="xml">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mongo="http://www.springframework.org/schema/data/mongo"
xsi:schemaLocation=
"http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/data/mongo http://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"&gt;
&lt;beans&gt;
&lt;!-- Default bean name is 'mongo' --&gt;
&lt;mongo:mongo host="localhost" port="27017"/&gt;
&lt;!-- by default look for a Mongo object named 'mongo' --&gt;
&lt;mongo:jmx/&gt;
&lt;context:mbean-export/&gt;
&lt;!-- To translate any MongoExceptions thrown in @Repository annotated classes --&gt;
&lt;context:annotation-config/&gt;
&lt;bean id="registry" class="org.springframework.remoting.rmi.RmiRegistryFactoryBean"
p:port="1099" /&gt;
&lt;!-- Expose JMX over RMI --&gt;
&lt;bean id="serverConnector" class="org.springframework.jmx.support.ConnectorServerFactoryBean"
depends-on="registry"
p:objectName="connector:name=rmi"
p:serviceUrl="service:jmx:rmi://localhost/jndi/rmi://localhost:1099/myconnector" /&gt;
&lt;/beans&gt;
</programlisting>
</example>
<para>This will expose several MBeans </para>
<itemizedlist>
<listitem>
<para>AssertMetrics</para>
</listitem>
<listitem>
<para>BackgroundFlushingMetrics</para>
</listitem>
<listitem>
<para>BtreeIndexCounters</para>
</listitem>
<listitem>
<para>ConnectionMetrics</para>
</listitem>
<listitem>
<para>GlobalLoclMetrics</para>
</listitem>
<listitem>
<para>MemoryMetrics</para>
</listitem>
<listitem>
<para>OperationCounters</para>
</listitem>
<listitem>
<para>ServerInfo</para>
</listitem>
<listitem>
<para>MongoAdmin</para>
</listitem>
</itemizedlist>
<para>This is shown below in a screenshot from JConsole</para>
<mediaobject>
<imageobject>
<imagedata fileref="..\resources\images\jconsole.png" />
</imageobject>
</mediaobject>
</section>
</chapter>

BIN
src/docbkx/resources/images/jconsole.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Loading…
Cancel
Save