AppDynamics Monitoring Extension for use with HornetQ

An AppDynamics extension to be used with a stand alone Java machine agent to provide metrics for HornetQ messaging server.

Use Case

HornetQ is an open source project to build a multi-protocol, embeddable, very high performance, clustered, asynchronous messaging system. HornetQ is an example of Message Oriented Middleware (MoM). This monitoring extension captures statistics from the HornetQ server and displays them in the AppDynamics Metric Browser.


  1. Before the extension is installed, the prerequisites mentioned here need to be met. Please do not proceed with the extension installation if the specified prerequisites are not met.
  2. JMX must be enabled in HornetQ Messaging server for this extension to gather metrics. Connect with jconsole as a remote process with credentials to check if JMX is enabled.


  1. Download the file
  2. Unzip as "HornetQMonitor" and copy the "HornetQMonitor" directory to <MACHINE_AGENT_HOME>/monitors
  3. Edit the file config.yml located at <MachineAgent_Dir>/monitors/HornetQMonitor The metricPrefix of the extension has to be configured as specified here. Please make sure that the right metricPrefix is chosen based on your machine agent deployment, otherwise this could lead to metrics not being visible in the controller.
  4. Configure the extension by following the below section


Note : Please make sure to not use tab (\t) while editing yaml files. You may want to validate the yaml file using a yaml validator

  1. Specify the Hornetq instance host, JMX port, username and password in the config.yml. Configure the MBeans for this extension to report the metrics to Controller. By default, "org.hornetq" is the domain name. You can enable/disable metrics getting reported to Controller by configuring the metricOverrides property

    For eg.

        # List of HornetQ servers
        # HornetQ is monitored using JMX.
        # (host & port) OR jmxServiceUrl required
          - host: "localhost"
            port: 3333
            # jmxServiceUrl:
            username: ""
            password: ""
            displayName: "localhost"
        # hornetq mbean domain name
        mbeanDomainName: "org.hornetq"
        # number of concurrent tasks
        numberOfThreads: 10
        #timeout for the thread
        threadTimeout: 30
         #prefix used to show up metrics in AppDynamics
        metricPathPrefix:  "Custom Metrics|HornetQ|"
        #Metric Overrides. Change this if you want to transform the metric key or value or its properties.
          - metricKey: "Acceptor.*"
            disabled: true
          - metricKey: "Address.*"
            disabled: true
          - metricKey: ".*Rate.*"
            postfix: "Percent"
            multiplier: 100
            disabled: false
            timeRollup: "AVERAGE"
            clusterRollup: "COLLECTIVE"
            aggregator: "SUM"
  2. Configure the path to the config.yml file by editing the in the monitor.xml file in the <MACHINE_AGENT_HOME>/monitors/HornetQMonitor/ directory. Below is the sample

         <!-- config file-->
         <argument name="config-file" is-required="true" default-value="monitors/HornetQMonitor/config.yml" />

Restart the Machine Agent after configuring config.yml as mentioned above.


Extension reports metrics exposed by JMX and can be enabled/disabled by configuring metricOverrides property in config.yml

In addition to the above metrics, we also add a metric called "Metrics Collection Successful" with a value 0 when an error occurs and 1 when the metrics collection is successful.

Note : By default, a Machine agent or a AppServer agent can send a fixed number of metrics to the controller. To change this limit, please follow the instructions mentioned here. For eg.

    java -Dappdynamics.agent.maxMetrics=2500 -jar machineagent.jar


  1. Please look at the troubleshooting document and make sure that everything is followed correctly.


Always feel free to fork and contribute any changes directly via GitHub.


For any support questions, please contact






Last Update:

12th Feb, 2018