Skip to main content

AWS Amazon MQ Monitoring - ActiveMQ & RabbitMQ Metrics via CloudWatch

Overview

This guide covers collecting Amazon MQ broker and queue metrics (connection counts, message counts, CPU, and memory) via CloudWatch Metrics Stream, plus broker logs. We recommend CloudWatch Metrics Stream over Prometheus exporters: it needs no per-broker exporter and delivers metrics to Scout in 3-5 minutes end-to-end.

What You'll Monitor

Amazon MQ monitoring combines CloudWatch broker metrics with optional RabbitMQ receiver metrics for node-level internals:

CloudWatch Metrics Stream (AWS/AmazonMQ):

MetricEngineWhat it tells you
CpuUtilizationBothBroker instance CPU usage (%)
HeapUsageActiveMQJVM heap used (%)
RabbitMQMemUsed / RabbitMQMemLimitRabbitMQMemory used vs the high-watermark limit
RabbitMQDiskFree / RabbitMQDiskFreeLimitRabbitMQFree disk vs the low-watermark limit
RabbitMQFdUsedRabbitMQFile descriptors in use
StorePercentUsageActiveMQPercent of the message store consumed
MemoryPercentUsage / TempPercentUsageActiveMQPercent of memory / temp store used
ConsumerCount / ProducerCountBothConsumers / producers attached to a queue
MessageCount / QueueSizeBothMessages currently held in a queue
MessageReadyCountRabbitMQMessages ready for delivery (backlog)
MessageUnacknowledgedCountRabbitMQDelivered but not yet acknowledged
EnqueueCount / DequeueCountActiveMQMessages published / consumed per period
CurrentConnectionsCountBothOpen client connections to the broker
NetworkIn / NetworkOutBothNetwork throughput (bytes)

OTel RabbitMQ receiver (node internals, RabbitMQ only):

MetricWhat it tells you
rabbitmq.node.mem_used / rabbitmq.node.mem_limitNode memory used vs its limit
rabbitmq.node.mem_alarmWhether the memory alarm has tripped
rabbitmq.node.disk_free / rabbitmq.node.disk_free_limitNode free disk vs its limit
rabbitmq.node.disk_free_alarmWhether the disk alarm has tripped
rabbitmq.node.fd_used / rabbitmq.node.fd_totalFile descriptors used vs available
rabbitmq.node.sockets_used / rabbitmq.node.sockets_totalSockets used vs available
rabbitmq.node.proc_used / rabbitmq.node.proc_totalErlang processes used vs the limit

Prerequisites

RequirementMinimumRecommended
Amazon MQActiveMQ 5.x or RabbitMQ 3.xRabbitMQ 3.13
OTel Collector Contrib0.90.0latest
base14 ScoutAny-
AWS permissionsCloudWatch, Amazon Data Firehose, S3, CloudWatch Logs-

Before starting:

  • An Amazon MQ broker (ActiveMQ or RabbitMQ) running and serving traffic.
  • CloudWatch Metrics Stream infrastructure set up (see Step 1).
  • For the RabbitMQ receiver: the broker's HTTPS management endpoint reachable from the Collector, plus management-API credentials.

Collecting Amazon MQ Metrics

For collecting Amazon MQ metrics, we recommend using CloudWatch Metrics Stream instead of Prometheus exporters. CloudWatch Metrics Stream provides:

  • Faster delivery: 3-5 minutes end-to-end vs 5+ minutes with polling.
  • Lower cost: No need to run dedicated exporters.
  • Better scalability: Native AWS service integration.
  • Automatic metric discovery: No need to manually configure metric lists.

Step 1: Set up CloudWatch Metrics Stream

Follow our comprehensive CloudWatch Metrics Stream guide to set up the infrastructure.

Step 2: Configure Amazon MQ metrics filtering

When configuring your CloudWatch Metrics Stream in Step 3 of the setup guide, make sure to:

  1. Select specific namespaces instead of "All namespaces"
  2. Choose only AWS/AmazonMQ from the namespace list
  3. This ensures you only collect Amazon MQ metrics, reducing costs and data volume

Step 3: Create OTel Collector config for RabbitMQ metrics (Optional)

If you're using RabbitMQ as your broker engine and need detailed broker-specific metrics, create amazon-mq-metrics-collection-config.yaml. Set RABBITMQ_ENDPOINT to the broker's HTTPS management URL, for example https://b-xxxxx.mq.<region>.amazonaws.com (port 443):

receivers:
rabbitmq:
endpoint: ${env:RABBITMQ_ENDPOINT}
username: ${env:RABBITMQ_USERNAME}
password: ${env:RABBITMQ_PASSWORD}
collection_interval: 10s
metrics:
rabbitmq.node.disk_free:
enabled: true
rabbitmq.node.disk_free_limit:
enabled: true
rabbitmq.node.disk_free_alarm:
enabled: true
rabbitmq.node.mem_used:
enabled: true
rabbitmq.node.mem_limit:
enabled: true
rabbitmq.node.mem_alarm:
enabled: true
rabbitmq.node.fd_used:
enabled: true
rabbitmq.node.fd_total:
enabled: true
rabbitmq.node.sockets_used:
enabled: true
rabbitmq.node.sockets_total:
enabled: true
rabbitmq.node.proc_used:
enabled: true
rabbitmq.node.proc_total:
enabled: true
rabbitmq.node.disk_free_details.rate:
enabled: true
rabbitmq.node.fd_used_details.rate:
enabled: true
rabbitmq.node.mem_used_details.rate:
enabled: true
rabbitmq.node.proc_used_details.rate:
enabled: true
rabbitmq.node.sockets_used_details.rate:
enabled: true

exporters:
otlphttp/b14:
endpoint: ${env:OTEL_EXPORTER_OTLP_ENDPOINT}
tls:
insecure_skip_verify: true

service:
pipelines:
metrics/amazon_mq:
receivers: [rabbitmq]
exporters: [otlphttp/b14]

Note: CloudWatch Metrics Stream will automatically deliver AWS/AmazonMQ metrics (CPU utilization, connection counts, message counts, etc.), while the RabbitMQ receiver collects detailed broker-specific metrics if needed.

Collecting Amazon MQ Logs

The log collection of Amazon MQ requires specifying the list of log group names. From the AWS CloudWatch console, please find the log group(s) relevant to the integration.

Create the Collector config file

receivers:
awscloudwatch/amazon_mq_logs:
region: ${env:AWS_REGION}
logs:
poll_interval: 1m
groups:
named:
# replace with your Amazon MQ log group name
/aws/amazonmq/:

processors:
attributes/add_source_amazon_mq:
actions:
- key: source
value: "amazonMQ"
action: insert
batch:
send_batch_size: 10000
send_batch_max_size: 11000
timeout: 10s

exporters:
otlphttp/b14:
endpoint: ${env:OTEL_EXPORTER_OTLP_ENDPOINT}
tls:
insecure_skip_verify: true

service:
pipelines:
logs/amazonmq:
receivers: [awscloudwatch/amazon_mq_logs]
processors: [attributes/add_source_amazon_mq, batch]
exporters: [otlphttp/b14]

The collector configs above export to Scout through the otlphttp/b14 exporter. Set OTEL_EXPORTER_OTLP_ENDPOINT and the OAuth2 credentials as shown in the Scout exporter guide.

Verify the setup

After deploying, generate traffic on the broker, then confirm telemetry is flowing:

  1. In Scout, check for the CloudWatch metrics, named amazonaws.com/AWS/AmazonMQ/<MetricName> (CPU, connection counts, message counts).
  2. If you enabled the RabbitMQ receiver, check for the rabbitmq.* metrics.
  3. For logs, confirm records appear with source = amazonMQ.

Allow 5-10 minutes for the first metrics to arrive through the stream.

Key alerts to configure

Once telemetry is flowing, set up alerts on the signals that predict broker trouble:

MetricWarningCriticalWhy
MessageReadyCount (RabbitMQ)rising trendsustained growthConsumers are falling behind producers
MessageUnacknowledgedCount (RabbitMQ)> 0 and growingsustainedConsumers receive but fail to acknowledge messages
ConsumerCount on an active queuedropping0Nothing is draining the queue
CpuUtilization> 70%> 85%CPU pressure slows message throughput
RabbitMQMemUsed / HeapUsage> 70%> 85%Memory pressure triggers broker flow control
StorePercentUsage (ActiveMQ)> 70%> 85%A full message store blocks producers
RabbitMQDiskFree (RabbitMQ)near the limitat the limitThe disk alarm blocks all publishing

CloudWatch Metrics Stream adds 3-5 minutes of latency, so treat these as trend and capacity alerts, not sub-minute failure detection.

Troubleshooting

AWS/AmazonMQ metrics not appearing in Scout

Cause: Metrics Stream isn't active or isn't filtered to the Amazon MQ namespace.

Fix:

  1. In CloudWatch > Metrics > Streams, verify the stream is active
  2. Confirm the namespace filter includes AWS/AmazonMQ
  3. Check that Firehose delivery is succeeding (look at the S3 error prefix)
  4. Allow 5-10 minutes for initial metrics to flow

RabbitMQ receiver shows no metrics

Cause: The Collector can't reach the broker's management endpoint.

Fix:

  1. Confirm RABBITMQ_ENDPOINT is the HTTPS management URL (https://b-xxxxx.mq.<region>.amazonaws.com, port 443)
  2. Verify the management-API username and password
  3. Check the broker's security group allows the Collector's IP
  4. Ensure the RabbitMQ management plugin is enabled on the broker

Broker logs not reaching Scout

Cause: Wrong log group name or region.

Fix:

  1. Set the real Amazon MQ log group name under groups.named
  2. Confirm AWS_REGION matches the broker's region
  3. Verify the Collector's IAM role can read CloudWatch Logs
  4. Enable general or audit logging on the broker if the log group is empty

FAQ

How do I monitor AWS Amazon MQ with OpenTelemetry?

Use CloudWatch Metrics Stream for broker metrics (CPU, memory, connections, message counts) and, for RabbitMQ, add the OTel RabbitMQ receiver for node-level internals. Both feed into base14 Scout.

What Amazon MQ metrics does CloudWatch collect?

AWS/AmazonMQ metrics including CpuUtilization, HeapUsage (ActiveMQ), RabbitMQMemUsed and RabbitMQDiskFree (RabbitMQ), ConsumerCount, ProducerCount, MessageCount, MessageReadyCount, and MessageUnacknowledgedCount, plus connection and network metrics.

Should I use CloudWatch Metrics Stream or Prometheus for Amazon MQ?

CloudWatch Metrics Stream is recommended: no per-broker exporter, native AWS integration, and 3-5 minute end-to-end delivery. Add the RabbitMQ receiver only when you need node-level internals.

How do I collect Amazon MQ broker logs with OpenTelemetry?

Use the AWS CloudWatch Logs receiver in the Collector with your Amazon MQ log group name. Enable general or audit logging on the broker first so the group has data.

How do I set up alerts for Amazon MQ?

Route metrics through CloudWatch Metrics Stream to Scout, then alert on rising MessageReadyCount, ConsumerCount dropping to zero, CpuUtilization above 85%, memory or heap above 85%, and StorePercentUsage above 85%.

Can I monitor both RabbitMQ and ActiveMQ with OpenTelemetry?

Yes. CloudWatch Metrics Stream covers both engines. RabbitMQ additionally supports the OTel RabbitMQ receiver for node-level metrics; ActiveMQ internals come from CloudWatch or JMX.

Was this page helpful?