Return-Path:
Monitoring is a very important question today. Looking inside the running
- server, grab some statistic data or reconfigure some aspects are
- daliy adminstration tasks. Monitoring is a key aspect of system administration. Looking inside a
+ running server, obtaining some statistics or reconfiguring some aspects of
+ an application are all daily administration tasks.
For quick installation you find here a short installation guide:
-Add the following parameters to your tomcat startup script: +
The following is a quick configuration guide for Java 5:
+Add the following parameters to your Tomcat startup script:
Activate JMX MX4J Http Adaptor with Java 1.4: -
- -
-Tipp: With ${AJP.PORT}=0 no ajp connection where started. -
-Note: MX4J JSR 160 RMI Adaptor to support JDK 1.4 currently not integrated. -
-mx.authMode="basic" mx.authUser="tomcat" mx.authPassword="strange"
- you can control the access!For simple tomcat ant task usage with ant 1.6.x we have integrate import and antlib support.
+To simplify JMX usage with Ant 1.6.x, a set of tasks is provided that may + be used with antlib.
antlibCopy your catalina-ant.jar from $CATALINA_HOME/lib to $ANT_HOME/lib.
-Following example show the JMX Accessor usage:
+The following example shows the JMX Accessor usage:
<project name="Catalina Ant JMX" @@ -145,7 +118,7 @@ echo="false" /> <!-- get current maxActiveSession from ClusterTest application - echo it to ant output and store at + echo it to Ant output and store at property <em>clustertest.maxActiveSessions.orginal</em> --> <jmx:get @@ -163,7 +136,7 @@ type="int" /> <!-- get all sessions and split result as delimiter <em>SPACE</em> for easy - access all session ids directly with ant property sessions.[0..n]. + access all session ids directly with Ant property sessions.[0..n]. --> <jmx:invoke name="Catalina:type=Manager,path=/ClusterTest,host=localhost" @@ -184,7 +157,7 @@ <arg value="Hello"/> </jmx:invoke> <!-- Query for all application manager.of the server from all hosts - and bind all attributes from all found manager mbeans. + and bind all attributes from all found manager MBeans. --> <jmx:query name="Catalina:type=Manager,*" @@ -213,8 +186,8 @@ |
import: Import the JMX Accessor Projekt with - <import file="${CATALINA.HOME}/bin/jmxaccessor-tasks.xml" /> and +
import: Import the JMX Accessor Project with + <import file="${CATALINA.HOME}/bin/catalina-tasks.xml" /> and reference the tasks with jmxOpen, jmxSet, jmxGet, jmxQuery, jmxInvoke,jmxEquals and jmxCondition.
@@ -223,7 +196,7 @@ -
List of Attributes
url | -Set jmx connection url - service:jmx:rmi:///jndi/rmi://localhost:8050/jmxrmi + | Set JMX connection URL - service:jmx:rmi:///jndi/rmi://localhost:8050/jmxrmi | |
host | -Set the host, shortcut the very long url syntax. + | Set the host, shortcut the very long URL syntax. | localhost |
username | -remote jmx connection user name. + | remote JMX connection user name. | |
password | -remote jmx connection password. + | remote JMX connection password. | |
ref | -Name of the internal connection referenz. With this attribute you can - configure more the one connection inside the same ant projekt. + | Name of the internal connection reference. With this attribute you can + configure more the one connection inside the same Ant project. | jmx.server |
-Example to open a new jmx connection
+Example to open a new JMX connection
-Example to open a jmx connection from url, with authorisation and
+Example to open a JMX connection from URL, with authorisation and
store at other reference
-Example to open a jmx connection from url, with authorisation and
+Example to open a JMX connection from URL, with authorisation and
store at other reference, but only when property jmx.if exists and
jmx.unless not exists
-Example to get remote mbean attribute from default jmx connection
+Example to get remote MBean attribute from default JMX connection
Access the senderObjectNames properties with:
List of Attributes
attribute | -Existing Mbean attribute (see Tomcat mbean description above) + | Existing MBean attribute (see Tomcat MBean description above) |
-Example to set remote mbean attribute value
+Example to set remote MBean attribute value