From: markt 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 @@ controlRole tomcat
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 @@ controlRole tomcat
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 @@ controlRole tomcat
<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 @@ controlRole tomcat
|
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 @@ controlRole tomcat -
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
List of Attributes
@@ -366,7 +339,7 @@ List of Attributes
@@ -403,7 +376,7 @@ List of Attributesattribute
- Existing Mbean attribute (see Tomcat mbean description above)
+ Existing MBean attribute (see Tomcat MBean description above)
@@ -411,7 +384,7 @@ List of Attributesseparatearrayresults
When return value is an array, save result as property list
- ($resultproperty.[0..N] and $resultproperty.lenght)
+ ($resultproperty.[0..N] and $resultproperty.length)
true
-Example to get remote mbean attribute from default jmx connection
+Example to get remote MBean attribute from default JMX connection
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
List of Attributes
Example to get all sessionids
-Example to get remote mbean session attribute from session ${sessionid.0}
List of Attributes
-Example to get the Manager from servlet-examples application an bind all mbean properties
-Example to get all MBeans from a server and store inside an external xml property file
List of Attributes
-Example to create remote mbean
- Warning: A lot of tomcat mbeans can't be really create and connect with
List of Attributes
-Example to unregister remote mbean
- Warning: A lot of tomcat mbeans can't be really unregister.
List of Attributes
-Wait for server connection and that cluster backup node is accessable
+Example to set remote MBean attribute value
-
@@ -549,8 +522,8 @@ List of Attributes
@@ -587,7 +560,7 @@ List of Attributesoperation
- Existing Mbean operation (see Tomcat
- funcspecs/fs-admin-opers.html.
+ Existing MBean operation (see Tomcat
+ funcspecs/fs-admin-opers.html).
@@ -602,7 +575,7 @@ stop an application separatearrayresults
When return value is an array, save result as property list
- ($resultproperty.[0..N] and $resultproperty.lenght)
+ ($resultproperty.[0..N] and $resultproperty.length)
true
operation="stop"/>
Now you can find the sessionid at ${sessions.[0..N} properties and access the count
-with ${sessions.lenght} property.
+with ${sessions.length} property.
@@ -615,10 +588,10 @@ Example to get all sessionids
/>
Now you can find the sessionid at ${sessions.[0..N} properties and access the count
-with ${sessions.lenght} property.
+with ${sessions.length} property.
+Example to get remote MBean session attribute from session ${sessionid.0}
@@ -683,7 +656,7 @@ List of Attributes
@@ -706,7 +679,7 @@ List of Attributesresultproperty
- Prefix project property name to all founded Mbeans (mbeans.[0..N].objectname)
+ Prefix project property name to all founded MBeans (mbeans.[0..N].objectname)
@@ -724,7 +697,7 @@ Now you can find the Session Manager at ${manager.[0..N].name}
properties and access the result object counter with ${manager.length} property.
separatearrayresults
When return value is an array, save result as property list
- ($resultproperty.[0..N] and $resultproperty.lenght)
+ ($resultproperty.[0..N] and $resultproperty.length)
true
+Example to get the Manager from servlet-examples application an bind all MBean properties
+Example to get all MBeans from a server and store inside an external XML property file
@@ -800,7 +773,7 @@ List of Attributes
@@ -831,7 +804,7 @@ List of AttributesclassName
- Existing MBean full qualified classname (see Tomcat mbean description above)
+ Existing MBean full qualified class name (see Tomcat MBean description above)
+Example to create remote MBean
- the parent. The valve, cluster or realm Mbeans are not autconnect with there parent.
- Use MBeanFacrory create operation instead.
+ Warning: Many Tomcat MBeans can't be linked to their parent once
+ created. The Valve, Cluster and Realm MBeans are not automatically
+ connected with their parent. Use the MBeanFacrory create
+ operation instead.
-
@@ -888,7 +862,7 @@ List of Attributes
+Example to unregister remote MBean
- The Mbeans are not deregister from parent. Use MBeanFacrory
+ Warning: A lot of Tomcat MBeans can't be unregister.
+ The MBeans are not unlinked from their parent. Use MBeanFacrory
remove operation instead.
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
@@ -940,14 +914,14 @@ List of Attributeshost
- 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.
@@ -955,7 +929,7 @@ List of Attributespassword
- remote jmx connection password.
+ remote JMX connection password.
@@ -1050,7 +1024,7 @@ Wait for server connection and that cluster backup node is accessableref
Name of the internal connection reference. With this attribute you can
- configure more the one connection inside the same ant projekt.
+ configure more the one connection inside the same Ant project.
jmx.server
-
@@ -1063,14 +1037,14 @@ 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
@@ -1084,22 +1058,22 @@ List of Attributeshost
- 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.
@@ -1122,7 +1096,7 @@ List of Attributesref
- 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
+Wait for server connection and that cluster backup node is accessible