An AppDynamics extension to be used with a stand alone Java machine agent to provide metrics for HornetQ messaging server.
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.
<MachineAgent_Dir>/monitors/HornetQMonitorThe 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.
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
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
# List of HornetQ servers # HornetQ is monitored using JMX. # (host & port) OR jmxServiceUrl required servers: - 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. metricOverrides: - metricKey: "Acceptor.*" disabled: true - metricKey: "Address.*" disabled: true - metricKey: ".*Rate.*" postfix: "Percent" multiplier: 100 disabled: false timeRollup: "AVERAGE" clusterRollup: "COLLECTIVE" aggregator: "SUM"
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
<task-arguments> <!-- config file--> <argument name="config-file" is-required="true" default-value="monitors/HornetQMonitor/config.yml" /> .... </task-arguments>
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
Always feel free to fork and contribute any changes directly via GitHub.
For any support questions, please contact firstname.lastname@example.org.
|12th Feb, 2018|