惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Vulnerabilities – Threatpost
aimingoo的专栏
aimingoo的专栏
B
Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
GbyAI
GbyAI
阮一峰的网络日志
阮一峰的网络日志
Engineering at Meta
Engineering at Meta
IT之家
IT之家
V
Visual Studio Blog
The Cloudflare Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
A
About on SuperTechFans
博客园 - 聂微东
Blog — PlanetScale
Blog — PlanetScale
N
News and Events Feed by Topic
A
Arctic Wolf
WordPress大学
WordPress大学
小众软件
小众软件
C
CERT Recently Published Vulnerability Notes
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
D
Darknet – Hacking Tools, Hacker News & Cyber Security
F
Fortinet All Blogs
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Y
Y Combinator Blog
T
Threat Research - Cisco Blogs
Latest news
Latest news
Simon Willison's Weblog
Simon Willison's Weblog
Cyberwarzone
Cyberwarzone
S
Schneier on Security
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
L
Lohrmann on Cybersecurity
Stack Overflow Blog
Stack Overflow Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
P
Privacy International News Feed
J
Java Code Geeks
Spread Privacy
Spread Privacy
宝玉的分享
宝玉的分享
I
Intezer
L
LangChain Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
G
GRAHAM CLULEY
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
The GitHub Blog
The GitHub Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
N
News and Events Feed by Topic
AWS News Blog
AWS News Blog
Attack and Defense Labs
Attack and Defense Labs
Security Archives - TechRepublic
Security Archives - TechRepublic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO

Datadog | The Monitor blog

Introducing our open source AI-native SAST Instrument and monitor Boomi integration flows with OpenTelemetry and Datadog Not all index scans are equal: How we cut query latency by over 99% Platform engineering metrics: What to measure and what to ignore Integrate Recorded Future threat intelligence with Datadog Cloud SIEM CI/CD security: threat modeling using a MITRE-style threat matrix CI/CD security: How to secure your GitHub ecosystem Ingress NGINX is EOL: A practical guide for migrating to Kubernetes Gateway API Operating agentic AI with Amazon Bedrock AgentCore and Datadog LLM Observability: Lessons from NTT DATA Introducing the Datadog Code Security MCP Capture and analyze custom heatmaps in Session Replay Understand session replays faster with AI summaries and smart chapters Monitor ClickHouse query performance with Datadog Database Monitoring How we designed empathetic alert sounds for on-call engineers Search and act across Datadog to resolve issues faster with Bits Assistant Measure the business impact of every product change with Datadog Experiments Analyzing round trip query latency Configuring JavaScript caches for better performance Introducing Bits AI Dev Agent for Code Security Datadog achieves ISO 42001 certification for responsible AI Monitor Nutanix clusters, hosts, and VMs with Datadog Monitor Juniper Mist in Datadog A new Host Map for modern infrastructure Annotate traces to improve LLM quality with Datadog LLM Observability What’s new in Cloud SIEM: AI-powered investigations, enhanced threat intelligence, and scalable security operations Explore Kubernetes with native OpenTelemetry data Monitor Oracle Fusion Cloud Applications with Datadog Announcing the Datadog Terraform provider v4.0.0 Scaling Kubernetes workloads on custom metrics How to design cloud environments for AI-powered threat analysis Monitor Aruba Central in Datadog How we centralize and remediate risks with Datadog Case Management Accelerate incident response with Datadog and ServiceNow Monitor your application and network load balancer logs Understanding Karpenter architecture for Kubernetes autoscaling Tools for collecting metrics and logs from Karpenter Monitor Karpenter with Datadog What your product data is actually saying Key metrics for monitoring Karpenter Securing Datadog’s platform in the AI age: The role of observability data Four ways engineering teams use the Datadog MCP Server to power AI agents Approaching your observability migration with the right mindset Meet the new Bits AI SRE: Deeper reasoning, twice as fast Key learnings from the 2026 State of DevSecOps study Use plain English to query your multi-cloud infrastructure in Resource Catalog Simplifying troubleshooting across the user journey with Datadog Synthetic Monitoring Protect your OCI resources with Datadog Cloud Security This Month in Datadog - February 2026 Amazon EC2 security: How misconfigured and public AMIs expand your cloud attack surface Enable end-to-end visibility into your Java apps with a single command Measure and improve mobile app startup performance with Datadog RUM Evaluating our AI Guard application to improve quality and control cost Identify untested code across every level of your codebase Make use of guardrail metrics and stop babysitting your releases Monitor Versa Networks SD-WAN performance in Datadog Improve performance and reliability with APM Recommendations Remediate transitive vulnerabilities faster with Datadog Software Composition Analysis Generate audit-ready vulnerability and compliance reports with Datadog Sheets Monitor Fortinet FortiManager performance in Datadog Improve test coverage across codebases with Datadog Code Coverage Move fast, don’t break things: Consistent testing standards at scale Enrich logs with ServiceNow CMDB context before routing to any SIEM or logging tool Monitor Lustre with Datadog Make faster, better product decisions with Datadog Product Analytics Surface and remediate runtime posture issues with Workload Protection Findings Protect agentic AI applications with Datadog AI Guard How to optimize JavaScript code with CSS Trace Google Pub/Sub workloads in Cloud Run with Datadog Detect human names in logs with ML in Sensitive Data Scanner How we cut our NLQ agent debugging time from hours to minutes with LLM Observability Debug PostgreSQL query latency faster with EXPLAIN ANALYZE in Datadog Database Monitoring Datadog acquires Propolis Unify and correlate frontend and backend data with retention filters Scale compliance across global frameworks with Datadog Cloud Security Monitor Arista VeloCloud SD-WAN performance with Datadog Building reliable dashboard agents with Datadog LLM Observability Simplify log collection and aggregation for MSSPs with Datadog Observability Pipelines Mitigation for Node.js denial-of-service vulnerability affecting Datadog APM Automate flaky test fixes with the Bits AI Dev Agent and Test Optimization How we built an AI SRE agent that investigates like a team of engineers Datadog integrations 2025 recap: Observability for AI, security, and hybrid cloud Design effective executive dashboards with Datadog Implement dbt data quality checks with dbt-expectations Bring faster visibility into AWS Lambda functions with remote instrumentation Troubleshoot faster with the GitLab Source Code integration in Datadog How Cambia Health Solutions saved $30,000 monthly with Cloud Cost Management and the Datadog Resource Catalog Normalize any logs for Cloud SIEM with Datadog's OCSF processor Optimizing Datadog at scale: Cost-efficient observability at Zendesk Detect, diagnose, and resolve network issues easily with CNM Network Health Connect engineering errors to user impact in early-stage products Cilium configuration for Kubernetes operations at scale Designing feedback loops for progressive delivery Ship features faster and safer with Datadog Feature Flags Choosing the right OpenTelemetry Collector distribution Route your monitor alerts with Datadog monitor notification rules Automate Cloud SIEM investigations with Bits AI Security Analyst Cloud threat detection: How to identify risky activity across control and data planes Collecting Kafka performance metrics Monitoring Kafka with Datadog Monitoring Kafka performance metrics
Collecting ActiveMQ metrics
2018-12-04 · via Datadog | The Monitor blog
David M. Lentz

David M. Lentz

Editor’s note (September 2021): This post has been updated to include new information about ActiveMQ Artemis.

In Part 1 of this series, we looked at how ActiveMQ works, the differences between ActiveMQ Classic and ActiveMQ Artemis, and the key metrics you can monitor to ensure proper performance of your messaging infrastructure, whichever version you’re using. In this post, we’ll show you some of the tools that you can use to collect ActiveMQ metrics. This includes tools that ship with ActiveMQ, and some other tools that make use of Java Management Extensions (JMX) to monitor ActiveMQ brokers, destinations, and addresses.

ToolDescriptionMetrics it collects
ActiveMQ command line toolsScripts that are included with ActiveMQLimited broker and destination metrics
ActiveMQ Web ConsoleA GUI-based tool that’s included with ActiveMQLimited broker and destination metrics
JConsoleA GUI-based tool that’s included with the JDK and uses JMX to fetch metricsBroker and destination metrics, JVM metrics
HawtioA GUI-based tool that uses JMX to fetch metricsBroker and destination metrics, JVM metrics
Statistics plugin and management message APITools for fetching metrics as JMS messagesBroker and destination metrics

ActiveMQ command line tools

ActiveMQ comes with scripts you can execute from a Windows or Unix-like command line interface (CLI) to retrieve basic metrics about your broker, destinations (in ActiveMQ Classic), and addresses (in ActiveMQ Artemis). The commands differ across platforms, and the ActiveMQ documentation for Classic and Artemis describes the syntax of the commands and their arguments.

ActiveMQ Classic CLI tools

ActiveMQ Classic’s bstat command shows you the number of messages enqueued and dequeued by each destination, as well as the TotalEnqueueCount and TotalDequeueCount broker metrics we looked at in Part 1 of this series. The example below shows an excerpt of the output of the bstat command on an Ubuntu host.

[...]

BrokerName = localhost

TotalEnqueueCount = 57100

TotalDequeueCount = 0

TotalMessageCount = 57100

TotalConsumerCount = 0

Uptime = 1 hour 6 minutes

Name = TEST_QUEUE

destinationName = TEST_QUEUE

destinationType = Queue

EnqueueCount = 57100

DequeueCount = 0

ConsumerCount = 0

DispatchCount = 0

[...]

You can use the dstat command to view most of the ActiveMQ Classic destination metrics from Part 1 of this series. The output below shows a sample of the statistics returned by the dstat command on an Ubuntu host. As you can see, the dstat output names these metrics differently than their JMX attribute names: ProducerCount appears in the Producer # column, ConsumerCount appears as Consumer #, QueueSize as Queue Size, and MemoryPercentUsage as Memory %.

[...]

Name Queue Size Producer # Consumer # Enqueue # Dequeue # Forward # Memory % Inflight #

TEST_QUEUE 57100 1 0 57100 0 0 70 0

You can use bstat and dstat commands to view some of the key metrics we introduced in Part 1 of this series, but you won’t see data on metrics like ExpiredCount, StorePercentUsage, or TempPercentUsage. In the following sections, we’ll describe several other tools that provide more complete visibility into the performance of your ActiveMQ Classic broker and destinations.

ActiveMQ Artemis CLI tools

Artemis organizes messages into addresses, and each address comprises some number of queues. You can use Artemis’s queue command to see information about the queues that exist on the running broker. This command identifies the address each queue belongs to and shows the count of messages and consumers associated with that queue. It also reports each queue’s routing type, which determines the type of messaging it supports—point-to-point or pub/sub. The snippet below shows how you would use Artemis’s queue command to inspect queue0, a test queue that currently holds three messages.

./artemis queue stat --queueName queue0

Connection brokerURL = tcp://localhost:61616

|NAME |ADDRESS |CONSUMER_COUNT |MESSAGE_COUNT |MESSAGES_ADDED |DELIVERING_COUNT |MESSAGES_ACKED |SCHEDULED_COUNT |ROUTING_TYPE |

|queue0 |queue0 |0 |3 |3 |0 |0 |0 |ANYCAST |

ActiveMQ Web Console

The ActiveMQ Web Console is an interactive, GUI-based tool that gives you an easy way to view metrics. Since it ships with ActiveMQ Classic and ActiveMQ Artemis, you don’t need to install anything to start using it. The Web Console operates on port 8161 by default, so your ActiveMQ host will need to be configured to accept connections on that port (or you can update your Classic or Artemis configuration to use a different port).

The main page of the ActiveMQ Classic Web Console—shown below—displays information about the broker’s memory usage, as well as store usage and temp usage. You can navigate the console using the tabs on the top of the page to see data from your destinations, including the number of pending messages and the number of consumers.

The main page of the ActiveMQ Classic Web Console shows the broker's uptime, store usage, memory usage, and temp usage.

The ActiveMQ Classic Web Console shows most (but not all) of the broker and destination metrics we highlighted in our guide to key ActiveMQ metrics, plus information about some optional features like broker networks and scheduled messages. To get access to all of the metrics we covered in Part 1, and to view historical data about your JVM’s resource usage, you’ll need to directly query Java Management Extensions (JMX) by using a tool like JConsole.

ActiveMQ Artemis uses an embedded instance of Hawtio to provide a similar Web Console that displays broker, address, and queue metrics. In the screenshot below, the Web Console shows configuration data and metrics from a queue named queue0 (which belongs to an address that is also named queue0).

The ActiveMQ Artemis Web Console shows queue metrics including consumer count, message count, and queue size, plus configuration details about the queue.

Just as with the Classic version, Artemis provides metrics via JMX, so you can also use JConsole to inspect its performance and execute some operations on the broker. In the next section, we’ll describe how to configure ActiveMQ so you can access these metrics and operations via JConsole.

Collecting ActiveMQ metrics with JMX and JConsole

Like other Java applications, ActiveMQ exposes metrics through JMX. JConsole is an application you can use to monitor any Java app that implements JMX, including both versions of ActiveMQ—Classic and Artemis. JConsole is included in the Java Development Kit (JDK), and it can communicate with any Java application that provides MBeans: JMX-compliant objects that expose the app’s attributes and operations.

In this section, we’ll show you how to configure and launch JConsole, then we’ll look at how to use it to view ActiveMQ metrics.

Configuring ActiveMQ to allow remote monitoring via JConsole

JConsole is a GUI-based tool, so it requires a platform that provides a GUI environment in which it can run. Because your ActiveMQ infrastructure may not provide a GUI environment, and because JConsole is fairly resource intensive, you’ll often need to run JConsole on a machine other than your ActiveMQ host. To do so, you’ll need to configure your ActiveMQ host to allow remote access, which demands appropriate security considerations. See the Oracle or Apache documentation for guidance on configuring secure remote JMX access for production environments.

Launching JConsole

JConsole is included in the JDK, so you’ll need to install that on your client machine if you haven’t already. Launch JConsole from a command line by typing the full path to the JConsole program. In the example below, JConsole is installed in the /usr/bin/ directory. (See Oracle’s JConsole documentation for more information about launching JConsole.)

/usr/bin/jconsole

Select Remote Process in the JConsole GUI and enter your ActiveMQ host’s IP address, followed by the port you configured for JMX access. Enter the username and password—if any—that your server requires for remote JMX access, then click Connect.

When JConsole opens, you can enter connection information for your ActiveMQ host.

Viewing ActiveMQ metrics in JConsole

JConsole’s MBeans tab shows all the JMX sources available in the JVM, formatted as a tree. The top level of each JMX source is its domain, and below that are the MBeans that belong to that domain. ActiveMQ Classic’s JMX domain is org.apache.activemq and Artemis’s domain is org.apache.activemq.artemis. Under that is a Broker MBean, which contains MBeans for all destinations or addresses associated with that broker. Part 1 of this series lists ActiveMQ’s broker and destination metrics, along with their associated JMX attributes. You’ll see all those attributes listed within the MBeans shown in JConsole.

JConsole shows ActiveMQ as one of the applications available to it as an MBean.
JConsole screenshot showing the ActiveMQ MBean.
JConsole shows ActiveMQ as one of the applications available to it as an MBean.

The broker and destination data you see in JConsole is current as of when you load the page, but it doesn’t update automatically. Use the Refresh button to ensure your data is up to date.

In addition to displaying metrics about ActiveMQ, JConsole shows you operating information about the JVM in which ActiveMQ is running. Under the VM Summary tab, you can see information about threads and memory usage that can provide useful context when you’re investigating ActiveMQ performance issues.

Use JConsole's VM Summary to monitor resource metrics from the JVM in which ActiveMQ is running, like thread count and memory usage.
Screenshot of the JConsole VM Summary tab which shows a summary of the JVM's thread count, classes loaded, and memory in use.
Use JConsole's VM Summary to monitor resource metrics from the JVM in which ActiveMQ is running, like thread count and memory usage.

Like the Web Console, JConsole is a graphical user interface. Unlike the Web Console, JConsole allows you to see some historical data. Although JConsole doesn’t show historical data about ActiveMQ’s metrics, you can view timeseries data about JVM resource usage. You can graph the JVM’s memory and CPU usage metrics, and also the count of classes and threads used by the JVM. These visualizations can help you spot trends in your JVM’s performance. Use the Time Range dropdown to select your desired range—scaled down to the past minute, or zoomed out to the entire time JConsole has been running.

JConsole's overview tab shows graphs of CPU usage, heap memory usage, and classes loaded.

We’ve shown how JConsole allows you to remotely view ActiveMQ metrics using JMX. But JConsole doesn’t provide graphs of your ActiveMQ metrics, and it requires you to open a port to allow traffic specifically for JMX requests. In the next section, we’ll look at Hawtio, a JMX monitoring tool that works over HTTP and helps you visualize ActiveMQ metrics with timeseries graphs.

Hawtio

Hawtio is an open source, GUI-based tool that you can use to monitor Java applications that expose metrics via JMX. In an ActiveMQ Classic installation, Hawtio works as a web app similar to the Web Console. In ActiveMQ Artemis, a built-in instance of Hawtio is used to power the Web Console. Hawtio displays broker and destination metrics as numerical data, and as timeseries graphs, which Hawtio calls Charts.

One of the views in Hawtio shows queue metrics as a timeseries graph.
This Hawtio screenshot shows ten different ActiveMQ metrics visualized as timeseries graphs in one view.
One of the views in Hawtio shows queue metrics as a timeseries graph.

Hawtio uses horizon graphs to visualize metrics. These are a type of timeseries graph that uses color to maintain a consistent height even if the maximum y-axis value changes over time. The darkest regions represent the highest values. A new value that would fall above the graph’s preexisting upper limit is represented in a darker shade and is plotted within the graph’s existing height.

Instead of increasing the height of the graph as values rise, a horizon graph applies darker shades to higher values, allowing it to plot a dynamic range of y-axis values in the same vertical space.
A simple horizon graph shows higher values in darker colors.
Instead of increasing the height of the graph as values rise, a horizon graph applies darker shades to higher values, allowing it to plot a dynamic range of y-axis values in the same vertical space.

The Hawtio frontend makes HTTP calls to a Jolokia server that’s included in your ActiveMQ installation. Jolokia’s role is to serve JMX data via REST endpoints. The Hawtio UI sends requests and receives JSON responses over HTTP, which could make it easier to use in your environment, since HTTP ports are likely already in use and not blocked by a firewall.

Hawtio, JConsole, and the ActiveMQ Web Console are GUI-based tools that don’t allow you to programmatically fetch ActiveMQ metrics. For a more thorough approach to monitoring your ActiveMQ setup, you can use tools that allow you to write code to automate your monitoring.

Next, we’ll look at the statistics plugin and the management message API, which allow you to collect metrics by sending and receiving JMS messages.

Statistics plugin (Classic) and management message API (Artemis)

ActiveMQ Classic includes a statistics plugin that uses its native messaging functionality to send metrics. The gateway for communicating with the statistics plugin is a set of destinations created automatically by ActiveMQ. When you send an empty message to a statistics destination, ActiveMQ will respond by sending broker or destination metrics in a JMS message to a destination you specify.

For example, to generate a JMS message containing broker metrics, you can send an empty message to the broker statistics destination (named ActiveMQ.Statistics.Broker). To fetch metrics for a destination named MY_DESTINATION, send an empty message to ActiveMQ.Statistics.Destination.MY_DESTINATION. You can also use wildcards in the names of statistics destinations—for example, to generate statistics messages that contain metrics for all destinations, send a message to ActiveMQ.Statistics.Destination.>. See the ActiveMQ documentation for more information about wildcards.

Artemis offers similar functionality in its management message API. You can send a message to the server’s management address identifying a resource (i.e., a broker, address, or queue), along with the desired metric and a reply-to address, and ActiveMQ will return the value of the metric.

To automate your ActiveMQ monitoring, you can write a producer to programmatically prompt the statistics plugin or management message API for metrics, and a consumer to receive and process them. You can get started with the sample code that’s included in the statistics plugin documentation or the example in the Artemis source code.

Comprehensive ActiveMQ monitoring

ActiveMQ works in conjunction with other applications (such as producers and consumers) to send and receive messages. The tools covered in this post can provide you with metrics from some of your messaging infrastructure (brokers, destinations, and the JVM) but don’t help you monitor the rest (producers, consumers, and infrastructure). With a complete ActiveMQ monitoring strategy, you can correlate metrics and logs from ActiveMQ with APM and infrastructure metrics from your producers and consumers to identify bottlenecks and troubleshoot performance issues.

Datadog allows you to collect, visualize, and alert on data from more than 1,000 technologies across your messaging infrastructure. Coming up in Part 3 of this series, we’ll look at how Datadog can help you monitor all the pieces of your ActiveMQ setup.

Acknowledgments

We’d like to thank Gary Tully of Red Hat for his technical review of this series.

Source Markdown for this post is available on GitHub. Questions, corrections, additions, etc.? Please let us know.