AppDynamics Extension for ActiveMQ - Monitoring

Untitled Document.md

AppDynamics ActiveMQ Monitoring Extension

This extension works only with the standalone machine agent.


Use Case

ActiveMQ is an open source, JMS 1.1 compliant, message-oriented middleware (MOM) from the Apache Software Foundation that provides high-availability, performance, scalability, reliability and security for enterprise messaging. The ActiveMQ Monitoring extension collects metrics from an ActiveMQ messaging server and uploads them to the AppDynamics Metric Browser.


Prerequisites

JMX must be enabled in ActiveMQ Messaging server for this extension to gather metrics. To enable, please see these instructions.


Troubleshooting steps

Before configuring the extension, please make sure to run the below steps to check if the set up is correct.

  1. Telnet into your activemq server from the box where the extension is deployed. telnet <hostname> <port>

    <port> - It is the jmxremote.port specified.
        <hostname> - IP address
    

    If telnet works, it confirm the access to the activemq server.

  1. Start jconsole. Jconsole comes as a utitlity with installed jdk. After giving the correct host and port , check if activemq mbean shows up.

Installation

  1. The extension can be downloaded from this page. You can even build it from source. Run ‘mvn clean install’ from the activemq-monitoring-extension directory and find the ActiveMQMonitor.zip in the “target” folder.
  2. Unzip as “ActiveMQMonitor” and copy the “ActiveMQMonitor” directory to <MACHINE_AGENT_HOME>/monitors

Configuration

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. Configure the ActiveMQ instances by editing the config.yml file in <MACHINE_AGENT_HOME>/monitors/ActiveMQMonitor/.

  2. Configure the yaml file

    For eg.

    
    
    ### ANY CHANGES TO THIS FILE DOES NOT REQUIRE A RESTART ###
    
    # List of ActiveMQ Servers
    servers:
      -
          #host: "localhost"
          #port: 8161
          serviceUrl: "service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi"
          username: ""
          password: ""
          #displayName is a required field. This will be your server name that will show up in metric path.
          displayName: "localhost"
    
    # number of concurrent tasks.
    # This doesn't need to be changed unless many servers are configured
    numberOfThreads: 10
    
    #timeout for the thread
    threadTimeout: 30
    
    
    #This will create this metric in all the tiers, under this path
    metricPrefix: Custom Metrics|ActiveMQ
    
    #This will create it in specific Tier. Replace 
    #metricPrefix: "Server|Component:|Custom Metrics|ActiveMQ"
    
    # The configuration of different metrics from various mbeans of activemq server
    # The mbeans are already configured.This does not need to be changed unless
    # someone needs to configure on their own.
    mbeans:
      # This Mbean will extract out Broker metrics
      - objectName: "org.apache.activemq:type=Broker,brokerName=*"
        metrics:
          include:
            - StorePercentUsage: "Store Percent Usage"
            - TempPercentUsage: "Temp Percent Usage"
            - MemoryPercentUsage: "Memory Percent Usage"
            - TotalConnectionsCount: "Total Connections Count"
            - TotalConsumerCount: "Total Consumer Count"
            - TotalDequeueCount: "Total Dequeue Count"
            - TotalEnqueueCount: "Total Enqueue Count"
            - TotalMessageCount: "Total Message Count"
            - TotalProducerCount: "Total Producer Count"
    
      # This Mbean will extract out Queue metrics
      - objectName: "org.apache.activemq:type=Broker,brokerName=*,destinationType=Queue,destinationName=*"
        metrics:
          include:
            - AverageEnqueueTime: "Average Enqueue Time"
            - ConsumerCount: "Consumer Count"
            - ProducerCount: "Producer Count"
            - MaxEnqueueTime: "Max Enqueue Time"
            - MinEnqueueTime: "Min Enqueue Time"
            - MemoryPercentUsage: "Memory Percent Usage"
            - QueueSize: "Queue Size"
            - DequeueCount: "Dequeue Count"
            - DispatchCount: "Dispatch Count"
            - EnqueueCount: "Enqueue Count"
            - ExpiredCount: "Expired Count"
            - InFlightCount: "In Flight Count"
            - AverageMessageSize: "Average Message Size"
    
      # This MBean will extract out Topic metrics.
      - objectName: "org.apache.activemq:type=Broker,brokerName=*,destinationType=Topic,destinationName=*"
        metrics:
          include:
            - AverageEnqueueTime: "Average Enqueue Time"
            - ConsumerCount: "Consumer Count"
            - ProducerCount: "Producer Count"
            - MaxEnqueueTime: "Max Enqueue Time"
            - MinEnqueueTime: "Min Enqueue Time"
            - MemoryPercentUsage: "Memory Percent Usage"
            - QueueSize: "Queue Size"
            - DequeueCount: "Dequeue Count"
            - DispatchCount: "Dispatch Count"
            - EnqueueCount: "Enqueue Count"
            - ExpiredCount: "Expired Count"
            - InFlightCount: "In Flight Count"
            - AverageMessageSize: "Average Message Size"
    
    
      - objectName: "java.lang:type=Memory"
        metrics:
          include:
            - HeapMemoryUsage.committed : "Heap Memory Usage|Committed"
            - HeapMemoryUsage.used : "Heap Memory Usage|Used"
            - NonHeapMemoryUsage.committed : "Non Heap Memory Usage|Committed"
            - NonHeapMemoryUsage.used : "Non Heap Memory Usage|Used"
    
    
    

    The objectNames mentioned in the above yaml may not match your environment exactly. Please use jconsole to extract the objectName and configure it accordingly in the config.yaml.
  1. Configure the path to the config.yml file by editing the <task-arguments> in the monitor.xml file in the <MACHINE_AGENT_HOME>/monitors/ActiveMQMonitor/ directory. Below is the sample

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

Metrics

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

Custom Dashboard


Credentials Encryption

Please visit this page to get detailed instructions on password encryption. The steps in this document will guide you through the whole process.

Extensions Workbench

Workbench is an inbuilt feature provided with each extension in order to assist you to fine tune the extension setup before you actually deploy it on the controller. Please review the following document on How to use the Extensions WorkBench

Troubleshooting

Please follow the steps listed in this troubleshooting-document in order to troubleshoot your issue. These are a set of common issues that customers might have faced during the installation of the extension. If these don't solve your issue, please follow the last step on the troubleshooting-document to contact the support team.

  • ObjectName:  The following are the object names configured by default in the config.yml. With different ActiveMQ versions, these might be different. Please use JConsole to verify the object names.
    org.apache.activemq:type=Broker,brokerName=*
    org.apache.activemq:type=Broker,brokerName=*,destinationType=Queue,destinationName=*
    org.apache.activemq:type=Broker,brokerName=*,destinationType=Topic,destinationName=*
    
  • Support Tickets

    If after going through the Troubleshooting Document you have not been able to get your extension working, please file a ticket and add the following information.

    Please provide the following in order for us to assist you better.

    1. Stop the running machine agent .
    2. Delete all existing logs under <MachineAgent>/logs.
    3. Please enable debug logging by editing the file <MachineAgent>/conf/logging/log4j.xml. Change the level value of the following <logger> elements to debug.
      • <logger name="com.singularity">
      • <logger name="com.appdynamics">
    4. Start the machine agent and please let it run for 10 mins. Then zip and upload all the logs in the directory <MachineAgent>/logs/*.
    5. Attach the zipped <MachineAgent>/conf/* directory here.
    6. Attach the zipped <MachineAgent>/monitors/ExtensionFolderYouAreHavingIssuesWith directory here .

    For any support related questions, you can also contact help@appdynamics.com.

    Version: 5.0.4