Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
711 lines (607 sloc) 23.9 KB
<?xml version="1.0"?>
<!--
NOTE: This copyright does *not* cover user programs that use HQ
program services by normal system calls through the application
program interfaces provided as part of the Hyperic Plug-in Development
Kit or the Hyperic Client Development Kit - this is merely considered
normal use of the program, and does *not* fall under the heading of
"derived work".
Copyright (C) [2004-2010], VMware, Inc.
This file is part of HQ.
HQ is free software; you can redistribute it and/or modify
it under the terms version 2 of the GNU General Public License as
published by the Free Software Foundation. This program is distributed
in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA.
-->
<!DOCTYPE plugin [
<!ENTITY process-metrics SYSTEM "/pdk/plugins/process-metrics.xml">
<!ENTITY internal-services SYSTEM "/etc/hq-internal-services.xml">
<!ENTITY hibernate-services SYSTEM "/pdk/plugins/hibernate-services.xml">
]>
<plugin package="org.hyperic.hq.plugin.tomcat" class="TomcatProductPlugin" name="tomcat">
<property name="PLUGIN_VERSION" value="@project.version@"/>
<classpath>
<include name="pdk/lib/mx4j"/>
<!-- relative to auto-discovered installpath (see PROC_HOME_PROPERTY) -->
<include name="server/lib/commons-modeler-*.jar"/>
<!-- JBoss Web classpath -->
<include name="client/jnp-client.jar"/>
<include name="client/jboss-common-client.jar"/>
<include name="client/jboss-jsr77-client.jar"/>
<include name="client/jbossall-client.jar"/>
<include name="client/log4j.jar"/>
<include name="client/jmx-rmi-connector-client.jar"/>
<include name="lib/jboss-system.jar"/>
<include name="lib/jboss-jmx.jar"/>
<include name="lib/jboss-management.jar"/>
<include name="lib/dom4j.jar"/>
<!-- used underneath javax.management.Query.match() -->
<include name="lib/gnu-regexp.jar"/>
<!-- required for MainDeployer.listDeployed() -->
<include name="lib/endorsed/xercesImpl.jar"/>
<include name="lib/endorsed/xml-apis.jar"/>
<include name="server/default/lib/jboss-management.jar"/>
<include name="server/all/lib/jboss-management.jar"/>
<!-- for jndi authentication -->
<include name="server/default/lib/jbosssx.jar"/>
<include name="server/all/lib/jbosssx.jar"/>
<!-- relative to $installpath incase
server/{default,all} do not exist -->
<include name="lib/jboss-management.jar"/>
<include name="lib/jbosssx.jar"/>
</classpath>
<filter name="template"
value="${OBJECT_NAME}:${alias}"/>
<property name="template" value="${OBJECT_NAME}:${alias}" />
<property name="measurement-class" value="org.hyperic.hq.product.jmx.MxMeasurementPlugin" />
<property name="control-class" value="org.hyperic.hq.product.jmx.MxControlPlugin" />
<metrics name="Thread Metrics">
<metric name="Thread Count"
alias="ThreadCount"
indicator="false"
template="${OBJECT_NAME}:${alias}"
units="none"
collectionType="trendsup"/>
<metric name="Current Thread Cpu Time"
alias="CurrentThreadCpuTime"
indicator="false"
template="${OBJECT_NAME}:${alias}"
units="ms"
collectionType="trendsup"/>
<metric name="Current Thread User Time"
alias="CurrentThreadUserTime"
indicator="false"
template="${OBJECT_NAME}:${alias}"
units="ms"
collectionType="trendsup"/>
<metric name="Daemon Thread Count"
alias="DaemonThreadCount"
indicator="false"
template="${OBJECT_NAME}:${alias}"
units="none"
collectionType="dynamic"/>
<metric name="Peak Thread Count"
alias="PeakThreadCount"
indicator="false"
template="${OBJECT_NAME}:${alias}"
units="none"
collectionType="static"/>
</metrics>
<metrics name="OS Metrics">
<metric name="Free Swap Space Size"
alias="FreeSwapSpaceSize"
template="${OBJECT_NAME}:${alias}"
units="B"
collectionType="dynamic"/>
<metric name="Free Physical Memory Size"
alias="FreePhysicalMemorySize"
template="${OBJECT_NAME}:${alias}"
units="B"
collectionType="dynamic"/>
<metric name="Process Cpu Time"
alias="ProcessCpuTime"
indicator="true"
template="${OBJECT_NAME}:${alias}"
units="ns"
collectionType="trendsup"/>
<metric name="Open File Descriptor Count"
alias="OpenFileDescriptorCount"
indicator="false"
template="${OBJECT_NAME}:${alias}"
units="none"
collectionType="dynamic"/>
</metrics>
<metrics name="Runtime Metrics">
<metric name="UpTime"
alias="Uptime"
indicator="true"
template="${OBJECT_NAME}:${alias}"
units="ms"
collectionType="static"/>
</metrics>
<filter name="memory" value="java.lang:type=Memory"/>
<metrics name="Heap Metrics">
<metric name="Heap Memory Used"
units="B"
template="${memory}:Composite.HeapMemoryUsage.used"/>
<metric name="Heap Memory Committed"
units="B"
template="${memory}:Composite.HeapMemoryUsage.committed"/>
<metric name="Heap Memory Free"
indicator="true"
units="B"
template="${memory}:Composite.HeapMemoryUsage.free"/>
<metric name="Heap Memory Max"
units="B"
collectionType="static"
template="${memory}:Composite.HeapMemoryUsage.max"/>
</metrics>
<filter name="template" value="Catalina:type=DataSource,path=*,host=*,class=*,name=*:${alias}"/>
<metrics name="Apache Tomcat 5.5 DataSource Pool">
<metric name="Availability"
indicator="true"/>
<metric name="Idle DataSource Connections"
alias="numIdle"
indicator="true"
units="none"/>
<metric name="Active DataSource Connections"
alias="numActive"
indicator="true"
units="none"/>
</metrics>
<filter name="template" value="Catalina:type=DataSource,context=*,host=*,class=*,name=*:${alias}"/>
<metrics name="Apache Tomcat 7.0 DataSource Pool">
<metric name="Availability"
indicator="true"/>
<metric name="Idle DataSource Connections"
alias="numIdle"
indicator="true"
units="none"/>
<metric name="Active DataSource Connections"
alias="numActive"
indicator="true"
units="none"/>
</metrics>
<server name="Apache Tomcat"
version="5.5"
platforms="Unix,Win32">
<property name="VERSION_FILE"
value="server/lib/catalina-storeconfig.jar"/>
<property name="tomcatVersion" value="1.0"/>
<plugin type="autoinventory"
class="org.hyperic.hq.plugin.tomcat.TomcatServerDetector"/>
<property name="domain"
value="Catalina"/>
<property name="OBJECT_NAME"
value="java.lang:type=Runtime"/>
<metrics include="Runtime Metrics"/>
<property name="OBJECT_NAME"
value="java.lang:type=OperatingSystem"/>
<metrics include="OS Metrics"/>
<property name="OBJECT_NAME"
value="java.lang:type=Threading"/>
<metrics include="Thread Metrics"/>
<metrics include="Heap Metrics"/>
<property name="PROC_HOME_PROPERTY"
value="catalina.base"/>
<property name="PROC_QUERY"
value="State.Name.re=java|jsvc,State.Name.Pne=jsvc,Args.*.sw=-Dcatalina.base="/>
<property name="WIN32_PROC_QUERY"
value="State.Name.re=java|jsvc,State.Name.Pne=jsvc,Args.*.Isw=-Dcatalina.base="/>
<property name="DEFAULT_CONF"
value="conf/server.xml"/>
<property name="DEFAULT_LOG_FILE"
value="logs/catalina.out"/>
<plugin type="log_track"
class="org.hyperic.hq.product.Log4JLogTrackPlugin"/>
<plugin type="config_track"
class="org.hyperic.hq.product.FileChangeTrackPlugin">
<monitored>
<folder path="conf" recursive="true" filter=".*\.properties|.*\.xml|.*.policy|.*\.cfg|.*\.cnf|.*\.conf"/>
<folder path="bin" recursive="false" filter=".*\.bat|.*\.xml|.*\.sh"/>
<folder path="lib" recursive="false" filter=".*\.jar"/>
<folder path="webapps" recursive="true" filter=".*\.properties|.*\.xml|.*\.jar|.*\.dll|.*\.class|.*\.pl|.*\.py|.*\.pyc|.*\.cgi"/>
</monitored>
</plugin>
<property name="DEFAULT_CONFIG_TRACK_ENABLE" value="false" />
<property name="DEFAULT_PROGRAM"
value="bin/catalina.sh"/>
<plugin type="control"
class="org.hyperic.hq.product.jmx.MxServerControlPlugin"/>
<property name="start.args"
value="start"/>
<property name="stop.args"
value="stop"/>
<plugin type="control"
platform="Win32"
class="org.hyperic.hq.product.Win32ControlPlugin"/>
<actions platform="Win32"
include="start,stop,restart"/>
<config type="control" platform="Win32">
<option name="service_name"
default="Apache Tomcat"
description="Tomcat Service Name (Relevant to Windows only, does not affect other platforms)"/>
</config>
<config>
<option name="jmx.url"
description="JMX URL to MBeanServer"
default="service:jmx:rmi:///jndi/rmi://localhost:6969/jmxrmi"/>
<option name="jmx.username"
description="JMX username"
optional="true"
default="system"/>
<option name="jmx.password"
description="JMX password"
optional="true"
default="manager"
type="secret"/>
<option name="process.query"
description="PTQL for Tomcat Process"
default="${PROC_QUERY}"/>
<option name="listen.ports"
description="Listening Ports" optional="true"/>
</config>
<plugin type="measurement"
class="org.hyperic.hq.product.jmx.MxMeasurementPlugin"/>
<metric name="Availability"
template="sigar:Type=ProcState,Arg=%process.query%:State"
indicator="true"/>
<service name="Web Module Stats">
<property name="OBJECT_NAME"
value="${domain}:j2eeType=WebModule,name=*,J2EEApplication=*,J2EEServer=*"/>
<plugin type="autoinventory"/>
<plugin type="control"
class="org.hyperic.hq.product.jmx.MxControlPlugin"/>
<actions include="stop,start,reload"/>
<!-- listen for JMX notifications -->
<plugin type="log_track"
class="org.hyperic.hq.product.jmx.MxNotificationPlugin"/>
<config>
<option name="name"
description="Name Of Web Module"
default=""/>
<option name="J2EEApplication"
description="J2EE Application"
default=""/>
<option name="J2EEServer"
description="J2EE Server"
default=""/>
</config>
<property name="template" value="${OBJECT_NAME}:${alias}"/>
<metric name="Availability"
indicator="true"/>
<metric name="Processing Time"
alias="processingTime"
indicator="true"
units="sec"/>
</service>
<service name="Thread Pools">
<property name="OBJECT_NAME"
value="${domain}:type=ThreadPool,name=*"/>
<plugin type="autoinventory"/>
<plugin type="control"
class="org.hyperic.hq.product.jmx.MxControlPlugin"/>
<actions include="start,shutdown"/>
<!-- listen for JMX notifications -->
<plugin type="log_track"
class="org.hyperic.hq.product.jmx.MxNotificationPlugin"/>
<config>
<option name="name"
description="Listener Name"
default=""/>
</config>
<property name="template" value="${OBJECT_NAME}:${alias}"/>
<metric name="Availability"
indicator="true"/>
<metric name="Current Thread Count"
alias="currentThreadCount"
indicator="true"
units="none"/>
<metric name="Current Thread Busy"
alias="currentThreadsBusy"
indicator="true"
units="none"/>
</service>
<service name="Servlet Monitor">
<property name="OBJECT_NAME"
value="${domain}:j2eeType=Servlet,name=*,WebModule=*,J2EEApplication=*,J2EEServer=*"/>
<plugin type="autoinventory"/>
<!-- listen for JMX notifications -->
<plugin type="log_track"
class="org.hyperic.hq.product.jmx.MxNotificationPlugin"/>
<config>
<option name="WebModule"
description="Deployed Module"
default=""/>
<option name="J2EEApplication"
description="J2EE Application"
default=""/>
<option name="J2EEServer"
description="J2EE Server"
default=""/>
</config>
<property name="template" value="${OBJECT_NAME}:${alias}"/>
<metric name="Availability"
indicator="true"/>
<metric name="Class Load Time"
alias="classLoadTime"
indicator="false"
units="none"/>
<metric name="Error Count"
alias="errorCount"
indicator="true"
collectionType="trendsup"
units="none"/>
<metric name="Load Time"
alias="loadTime"
indicator="false"
units="none"/>
<metric name="Processing Time"
alias="processingTime"
indicator="false"
collectionType="trendsup"
units="none"/>
<metric name="Request Count"
alias="requestCount"
indicator="true"
collectionType="trendsup"
units="none"/>
</service>
<service name="JSP Monitor">
<property name="OBJECT_NAME"
value="${domain}:type=JspMonitor,name=jsp,WebModule=*,J2EEApplication=*,J2EEServer=*"/>
<plugin type="autoinventory"/>
<!-- listen for JMX notifications -->
<plugin type="log_track"
class="org.hyperic.hq.product.jmx.MxNotificationPlugin"/>
<config>
<option name="WebModule"
description="Deployed Module"
default=""/>
<option name="J2EEApplication"
description="J2EE Application"
default=""/>
<option name="J2EEServer"
description="J2EE Server"
default=""/>
</config>
<property name="template" value="${OBJECT_NAME}:${alias}"/>
<metric name="Availability"
indicator="true"/>
<metric name="JSP Count"
alias="jspCount"
indicator="true"
collectionType="trendsup"
units="none"/>
<metric name="JSP Reload Count"
alias="jspReloadCount"
indicator="true"
collectionType="trendsup"
units="none"/>
</service>
<service name="Global Request Processor">
<property name="OBJECT_NAME"
value="${domain}:type=GlobalRequestProcessor,name=*"/>
<plugin type="autoinventory"/>
<!-- listen for JMX notifications -->
<plugin type="log_track"
class="org.hyperic.hq.product.jmx.MxNotificationPlugin"/>
<config>
<option name="name"
description="Listener Name"
default=""/>
</config>
<property name="template" value="${OBJECT_NAME}:${alias}"/>
<metric name="Availability"
indicator="true"/>
<metric name="Bytes Sent"
alias="bytesSent"
indicator="false"
collectionType="trendsup"
units="none"/>
<metric name="Bytes Received"
alias="bytesReceived"
indicator="false"
collectionType="trendsup"
units="none"/>
<metric name="Error Count"
alias="errorCount"
indicator="true"
collectionType="trendsup"
units="none"/>
<metric name="Processing Time"
alias="processingTime"
indicator="true"
collectionType="trendsup"
units="none"/>
<metric name="Request Count"
alias="requestCount"
indicator="true"
collectionType="trendsup"
units="none"/>
</service>
<service name="Cache">
<property name="OBJECT_NAME"
value="${domain}:type=Cache,host=*,path=*"/>
<plugin type="autoinventory"/>
<!-- listen for JMX notifications -->
<plugin type="log_track"
class="org.hyperic.hq.product.jmx.MxNotificationPlugin"/>
<config>
<option name="path"
description="Context Path of Deployed Application"
default=""/>
<option name="host"
description="Hostname"
default=""/>
description="Associated Java Class"
default=""/>
</config>
<property name="template" value="${OBJECT_NAME}:${alias}"/>
<metric name="Availability"
indicator="true"/>
<metric name="Access Count"
alias="accessCount"
indicator="true"
collectionType="trendsup"
units="none"/>
<metric name="Hits Count"
alias="hitsCount"
indicator="true"
collectionType="trendsup"
units="none"/>
</service>
<service name="DataSource Pool">
<property name="OBJECT_NAME"
value="${domain}:type=DataSource,path=*,host=*,class=*,name=*"/>
<plugin type="autoinventory"/>
<!-- listen for JMX notifications -->
<plugin type="log_track"
class="org.hyperic.hq.product.jmx.MxNotificationPlugin"/>
<config>
<option name="path"
description="Context Path of Deployed Application"
default=""/>
<option name="host"
description="Hostname"
default=""/>
<option name="class"
description="Associated Java Class"
default=""/>
<option name="name"
description="Name of Attribute"
default=""/>
</config>
</service>
<service name="Java Process Metrics">
<config>
<option name="process.query"
default="${PROC_QUERY}"
description="PTQL for Tomcat Java Process"/>
</config>
<metric name="Availability"
template="sigar:Type=ProcState,Arg=%process.query%:State"
indicator="true"/>
&process-metrics;
</service>
<service name="HTTP">
<config include="http"/>
<filter name="template"
value="${http.template}:${alias}"/>
<metric name="Availability"
indicator="true"/>
<metric name="Inbound Connections"
indicator="true"/>
<metric name="Outbound Connections"
indicator="true"/>
</service>
</server>
<server name="Apache Tomcat"
version="6.0"
include="5.5">
<property name="VERSION_FILE"
value="lib/catalina-ha.jar"/>
<!-- derive installpath from -Dcatalina.base=... -->
<property name="PROC_HOME_PROPERTY"
value="catalina.base"/>
<property name="tomcatVersion" value="6.0"/>
&internal-services;
&hibernate-services;
</server>
<server name="Apache Tomcat"
version="7.0"
include="6.0">
<property name="VERSION_FILE"
value="lib/tomcat-api.jar"/>
<property name="PROC_HOME_PROPERTY"
value="catalina.base"/>
<property name="tomcatVersion" value="7.0"/>
&internal-services;
&hibernate-services;
<metric name="Availability"
template="sigar:Type=ProcState,Arg=%process.query%:State"
indicator="true"/>
<service name="DataSource Pool">
<property name="OBJECT_NAME"
value="${domain}:type=DataSource,context=*,host=*,class=*,name=*"/>
<plugin type="autoinventory"/>
<!-- listen for JMX notifications -->
<plugin type="log_track"
class="org.hyperic.hq.product.jmx.MxNotificationPlugin"/>
<config>
<option name="context"
description="Context Path of Deployed Application"
default=""/>
<option name="host"
description="Hostname"
default=""/>
<option name="class"
description="Associated Java Class"
default=""/>
<option name="name"
description="Name of Attribute"
default=""/>
</config>
</service>
</server>
<server name="JBoss Web" version="2.0" include="Apache Tomcat 6.0">
<property name="JBOSS_VERSION" value="4"/>
<property name="VERSION_FILE" value="deploy/jboss-web.deployer/jbossweb.jar"/>
<property name="PROC_QUERY" value="State.Name.re=java|jsvc,State.Name.Pne=jsvc,Args.*.eq=org.jboss.Main"/>
<plugin type="autoinventory" class="org.hyperic.hq.plugin.tomcat.JBossWebServerDetector"/>
<plugin type="measurement" class="org.hyperic.hq.plugin.tomcat.JBossWeb2XMeasurementPlugin"/>
&hibernate-services;
</server>
<server name="JBoss Web" version="2.1" include="Apache Tomcat 6.0">
<property name="JBOSS_VERSION" value="5"/>
<property name="VERSION_FILE" value="deploy/jbossweb.sar/jbossweb.jar"/>
<property name="PROC_QUERY" value="State.Name.re=java|jsvc,State.Name.Pne=jsvc,Args.*.eq=org.jboss.Main"/>
<plugin type="autoinventory" class="org.hyperic.hq.plugin.tomcat.JBossWebServerDetector"/>
<plugin type="measurement" class="org.hyperic.hq.plugin.tomcat.JBossWeb2XMeasurementPlugin"/>
&hibernate-services;
</server>
<server name="JBoss Web" version="3.0" include="Apache Tomcat 6.0">
<property name="JBOSS_VERSION" value="6"/>
<property name="VERSION_FILE" value="deploy/jbossweb.sar/jbossweb.jar"/>
<property name="PROC_QUERY" value="State.Name.re=java|jsvc,State.Name.Pne=jsvc,Args.*.eq=org.jboss.Main"/>
<plugin type="autoinventory" class="org.hyperic.hq.plugin.tomcat.JBossWebServerDetector"/>
<plugin type="measurement" class="org.hyperic.hq.plugin.tomcat.JBossWebMeasurementPlugin"/>
&hibernate-services;
</server>
<!-- ==================== Plugin Help =========================== -->
<help name="Apache Tomcat">
<![CDATA[
<p>
<h3>Configure Apache Tomcat for JMX</h3>
</p>
To configure Tomcat for JMX monitoring see http://tomcat.apache.org/tomcat-${product.version}-doc/monitoring.html.
<br>
For a quick down and dirty method follow these instructions,
<br>
in <installpath>/bin/catalina.sh add:
<br>
[ $1 != "stop" ] &amp;&amp;
JAVA_OPTS="-Dcom.sun.management.jmxremote \
<br>
-Dcom.sun.management.jmxremote.port=6969 \
<br>
-Dcom.sun.management.jmxremote.ssl=false \
<br>
-Dcom.sun.management.jmxremote.authenticate=false $JAVA_OPTS"
<br>
export JAVA_OPTS
<br>
From there restart Tomcat and that is it.
</p>
]]>
</help>
<help name="Apache Tomcat 5.5" include="Apache Tomcat"/>
<help name="Apache Tomcat 6.0" include="Apache Tomcat"/>
</plugin>