This HiveMQ Extension allows HiveMQ to report its metrics to AWS CloudWatch.
It is possible to send every HiveMQ metric to CloudWatch. Every metric which should be reported must be configured explicitly to reduce the costs, since CloudWatch can be expensive if you publish too much (unnecessary) data.
Caution
|
AWS CloudWatch costs
AWS CloudWatch metrics can be very expensive. So please make sure you really want to report the specified metrics. You can find the full AWS pricing here. At the time of writing the AWS prices are the following:
|
-
Download the extension from the HiveMQ Marketplace.
-
Copy the content of the zip file to the
extensions
folder of your HiveMQ nodes. -
Modify the
extension-config.xml
file for your needs.
The CloudWatch extension uses its own configuration file 'extension-config.xml'.
The following properties are available:
Property | Description |
---|---|
report-interval |
A value in minutes which sets the reporting interval (defaults to 1 minute) |
api-timeout |
The api call and api attempt timeout in ms (if not set defaults to AWS SDK default) |
metric enabled="{true/false}" |
a metric name (from a list of metrics) which should be reported to CloudWatch |
report-raw-count-value |
Report the raw value of count metrics instead of only reporting metric value changes. The default is false. |
zero-values-submission |
If enabled, the extension also POSTs zero value metric updates to CloudWatch. Otherwise, the reporter does not POST zero values in order to save costs. The default is false. |
cloudwatch-endpoint-override |
Override the default cloudWatch endpoint where this extension pushes the metrics. |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<cloudwatch-extension-configuration>
<report-interval>1</report-interval>
<metrics>
<metric>com.hivemq.messages.incoming.total.count</metric>
<metric>com.hivemq.messages.outgoing.total.count</metric>
<metric enabled="false">com.hivemq.messages.incoming.total.rate</metric>
</metrics>
</cloudwatch-extension-configuration>
A list of all available metrics can be found on the HiveMQ Documentation here at HiveMQ Metrics
The extension needs permission to be able to publish metrics to AWS CloudWatch. Simply create an AWS IAM Role with a custom Policy that grants the CloudWatch:PutMetricData Permission and apply it to the HiveMQ instance.
If you want to contribute to HiveMQ AWS CloudWatch Extension, see the contribution guidelines.
HiveMQ AWS CloudWatch Extension is licensed under the APACHE LICENSE, VERSION 2.0
.
A copy of the license can be found here.