Apache ActiveMQ is one of the most widely deployed open-source message brokers in the world — running in banks, healthcare systems, and Fortune 500 enterprises that rely on JMS, AMQP, STOMP, MQTT, and OpenWire for critical message delivery. A silent ActiveMQ failure means orders queue up unsent, events stop flowing, and distributed systems start making contradictory decisions. Vigilmon gives you proactive alerting across the Web Console, Jolokia management API, STOMP port, SSL certificates, and scheduled message delivery.
What You'll Set Up
- HTTP monitor for the ActiveMQ Web Console (port 8161)
- HTTP monitor for the Jolokia broker health endpoint
- TCP port monitor for the STOMP protocol port (61613)
- SSL certificate alerts for HTTPS-secured broker connections
- Heartbeat monitor for ActiveMQ scheduled message delivery verification
Prerequisites
- Apache ActiveMQ 5.17+ running on a Linux or Windows host
- Web Console enabled (default on standard ActiveMQ installations)
- Jolokia REST API accessible (bundled with ActiveMQ Classic 5.x)
- A free Vigilmon account
Step 1: Monitor the ActiveMQ Web Console
The ActiveMQ Web Console runs on port 8161 and provides a management interface for queues, topics, connections, and broker statistics. Its availability is a reliable proxy for overall broker health.
- Log in to vigilmon.online and click Add Monitor.
- Set Type to
HTTP / HTTPS. - Enter
http://your-activemq-host:8161/admin/. - Set Check interval to
1 minute. - Set Expected HTTP status to
200(or401if authentication is enabled — the 401 still proves the server is up). - Click Save.
The Web Console requires credentials by default. If you want a 200 response without exposing credentials in the monitor URL, configure a public status page in conf/jetty.xml:
<!-- Add a no-auth context for the health path -->
<bean class="org.eclipse.jetty.servlet.ServletContextHandler">
<property name="contextPath" value="/status" />
<property name="resourceBase" value="${activemq.home}/webapps/status" />
</bean>
Alternatively, use the Jolokia endpoint (Step 2) which can be opened without the full Web Console credential requirement.
Step 2: Monitor the Jolokia Broker Health Endpoint
ActiveMQ Classic bundles the Jolokia JMX-over-HTTP bridge. The broker MBean exposes queue counts, connection stats, and broker state — readable with a single HTTP GET.
http://your-activemq-host:8161/api/jolokia/read/org.apache.activemq:type=Broker,brokerName=localhost/BrokerName
A healthy response looks like:
{
"request": {"type": "read", "mbean": "org.apache.activemq:type=Broker,brokerName=localhost", "attribute": "BrokerName"},
"value": "localhost",
"timestamp": 1720000000,
"status": 200
}
Add the Vigilmon monitor:
- Click Add Monitor → HTTP / HTTPS.
- Enter the Jolokia URL above (replace
localhostwith your broker name if different). - Set Expected HTTP status to
200. - Optionally set Expected response body contains to
"status":200for deeper verification. - Set Check interval to
1 minute. - Click Save.
To check overall broker health rather than a single attribute, use the broker uptime attribute:
http://your-activemq-host:8161/api/jolokia/read/org.apache.activemq:type=Broker,brokerName=localhost/Uptime
A non-zero value means the broker has been running and hasn't restarted since the check.
Step 3: Monitor the STOMP Port
STOMP (Simple Text Oriented Messaging Protocol) is widely used by Python, Ruby, and JavaScript clients. Monitoring the TCP port confirms that non-JMS clients can reach the broker.
- Click Add Monitor → TCP Port.
- Enter your ActiveMQ host IP and port
61613. - Set Check interval to
1 minute. - Click Save.
ActiveMQ opens several protocol ports by default:
| Port | Protocol | |------|----------| | 61616 | OpenWire (JMS) | | 5672 | AMQP | | 61613 | STOMP | | 1883 | MQTT | | 61614 | WS (WebSocket) |
Add TCP monitors for whichever protocols your applications depend on. Each protocol port is an independent failure point.
Step 4: SSL Certificate Alerts for HTTPS-Secured Broker Connections
If your Web Console or broker transport connectors use TLS, an expired certificate silently breaks all producer/consumer connections.
For the Web Console HTTPS endpoint:
- Change your Web Console monitor URL to
https://your-activemq-host:8443/admin/. - Enable Monitor SSL certificate in the monitor settings.
- Set Alert when certificate expires in less than
21 days. - Click Save.
To check the certificate the Web Console is using:
openssl s_client -connect your-activemq-host:8443 </dev/null 2>/dev/null \
| openssl x509 -noout -dates
# notBefore=Jan 1 00:00:00 2025 GMT
# notAfter=Jan 1 00:00:00 2026 GMT
For transport connectors (OpenWire over SSL on port 61617), add a second SSL monitor:
openssl s_client -connect your-activemq-host:61617 </dev/null 2>/dev/null \
| openssl x509 -noout -dates
ActiveMQ uses Java keystores. To check certificate expiry in the keystore directly:
keytool -list -v -keystore /opt/activemq/conf/broker.ks \
-storepass changeit | grep "Valid from"
Step 5: Heartbeat Monitoring for Scheduled Message Delivery
ActiveMQ supports scheduled messages via the SchedulerBroker plugin. If the scheduler thread stalls or the activemq-data/scheduler store becomes corrupt, scheduled messages silently stop firing — a failure mode that basic HTTP and TCP monitors miss entirely.
- In Vigilmon, click Add Monitor → Cron Heartbeat.
- Set the expected ping interval to
10 minutes. - Copy the heartbeat URL (e.g.
https://vigilmon.online/heartbeat/abc123).
Write a minimal Java client that sends a scheduled message and verifies delivery, or use ActiveMQ's own advisory messages with a Python script:
#!/usr/bin/env python3
# activemq_heartbeat.py
import stomp
import time
import requests
import sys
HEARTBEAT_URL = "https://vigilmon.online/heartbeat/abc123"
HOST = "localhost"
PORT = 61613
QUEUE = "/queue/vigilmon.health"
received = []
class HeartbeatListener(stomp.ConnectionListener):
def on_message(self, frame):
received.append(frame.body)
conn = stomp.Connection([(HOST, PORT)])
conn.set_listener('', HeartbeatListener())
conn.connect('admin', 'admin', wait=True)
conn.subscribe(destination=QUEUE, id=1, ack='auto')
# Send a test message
conn.send(body='ping', destination=QUEUE)
# Wait up to 5 seconds for delivery
deadline = time.time() + 5
while time.time() < deadline and not received:
time.sleep(0.1)
conn.disconnect()
if not received:
print("ERROR: message not delivered", file=sys.stderr)
sys.exit(1)
# Message delivered — signal Vigilmon
requests.get(HEARTBEAT_URL, timeout=10)
print("OK: message delivered and heartbeat sent")
Schedule it every 10 minutes:
crontab -e
# Add:
*/10 * * * * /usr/bin/python3 /usr/local/bin/activemq_heartbeat.py >> /var/log/activemq-heartbeat.log 2>&1
If the broker is down, the STOMP connection fails. If the scheduler stalls, the message never arrives. Either way, the heartbeat ping is never sent and Vigilmon fires an alert.
Summary
| Monitor | Type | Target | Interval | |---|---|---|---| | Web Console | HTTP | host:8161/admin/ | 1 min | | Jolokia broker health | HTTP | host:8161/api/jolokia/... | 1 min | | STOMP port | TCP Port | host:61613 | 1 min | | SSL certificate | SSL | host:8443 | 1 day | | Scheduled delivery | Heartbeat | /heartbeat/abc123 | 10 min |
Five monitors cover the ActiveMQ management plane, protocol ports, TLS hygiene, and message delivery correctness. When the broker degrades in any of these dimensions, Vigilmon alerts you before your application team starts filing tickets.
Set up your free Vigilmon account at vigilmon.online and have ActiveMQ monitoring live in under 10 minutes.