Documentation Index
Fetch the complete documentation index at: https://mintlify.com/hivemq/hivemq-community-edition/llms.txt
Use this file to discover all available pages before exploring further.
Monitoring
HiveMQ Community Edition provides comprehensive monitoring capabilities through JMX (Java Management Extensions) and the Dropwizard Metrics library. This allows you to track broker performance, resource usage, and operational health in real-time.JMX Monitoring
Enabling JMX
JMX reporting is enabled by default in HiveMQ. The JMX reporter exposes all metrics through the JMX interface, allowing monitoring tools like JConsole, VisualVM, or commercial APM solutions to connect and retrieve metrics. Default JMX Configuration:- Port: 9010
- Authentication: Disabled (for development)
- SSL: Disabled (for development)
- Local Only: False (accessible remotely)
JMX Configuration via Environment Variables
You can configure JMX behavior using environment variables:JMX Object Names
HiveMQ uses the legacy Dropwizard Metrics object name format for backward compatibility:metrics:name=com.hivemq.messages.incoming.total.countmetrics:name=com.hivemq.networking.connections.current
Connecting to JMX
Using JConsole:- Add JMX Connection
- Host:
localhost - Port:
9010 - No authentication required (default setup)
Metrics Registry
HiveMQ uses the Dropwizard Metrics library (Codahale Metrics) to collect and expose metrics. All metrics are registered in a centralMetricRegistry that can be accessed via JMX or programmatically through extensions.
Metric Types
HiveMQ uses two primary metric types:- Counters: Track cumulative counts of events (e.g., total messages received)
- Gauges: Provide current snapshot values (e.g., current number of connections)
Monitoring Best Practices
Key Metrics to Monitor
Prioritize monitoring these critical metrics:-
Connection Metrics
- Current connections
- Connection rate
- Closed connections
-
Message Metrics
- Message throughput (incoming/outgoing)
- Dropped messages
- Queued messages
-
Resource Metrics
- Memory usage (heap and persistence)
- Network I/O (bytes read/written)
- JVM statistics
-
Session Metrics
- Active sessions
- Subscriptions
- Retained messages
Alerting Thresholds
Set up alerts for:- High message drop rates
- Memory persistence approaching limits
- Connection failures or spikes
- Non-writable connections (backpressure)
Integration with Monitoring Tools
HiveMQ metrics can be integrated with:- Prometheus (via JMX Exporter)
- Grafana (for visualization)
- Datadog, New Relic, AppDynamics (via JMX)
- Nagios, Zabbix (via JMX checks)
Diagnostic Mode
For troubleshooting, HiveMQ can be started in diagnostic mode which provides enhanced logging and monitoring capabilities. See the Diagnostics page for details.See Also
- Metrics Reference - Complete list of available metrics
- Logging Configuration - Configure logging levels and output
- Diagnostics - Troubleshooting tools and diagnostic mode