Amazon CloudWatch Metrics

While we are waiting for the above producer to generate a meaningful amount of data points, let’s explore the metrics available in CloudWatch for the AmazonMQ service.

Navigate to the Amazon CloudWatch console. Click on Metrics in the left navigation pane.

CloudWatch Step 2

AmazonMQ publishes metrics for the broker, such as CpuUtilization, HeapUsage, NetworkOut. If you have an HA configuration with a primary and a secondary broker, you will have independent metrics for each instance. For all supported metrics, please see Amazon MQ Developer Guide.

Click on the AmazonMQ namespace (as shown in the above picture) and on Broker Metrics afterwards.

If you have multiple brokers running or already started a broker in the past, enter the name of your current broker in the search field and click enter, to filter the metrics for the workshop broker (primary and secondary).

CloudWatch Step 3

By selecting some of the metrics, e.g. CpuUtilization, you can plot the metric for a given time-frame.

Make sure you selected a relative time interval in Amazon CloudWatch, e.g. last 2 hours.

CloudWatch Step 4

AmazonMQ also publishes metrics for the Topics such as MemoryUsage, EnqueueCount (messages published by producers), DispatchCount (message delivered to consumers).

Go back to the AmazonMQ namespace by clicking on AmazonMQ. Click on AmazonMQ > Topic Metrics by Broker to navigate to the topic metrics. In the filter put the name of the topic you want to monitor, for example topicA.

CloudWatch Step 5

AmazonMQ also publishes metrics for the Queues. Go back to the AmazonMQ namespace by clicking on AmazonMQ. Click on AmazonMQ > Queue Metrics by Broker to navigate to the queue metrics. You can use the filter to narrow the list of queues that are listed to select the one of interest, for example queueA.

CloudWatch Step 6