From: <gla...@hy...> - 2010-04-23 19:54:00
|
Author: glaullon Date: 2010-04-23 12:53:50 -0700 (Fri, 23 Apr 2010) New Revision: 14542 URL: http://svn.hyperic.org/?view=rev&root=Hyperic+HQ&revision=14542 Added: trunk/plugins/activemq/ trunk/plugins/activemq/etc/ trunk/plugins/activemq/etc/hq-plugin.xml trunk/plugins/activemq/src/ trunk/plugins/activemq/src/org/ trunk/plugins/activemq/src/org/hyperic/ trunk/plugins/activemq/src/org/hyperic/hq/ trunk/plugins/activemq/src/org/hyperic/hq/plugin/ trunk/plugins/activemq/src/org/hyperic/hq/plugin/activemq/ trunk/plugins/activemq/src/org/hyperic/hq/plugin/activemq/EmbeddedActiveMQServerDetector.java Removed: trunk/plugins/xml/activemq-plugin.xml Modified: trunk/build.xml Log: [HHQ-3907] ActiveMQ plugin performance and functionality issues [HPD-412] Modified: trunk/build.xml =================================================================== --- trunk/build.xml 2010-04-23 17:19:55 UTC (rev 14541) +++ trunk/build.xml 2010-04-23 19:53:50 UTC (rev 14542) @@ -1013,9 +1013,9 @@ <include name="xmlrpc-client-3.1.jar"/> <include name="xmlrpc-common-3.1.jar"/> <include name="ws-commons-util-1.0.2.jar"/> - <!-- for vim plugin using vijava 2.0 --> - <include name="com.springsource.com.sun.xml.bind-2.1.7.jar"/> - <include name="com.springsource.javax.xml.bind-2.1.7.jar"/> + <!-- for vim plugin using vijava 2.0 --> + <include name="com.springsource.com.sun.xml.bind-2.1.7.jar"/> + <include name="com.springsource.javax.xml.bind-2.1.7.jar"/> </fileset> <fileset dir="${tapestry_lib}"> <!-- for CollectorThread --> @@ -1062,6 +1062,8 @@ </fileset> </copy> + <hqplugin name="activemq"/> + <hqplugin name="apache"/> <hqplugin name="tomcat"/> Property changes on: trunk/plugins/activemq ___________________________________________________________________ Name: svn:ignore + .classpath Added: trunk/plugins/activemq/etc/hq-plugin.xml =================================================================== --- trunk/plugins/activemq/etc/hq-plugin.xml (rev 0) +++ trunk/plugins/activemq/etc/hq-plugin.xml 2010-04-23 19:53:50 UTC (rev 14542) @@ -0,0 +1,412 @@ +<?xml version="1.0"?> + +<!DOCTYPE plugin [ + <!ENTITY sun-jvm-service SYSTEM "/pdk/plugins/sun-jvm-service.xml"> + <!ENTITY process-metrics SYSTEM "/pdk/plugins/process-metrics.xml"> +]> + +<!-- + 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, 2005, 2006], Hyperic, 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. + --> + +<plugin package="org.hyperic.hq.plugin.activemq" name="activemq"> + + <classpath> + <include name="pdk/lib/mx4j"/> + </classpath> + + <filter name="domain" + value="org.apache.activemq"/> + + <filter name="template" + value="${OBJECT_NAME}:${alias}"/> + + <filter name="QUEUE_OBJECT_NAME" + value="${domain}:Type=Queue,BrokerName=*,Destination=*"/> + + <filter name="TOPIC_OBJECT_NAME" + value="${domain}:Type=Topic,BrokerName=*,Destination=*"/> + + <filter name="BROKER_OBJECT_NAME" + value="${domain}:Type=Broker,BrokerName=*"/> + + <!-- special casing due to 5.1 renaming: + MemoryPercentageUsed -> MemoryPercentUsage --> + <metrics name="ActiveMQ 4.0 Topic"> + <metric name="Availability" + template="${TOPIC_OBJECT_NAME}:${alias}" + indicator="true"/> + + <metric name="Enqueue Count" + template="${TOPIC_OBJECT_NAME}:${alias}" + indicator="true" + collectionType="trendsup"/> + + <metric name="Dequeue Count" + template="${TOPIC_OBJECT_NAME}:${alias}" + indicator="true" + collectionType="trendsup"/> + + <metric name="Consumer Count" + template="${TOPIC_OBJECT_NAME}:${alias}"/> + + <metric name="Queue Size" + template="${TOPIC_OBJECT_NAME}:${alias}" + indicator="true"/> + + <metric name="Memory Percentage Used" + template="${TOPIC_OBJECT_NAME}:${alias}" + units="percent"/> + </metrics> + + <metrics name="ActiveMQ 4.0 Queue"> + <metric name="Availability" + template="${QUEUE_OBJECT_NAME}:${alias}" + indicator="true"/> + + <metric name="Enqueue Count" + template="${QUEUE_OBJECT_NAME}:${alias}" + indicator="true" + collectionType="trendsup"/> + + <metric name="Dequeue Count" + template="${QUEUE_OBJECT_NAME}:${alias}" + indicator="true" + collectionType="trendsup"/> + + <metric name="Consumer Count" + template="${QUEUE_OBJECT_NAME}:${alias}"/> + + <metric name="Queue Size" + template="${QUEUE_OBJECT_NAME}:${alias}" + indicator="true"/> + + <metric name="Memory Percentage Used" + template="${QUEUE_OBJECT_NAME}:${alias}" + units="percent"/> + </metrics> + + <metrics name="ActiveMQ 4.0 Broker"> + <metric name="Availability" + template="${BROKER_OBJECT_NAME}:${alias}" + indicator="true"/> + + <metric name="Total Consumer Count" + template="${BROKER_OBJECT_NAME}:${alias}"/> + + <metric name="Total Enqueue Count" + template="${BROKER_OBJECT_NAME}:${alias}" + indicator="true" + collectionType="trendsup"/> + + <metric name="Total Dequeue Count" + template="${BROKER_OBJECT_NAME}:${alias}" + collectionType="trendsup"/> + + <metric name="Total Message Count" + template="${BROKER_OBJECT_NAME}:${alias}" + indicator="true" + collectionType="trendsup"/> + + <metric name="Memory Limit" + template="${BROKER_OBJECT_NAME}:${alias}" + units="B"/> + + <metric name="Memory Percentage Used" + template="${BROKER_OBJECT_NAME}:${alias}" + units="percent"/> + </metrics> + + <metrics name="ActiveMQ 5.1 Topic"> + <metric name="Availability" + template="${TOPIC_OBJECT_NAME}:${alias}" + indicator="true"/> + + <metric name="Enqueue Count" + template="${TOPIC_OBJECT_NAME}:${alias}" + indicator="true" + collectionType="trendsup"/> + + <metric name="Dequeue Count" + template="${TOPIC_OBJECT_NAME}:${alias}" + indicator="true" + collectionType="trendsup"/> + + <metric name="Consumer Count" + template="${TOPIC_OBJECT_NAME}:${alias}"/> + + <metric name="Queue Size" + template="${TOPIC_OBJECT_NAME}:${alias}" + indicator="true"/> + + <metric name="Memory Percent Usage" + template="${TOPIC_OBJECT_NAME}:${alias}" + units="percent"/> + </metrics> + + <metrics name="ActiveMQ 5.1 Queue"> + <metric name="Availability" + template="${QUEUE_OBJECT_NAME}:${alias}" + indicator="true"/> + + <metric name="Enqueue Count" + template="${QUEUE_OBJECT_NAME}:${alias}" + indicator="true" + collectionType="trendsup"/> + + <metric name="Dequeue Count" + template="${QUEUE_OBJECT_NAME}:${alias}" + indicator="true" + collectionType="trendsup"/> + + <metric name="Consumer Count" + template="${QUEUE_OBJECT_NAME}:${alias}"/> + + <metric name="Queue Size" + template="${QUEUE_OBJECT_NAME}:${alias}" + indicator="true"/> + + <metric name="Memory Percent Usage" + template="${QUEUE_OBJECT_NAME}:${alias}" + units="percent"/> + </metrics> + + <metrics name="ActiveMQ 5.1 Broker"> + <metric name="Availability" + template="${BROKER_OBJECT_NAME}:${alias}" + indicator="true"/> + + <metric name="Total Consumer Count" + template="${BROKER_OBJECT_NAME}:${alias}"/> + + <metric name="Total Enqueue Count" + template="${BROKER_OBJECT_NAME}:${alias}" + indicator="true" + collectionType="trendsup"/> + + <metric name="Total Dequeue Count" + template="${BROKER_OBJECT_NAME}:${alias}" + collectionType="trendsup"/> + + <metric name="Total Message Count" + template="${BROKER_OBJECT_NAME}:${alias}" + indicator="true" + collectionType="trendsup"/> + + <metric name="Memory Limit" + template="${BROKER_OBJECT_NAME}:${alias}" + units="B"/> + + <metric name="Memory Percent Usage" + template="${BROKER_OBJECT_NAME}:${alias}" + units="percent"/> + </metrics> + + <config name="destination"> + <option name="BrokerName" + description="Broker Name" + default=""/> + + <option name="Destination" + description="Destination" + default=""/> + </config> + + <server name="ActiveMQ" + version="4.0"> + + <!-- derive installpath from -Dactivemq.home=... --> + <property name="PROC_HOME_PROPERTY" + value="activemq.home"/> + + <property name="DEFAULT_CONF" + value="conf/activemq.xml"/> + + <property name="DEFAULT_LOG_FILE" + value="var/activemq.log"/> + + <property name="VERSION_FILE" + value="**/lib/.*activemq-.*-(4.\d*).*.jar"/> + + <config> + <option name="process.query" + description="Process Query"/> + </config> + + <plugin type="autoinventory" + class="org.hyperic.hq.product.jmx.MxServerDetector"/> + + <plugin type="measurement" + class="org.hyperic.hq.product.jmx.MxMeasurementPlugin"/> + + <plugin type="log_track" + class="org.hyperic.hq.product.Log4JLogTrackPlugin"/> + + <plugin type="config_track" + class="org.hyperic.hq.product.ConfigFileTrackPlugin"/> + + <metric name="Availability" + template="sigar:Type=ProcState,Arg=%process.query%:State" + indicator="true"/> + + &process-metrics; + + <service name="Connector"> + <property name="OBJECT_NAME" + value="${domain}:Type=Connector,BrokerName=*,ConnectorName=*"/> + + <config> + <option name="BrokerName" + description="Broker Name" + default=""/> + + <option name="ConnectorName" + description="Connector Name" + default=""/> + </config> + + <plugin type="autoinventory"/> + + <plugin type="control" + class="org.hyperic.hq.product.jmx.MxControlPlugin"/> + + <actions include="start,stop"/> + + <metric name="Availability" + indicator="true"/> + + <metric name="Enqueue Count" + indicator="true" + collectionType="trendsup"/> + + <metric name="Dequeue Count" + indicator="true" + collectionType="trendsup"/> + </service> + + <service name="Broker"> + <property name="OBJECT_NAME" value="${BROKER_OBJECT_NAME}"/> + + <config> + <option name="BrokerName" + description="Broker Name" + default=""/> + </config> + + <plugin type="autoinventory"/> + + <plugin type="control" + class="org.hyperic.hq.product.jmx.MxControlPlugin"/> + + <actions include="start,stop,gc,removeTopic,removeQueue"/> + </service> + + <!-- + Tested based on: + http://incubator.apache.org/activemq/run-broker.html + activemq broker:(tcp://localhost:61616,network:static:tcp://localhost:61616)?persistent=false&useJmx=true + --> + + <service name="Queue"> + <property name="OBJECT_NAME" value="${QUEUE_OBJECT_NAME}"/> + + <config include="destination"/> + + <plugin type="autoinventory"/> + + <plugin type="control" + class="org.hyperic.hq.product.jmx.MxControlPlugin"/> + + <actions include="sendTextMessage"/> + </service> + + <!-- same as Queue except for Type=Topic --> + <service name="Topic"> + <property name="OBJECT_NAME" value="${TOPIC_OBJECT_NAME}"/> + + <config include="destination"/> + + <plugin type="autoinventory"/> + + <plugin type="control" + class="org.hyperic.hq.product.jmx.MxControlPlugin"/> + + <actions include="sendTextMessage"/> + </service> + + <!-- &sun-jvm-service; --> + + </server> + + <server name="ActiveMQ" + version="5.0" + include="4.0"> + <property name="VERSION_FILE" + value="**/.*activemq.*(5.\d*).*.jar"/> +</server> + + <server name="ActiveMQ" + version="5.1" + include="5.0"> + </server> + + <server name="ActiveMQ" + version="5.2" + include="5.1"> + </server> + + <server name="ActiveMQ" + version="5.3" + include="5.2"> + </server> + + <server name="ActiveMQ Embedded" + version="5.0" + include="ActiveMQ 5.0"> + <property name="PROC_HOME_PROPERTY" + value="catalina.base"/> + <plugin type="autoinventory" + class="org.hyperic.hq.plugin.activemq.EmbeddedActiveMQServerDetector"/> + </server> + + <server name="ActiveMQ Embedded" + version="5.1" + include="ActiveMQ 5.1"> + <property name="PROC_HOME_PROPERTY" + value="catalina.base"/> + <plugin type="autoinventory" + class="org.hyperic.hq.plugin.activemq.EmbeddedActiveMQServerDetector"/> + </server> + + <server name="ActiveMQ Embedded" + version="5.2" + include="5.1"> + </server> + + <server name="ActiveMQ Embedded" + version="5.3" + include="5.2"> + </server> + +</plugin> Added: trunk/plugins/activemq/src/org/hyperic/hq/plugin/activemq/EmbeddedActiveMQServerDetector.java =================================================================== --- trunk/plugins/activemq/src/org/hyperic/hq/plugin/activemq/EmbeddedActiveMQServerDetector.java (rev 0) +++ trunk/plugins/activemq/src/org/hyperic/hq/plugin/activemq/EmbeddedActiveMQServerDetector.java 2010-04-23 19:53:50 UTC (rev 14542) @@ -0,0 +1,91 @@ +package org.hyperic.hq.plugin.activemq; + +import java.io.File; +import java.io.IOException; +import java.util.Arrays; +import java.util.Enumeration; +import java.util.Iterator; +import java.util.jar.JarFile; +import java.util.regex.Pattern; +import org.hyperic.hq.product.PluginException; +import org.hyperic.hq.product.PluginManager; + +import org.hyperic.hq.product.ServerResource; +import org.hyperic.hq.product.jmx.MxServerDetector; + +/** + * Server detector for activemq brokers embedded in Tomcat/tc Server instances. + * Exists to optimize recursive file scanning and to set unique identifiers for + * any embedded activemq instances that are discovered + * @author jhickey + * + */ +public class EmbeddedActiveMQServerDetector + extends MxServerDetector { + + boolean recursive = false; + private final static String RECURSIVE_PROP = "activemq.search.recursive"; + + public void init(PluginManager manager) throws PluginException { + super.init(manager); + + recursive = "true".equalsIgnoreCase(manager.getProperty(RECURSIVE_PROP, "false")); + getLog().debug(RECURSIVE_PROP + "=" + recursive); + } + + protected File findVersionFile(File dir, Pattern pattern) { + // In an Embedded ActiveMQ instance, we know we are starting with + // CATALINA_BASE + // Give preferential search treatment to lib/ and webapps/*/WEB-INF/lib for + // performance gains + File libDir = new File(dir, "lib"); + if (libDir.exists()) { + File versionFile = super.findVersionFile(libDir, pattern); + if (versionFile != null) { + return versionFile; + } + } + + File webappsDir = new File(dir, "webapps"); + if (webappsDir.exists()) { + Iterator apps = Arrays.asList(webappsDir.listFiles()).iterator(); + while (apps.hasNext()) { + File app = (File) apps.next(); + if (app.isDirectory()) { + File wlibDir = new File(webappsDir, "WEB-INF" + File.separator + "lib"); + if (wlibDir.exists()) { + File versionFile = super.findVersionFile(wlibDir, pattern); + if (versionFile != null) { + return versionFile; + } + } + } else if (app.getName().endsWith(".war")) { + try { + JarFile war = new JarFile(app); + Enumeration files = war.entries(); + while (files.hasMoreElements()) { + final String fileName = files.nextElement().toString(); + if (pattern.matcher(fileName).find()) { + return new File(app + "!" + fileName); + } + } + } catch (IOException ex) { + getLog().debug("Error: '"+app+"': "+ex.getMessage(),ex); + } + } + } + } + + if (recursive) { + return super.findVersionFile(dir, pattern); + } + return null; + } + + protected ServerResource getServerResource(MxProcess process) { + ServerResource server = super.getServerResource(process); + String catalinaBase = server.getInstallPath(); + server.setIdentifier(catalinaBase + " Embedded ActiveMQ"); + return server; + } +} Deleted: trunk/plugins/xml/activemq-plugin.xml =================================================================== --- trunk/plugins/xml/activemq-plugin.xml 2010-04-23 17:19:55 UTC (rev 14541) +++ trunk/plugins/xml/activemq-plugin.xml 2010-04-23 19:53:50 UTC (rev 14542) @@ -1,405 +0,0 @@ -<?xml version="1.0"?> - -<!DOCTYPE plugin [ - <!ENTITY sun-jvm-service SYSTEM "/pdk/plugins/sun-jvm-service.xml"> - <!ENTITY process-metrics SYSTEM "/pdk/plugins/process-metrics.xml"> -]> - -<!-- - 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, 2005, 2006], Hyperic, 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. - --> - -<plugin package="org.hyperic.hq.plugin.activemq" name="activemq"> - - <classpath> - <include name="pdk/lib/mx4j"/> - </classpath> - - <filter name="domain" - value="org.apache.activemq"/> - - <filter name="template" - value="${OBJECT_NAME}:${alias}"/> - - <filter name="QUEUE_OBJECT_NAME" - value="${domain}:Type=Queue,BrokerName=*,Destination=*"/> - - <filter name="TOPIC_OBJECT_NAME" - value="${domain}:Type=Topic,BrokerName=*,Destination=*"/> - - <filter name="BROKER_OBJECT_NAME" - value="${domain}:Type=Broker,BrokerName=*"/> - - <!-- special casing due to 5.1 renaming: - MemoryPercentageUsed -> MemoryPercentUsage --> - <metrics name="ActiveMQ 4.0 Topic"> - <metric name="Availability" - template="${TOPIC_OBJECT_NAME}:${alias}" - indicator="true"/> - - <metric name="Enqueue Count" - template="${TOPIC_OBJECT_NAME}:${alias}" - indicator="true" - collectionType="trendsup"/> - - <metric name="Dequeue Count" - template="${TOPIC_OBJECT_NAME}:${alias}" - indicator="true" - collectionType="trendsup"/> - - <metric name="Consumer Count" - template="${TOPIC_OBJECT_NAME}:${alias}"/> - - <metric name="Queue Size" - template="${TOPIC_OBJECT_NAME}:${alias}" - indicator="true"/> - - <metric name="Memory Percentage Used" - template="${TOPIC_OBJECT_NAME}:${alias}" - units="percent"/> - </metrics> - - <metrics name="ActiveMQ 4.0 Queue"> - <metric name="Availability" - template="${QUEUE_OBJECT_NAME}:${alias}" - indicator="true"/> - - <metric name="Enqueue Count" - template="${QUEUE_OBJECT_NAME}:${alias}" - indicator="true" - collectionType="trendsup"/> - - <metric name="Dequeue Count" - template="${QUEUE_OBJECT_NAME}:${alias}" - indicator="true" - collectionType="trendsup"/> - - <metric name="Consumer Count" - template="${QUEUE_OBJECT_NAME}:${alias}"/> - - <metric name="Queue Size" - template="${QUEUE_OBJECT_NAME}:${alias}" - indicator="true"/> - - <metric name="Memory Percentage Used" - template="${QUEUE_OBJECT_NAME}:${alias}" - units="percent"/> - </metrics> - - <metrics name="ActiveMQ 4.0 Broker"> - <metric name="Availability" - template="${BROKER_OBJECT_NAME}:${alias}" - indicator="true"/> - - <metric name="Total Consumer Count" - template="${BROKER_OBJECT_NAME}:${alias}"/> - - <metric name="Total Enqueue Count" - template="${BROKER_OBJECT_NAME}:${alias}" - indicator="true" - collectionType="trendsup"/> - - <metric name="Total Dequeue Count" - template="${BROKER_OBJECT_NAME}:${alias}" - collectionType="trendsup"/> - - <metric name="Total Message Count" - template="${BROKER_OBJECT_NAME}:${alias}" - indicator="true" - collectionType="trendsup"/> - - <metric name="Memory Limit" - template="${BROKER_OBJECT_NAME}:${alias}" - units="B"/> - - <metric name="Memory Percentage Used" - template="${BROKER_OBJECT_NAME}:${alias}" - units="percent"/> - </metrics> - - <metrics name="ActiveMQ 5.1 Topic"> - <metric name="Availability" - template="${TOPIC_OBJECT_NAME}:${alias}" - indicator="true"/> - - <metric name="Enqueue Count" - template="${TOPIC_OBJECT_NAME}:${alias}" - indicator="true" - collectionType="trendsup"/> - - <metric name="Dequeue Count" - template="${TOPIC_OBJECT_NAME}:${alias}" - indicator="true" - collectionType="trendsup"/> - - <metric name="Consumer Count" - template="${TOPIC_OBJECT_NAME}:${alias}"/> - - <metric name="Queue Size" - template="${TOPIC_OBJECT_NAME}:${alias}" - indicator="true"/> - - <metric name="Memory Percent Usage" - template="${TOPIC_OBJECT_NAME}:${alias}" - units="percent"/> - </metrics> - - <metrics name="ActiveMQ 5.1 Queue"> - <metric name="Availability" - template="${QUEUE_OBJECT_NAME}:${alias}" - indicator="true"/> - - <metric name="Enqueue Count" - template="${QUEUE_OBJECT_NAME}:${alias}" - indicator="true" - collectionType="trendsup"/> - - <metric name="Dequeue Count" - template="${QUEUE_OBJECT_NAME}:${alias}" - indicator="true" - collectionType="trendsup"/> - - <metric name="Consumer Count" - template="${QUEUE_OBJECT_NAME}:${alias}"/> - - <metric name="Queue Size" - template="${QUEUE_OBJECT_NAME}:${alias}" - indicator="true"/> - - <metric name="Memory Percent Usage" - template="${QUEUE_OBJECT_NAME}:${alias}" - units="percent"/> - </metrics> - - <metrics name="ActiveMQ 5.1 Broker"> - <metric name="Availability" - template="${BROKER_OBJECT_NAME}:${alias}" - indicator="true"/> - - <metric name="Total Consumer Count" - template="${BROKER_OBJECT_NAME}:${alias}"/> - - <metric name="Total Enqueue Count" - template="${BROKER_OBJECT_NAME}:${alias}" - indicator="true" - collectionType="trendsup"/> - - <metric name="Total Dequeue Count" - template="${BROKER_OBJECT_NAME}:${alias}" - collectionType="trendsup"/> - - <metric name="Total Message Count" - template="${BROKER_OBJECT_NAME}:${alias}" - indicator="true" - collectionType="trendsup"/> - - <metric name="Memory Limit" - template="${BROKER_OBJECT_NAME}:${alias}" - units="B"/> - - <metric name="Memory Percent Usage" - template="${BROKER_OBJECT_NAME}:${alias}" - units="percent"/> - </metrics> - - <config name="destination"> - <option name="BrokerName" - description="Broker Name" - default=""/> - - <option name="Destination" - description="Destination" - default=""/> - </config> - - <server name="ActiveMQ" - version="4.0"> - - <!-- derive installpath from -Dactivemq.home=... --> - <property name="PROC_HOME_PROPERTY" - value="activemq.home"/> - - <property name="DEFAULT_CONF" - value="conf/activemq.xml"/> - - <property name="DEFAULT_LOG_FILE" - value="var/activemq.log"/> - - <property name="VERSION_FILE" - value="**/lib/.*activemq-core-4.\d*.*.jar"/> - - <config> - <option name="process.query" - description="Process Query"/> - </config> - - <plugin type="autoinventory" - class="org.hyperic.hq.product.jmx.MxServerDetector"/> - - <plugin type="measurement" - class="org.hyperic.hq.product.jmx.MxMeasurementPlugin"/> - - <plugin type="log_track" - class="org.hyperic.hq.product.Log4JLogTrackPlugin"/> - - <plugin type="config_track" - class="org.hyperic.hq.product.ConfigFileTrackPlugin"/> - - <metric name="Availability" - template="sigar:Type=ProcState,Arg=%process.query%:State" - indicator="true"/> - - &process-metrics; - - <service name="Connector"> - <property name="OBJECT_NAME" - value="${domain}:Type=Connector,BrokerName=*,ConnectorName=*"/> - - <config> - <option name="BrokerName" - description="Broker Name" - default=""/> - - <option name="ConnectorName" - description="Connector Name" - default=""/> - </config> - - <plugin type="autoinventory"/> - - <plugin type="control" - class="org.hyperic.hq.product.jmx.MxControlPlugin"/> - - <actions include="start,stop"/> - - <metric name="Availability" - indicator="true"/> - - <metric name="Enqueue Count" - indicator="true" - collectionType="trendsup"/> - - <metric name="Dequeue Count" - indicator="true" - collectionType="trendsup"/> - </service> - - <service name="Broker"> - <property name="OBJECT_NAME" value="${BROKER_OBJECT_NAME}"/> - - <config> - <option name="BrokerName" - description="Broker Name" - default=""/> - </config> - - <plugin type="autoinventory"/> - - <plugin type="control" - class="org.hyperic.hq.product.jmx.MxControlPlugin"/> - - <actions include="start,stop,gc,removeTopic,removeQueue"/> - </service> - - <!-- - Tested based on: - http://incubator.apache.org/activemq/run-broker.html - activemq broker:(tcp://localhost:61616,network:static:tcp://localhost:61616)?persistent=false&useJmx=true - --> - - <service name="Queue"> - <property name="OBJECT_NAME" value="${QUEUE_OBJECT_NAME}"/> - - <config include="destination"/> - - <plugin type="autoinventory"/> - - <plugin type="control" - class="org.hyperic.hq.product.jmx.MxControlPlugin"/> - - <actions include="sendTextMessage"/> - </service> - - <!-- same as Queue except for Type=Topic --> - <service name="Topic"> - <property name="OBJECT_NAME" value="${TOPIC_OBJECT_NAME}"/> - - <config include="destination"/> - - <plugin type="autoinventory"/> - - <plugin type="control" - class="org.hyperic.hq.product.jmx.MxControlPlugin"/> - - <actions include="sendTextMessage"/> - </service> - - <!-- &sun-jvm-service; --> - - </server> - - <server name="ActiveMQ" - version="5.0" - include="4.0"> - <property name="VERSION_FILE" - value="**/.*activemq-core-(5.\d*).*.jar"/> -</server> - - <server name="ActiveMQ" - version="5.1" - include="5.0"> - </server> - - <server name="ActiveMQ" - version="5.2" - include="5.1"> - </server> - - <server name="ActiveMQ" - version="5.3" - include="5.2"> - </server> - - <server name="ActiveMQ Embedded" - version="5.0" - include="ActiveMQ 5.0"> - <property name="PROC_HOME_PROPERTY" - value="catalina.base"/> - </server> - <server name="ActiveMQ Embedded" - version="5.1" - include="ActiveMQ 5.1"> - <property name="PROC_HOME_PROPERTY" - value="catalina.base"/> - </server> - <server name="ActiveMQ Embedded" - version="5.2" - include="5.1"> - </server> - <server name="ActiveMQ Embedded" - version="5.3" - include="5.2"> - </server> - -</plugin> |