ActiveMQ Monitoring

Monitor the performance metrics of your Apache ActiveMQ instances to keep your diverse systems connected and communicating.

Apache ActiveMQ enables easy processing of messages from various applications and communicates them across your infrastructure. Install the ActiveMQ plugin to get a detailed view of how your systems and services are performing - all in a single, intuitive dashboard.

This document details how to configure the ActiveMQ plugin and the monitoring metrics for providing in-depth visibility into the performance, availability, and usage stats of Apache ActiveMQ instances.

Performance Metrics

Total message count

total_message_count gives the total number of messages in the queue, including the number of enqueued and dequeued messages. The enqueue and the dequeue rate should match if the producer and active consumers are in sync.

Total connections count

Both the producer and consumer have to connect to the ActiveMQ instance for posting and consuming messages respectively. total_connections_count gives the total number of connections. The performance of the ActiveMQ instance will be affected if the number of connections go beyond the server capacity.

Total consumer count

Total number of consumers that have consumed the messages posted by the producers is shown by total_consumer_count.

Total producer count

Total number of producers that have posted messages to the ActiveMQ instance is shown by total_producer_count.

Prerequisites

  • Download and install the Site24x7 server monitoring agent (Linux | Windows) in the network or on the specific host where the ActiveMQ instance is running.
  • Ensure that you have Python 3.7 or a higher version installed in the server.
  • The plugin uses the JPype Python library. This module is used to execute the JMX query and get data. Execute the below command to install the Python JPype module in your server.
    pip install JPype1
  • JMX connection should be enabled in the Apache ActiveMQ installation folder.
    To enable it with password protection follow the ActiveMQ Documentation.
    To enable it without password protection follow the below steps:
    • Open the conf/activemq.xml file inside the installation folder of Apache ActiveMQ and change the following attributes:
      <managementContext>
      <managementContext createConnector="true" connectorPort="1099"/>
      </managementContext>
  • Restart the ActiveMQ service after making the above changes.

Plugin Installation

  • Create a folder named activemq.
  • Download the activemq.py and the activemq.cfg files from our GitHub repository and place them in the activemq folder.
    wget https://raw.githubusercontent.com/site24x7/plugins/master/activemq/activemq.py
    wget https://raw.githubusercontent.com/site24x7/plugins/master/activemq/activemq.cfg
  • To check if the plugin is working, execute the command below with appropriate arguments and check for a valid JSON output with applicable metrics and their corresponding value.
    python activemq.py –-host_name=localhost -–port=1099 -–broker_name=<your_broker_name> --destination_name=<your_queue_name>
  • Add the applicable configurations in the activemq.cfg file.
    [display_name]
    host_name=“<your_host_name>”
    port=“1099”
    broker_name=“<your_broker_name>”
    destination_name=“<your_destination_name>”
  • Follow the steps in this article to learn how to run the Python script on a Windows server. You don't need to do this for Linux.
  • Move the activemq folder to the Site24x7 server monitoring plugins directory.

    For Linux: /opt/site24x7/monagent/plugins/

    For Windows: C:\Program Files (x86)\Site24x7\WinAgent\monitoring\plugins\

The agent will automatically execute the plugin within five minutes and display performance data in Site24x7.
To view the plugin monitor and associated performance charts:
  • Log in to Site24x7.
  • Navigate to Plugins and click the required monitor.
  • Create a folder named activemq_topics.
  • Download the activemq_topics.py and the activemq_topics.cfg files from our GitHub repository and place them in the activemq_topics folder.
    wget https://raw.githubusercontent.com/site24x7/plugins/master/activemq/activemq_topics/activemq_topics.py
    wget https://raw.githubusercontent.com/site24x7/plugins/master/activemq/activemq_topics/activemq_topics.cfg
  • To check if the plugin is working, execute the command below with appropriate arguments and check for a valid JSON output with applicable metrics and their corresponding value.
    python3 activemq_topics.py --hostname <hostname> --port <port> --broker_name <broker_name> --topic_name <topic_name>
  • Add the applicable configurations in the activemq_topics.cfg file.
    [active mq_topics]
    hostname=hostname”
    port=port
    broker_name=broker_name
    topic_name=topic_name
    logs_enabled="False"
    log_type_name=None
    log_file_path==None
  • Follow the steps in this article to learn how to run the Python script on a Windows server. You don't need to do this for Linux.
  • Move the activemq_topics folder to the Site24x7 server monitoring plugins directory.

    For Linux: /opt/site24x7/monagent/plugins/

    For Windows: C:\Program Files (x86)\Site24x7\WinAgent\monitoring\plugins\

The agent will automatically execute the plugin within five minutes and display performance data in Site24x7.
To view the plugin monitor and associated performance charts:
  • Log in to Site24x7.
  • Navigate to Plugins and click the required monitor.

Plugin Contribution

Feel free to contribute to our existing plugin and come up with suggestions or feedback on our Community.

Other Plugin Integrations