Monitoring Amazon MQ

The Amazon MQ sensor is automatically deployed and installed after you install the Instana agent.

Learn about the other supported AWS services with AWS documentation.

Sensor (Data Collection)

Metrics collection is supported for ActiveMQ and RabbitMQ engine types.

Tracked Configuration

The following broker details are available regardless of the used engines.

Broker Details
Name
ARN
State
Created At
Engine Type
Engine Version
Instance Type
Deployment
Public Accessibility
AWS Region

Metrics

ActiveMQ metrics

Broker Metrics Description
CpuCreditBalance The number of earned CPU credits that an instance accrued since it was started or started (including the number of launch credits)
CpuUtilization The percentage of allocated EC2 compute units that the broker currently uses.
CurrentConnectionsCount The current number of active connections on the current broker.
JournalFilesForFastRecovery The number of journal files that will be replayed after a clean shutdown.
JournalFilesForFullRecovery The number of journal files that will be replayed after an unclean shutdown.
HeapUsage The percentage of the ActiveMQ JVM memory limit that the broker currently uses.
NetworkIn The volume of incoming traffic for the broker.
NetworkOut The volume of outgoing traffic for the broker.
OpenTransactionsCount The total number of transactions in progress.
StorePercentUsage The percent used by the storage limit. If it reaches 100, the broker refuses messages.
TotalConsumerCount The number of message consumers that are subscribed to destinations on the current broker.
TotalMessageCount The number of messages stored on the broker.
TotalProducerCount The number of message producers active on destinations on the current broker.
Destination Metrics Description
ConsumerCount The number of consumers that are subscribed to the destination.
EnqueueCount The number of messages that are sent to the destination.
EnqueueTime The amount of time it takes the broker to accept a message from the producer and send it to the destination.
ExpiredCount The number of messages that could not be delivered because they expired.
DispatchCount The number of messages that are sent to consumers.
DequeueCount The number of messages acknowledged by consumers.
MemoryUsage The percentage of the memory limit that the destination currently uses.
ProducerCount The number of producers for the destination.
QueueSize The number of messages in the queue. (This metric applies only to queues.)

RabbitMQ metrics

Broker Metrics Description
ConnectionCount The total number of connections that are established on the broker.
ConsumerCount The total number of consumers that are connected to the broker.
MessageCount The total number of messages in the queues.
MessagesRate Number of total messages per second in the queues.
MessageReadyCount The total number of ready messages in the queues.
MessagesReadyRate Number of messages per second that are ready to be delivered to clients.
MessageUnacknowledgedCount The total number of unacknowledged messages in the queues.
MessageUnacknowledgedRate Number of messages per second that are delivered to clients but not yet acknowledged.
PublishRate The rate at which messages are published to the broker.
ConfirmRate The rate at which the RabbitMQ server is confirming published messages.
AckRate The rate at which messages are being acknowledged by consumers.
Node Metrics Description
SystemCpuUtilization The percentage of allocated Amazon EC2 compute units that the broker currently uses.
MemoryLimit The RAM limit for a RabbitMQ node.
MemoryUsed The volume of RAM used by a RabbitMQ node.
DiskFreeLimit The disk limit for a RabbitMQ node.
DiskFree The total volume of free disk space that is available in a RabbitMQ node.
FileDescriptorsUsed Number of file descriptors that are used.

If the deployment type of the RabbitMQ broker is CLUSTER_MULTI_AZ, in rare cases you might see that more than three nodes are listed in the RabbitMQ dashboard. This can happen when the CLUSTER_MULTI_AZ broker is deleted, created with the same name, and then discovered by the agent in the span of a few hours. This issue is due to the CloudWatch retaining metrics even after the resource has been deleted. To solve the issue, you can reboot the agent.{: note}

Queue Metrics Description
ConsumerCount The number of consumers that are subscribed to the queue.
MessageReadyCount The number of messages that are currently available to be delivered.
MessageUnacknowledgedCount The number of messages for which the server is awaiting acknowledgement.
MessageCount The total number of MessageReadyCount and MessageUnacknowledgedCount (also known as queue depth).

Required Permissions

  • cloudwatch:GetMetricData
  • cloudwatch:GetMetricStatistics
  • mq:ListBrokers
  • mq:DescribeBroker

Configuration

Metrics for Amazon MQ are pulled every 5 minutes, which can be changed through agent configuration (<agent_install_dir>/etc/instana/configuration.yaml):

com.instana.plugin.aws.mq:
  cloudwatch_period: 300

To disable monitoring of MQ instances, use the following configuration:

com.instana.plugin.aws.mq:
  enabled: false

ActiveMQ configuration

To enable in-depth metric monitoring of the ActiveMQ brokers, you need to inform the host agent about the queues, or topics that you want to monitor for every broker. You can configure it in the agent configuration file <agent_install_dir>/etc/instana/configuration.yaml as follows:

com.instana.plugin.aws.mq:
  PLACEHOLDER_ACTIVE_MQ_BROKER_NAME: # replace PLACEHOLDER_ACTIVE_MQ_BROKER_NAME with your ActiveMQ broker name
    queues: # max 165 queues
      - 'queue1'
      - 'queue2'
    topics: # max 165 topics
      - 'topic1'

RabbitMQ configuration

To enable in-depth metric monitoring of the RabbitMQ brokers, you need to inform the host agent about the queues that you want to monitor for every broker (up to 700 queues). You can configure it in the agent configuration file <agent_install_dir>/etc/instana/configuration.yaml as follows:

com.instana.plugin.aws.mq:
  PLACEHOLDER_RABBIT_MQ_BROKER_NAME: # replace PLACEHOLDER_RABBIT_MQ_BROKER_NAME with your RabbitMQ broker name
    queuesRegex: '.*' # Regex pattern used for matching monitored queues
    monitorQueues:
    - queue: 'queue1' # name of the queue
      vhost: '/' # name of the vhost, default is '/'
    - queue: 'queue2' # name of the queue
      vhost: '/' # name of the vhost, default is '/'

Proxy configuration

To configure the specific AWS Sensor to use proxy configuration, add the following agent configuration settings:

com.instana.plugin.aws.mq:
  proxy_host: 'example.com' # proxy host name or ip address
  proxy_port: 3128 # proxy port
  proxy_protocol: 'HTTP' # proxy protocol: HTTP or HTTPS
  proxy_username: 'username' # OPTIONAL: proxy username
  proxy_password: 'password' # OPTIONAL: proxy password

Monitoring multiple AWS accounts

Refer to the Monitoring multiple AWS accounts documentation to set up monitoring of multiple AWS accounts with one AWS agent in the same region.

AWS named profiles approach

To override the profiles that are used to monitor MQ, use the following configuration:

com.instana.plugin.aws.mq:
  profile_names:
    - 'profile2'
    - 'profile3'

Defining profiles on service level overrides the global AWS profiles configuration.

AWS STS approach

To override the IAM Roles that are used to monitor MQ, use the following configuration:

com.instana.plugin.aws.mq:
  role_arns:
    - 'arn:aws:iam::<account_1_id>:role/<role_1_name>'
    - 'arn:aws:iam::<account_2_id>:role/<role_2_name>'

Defining IAM roles on service level overrides the global AWS IAM roles configuration.

Filtering

Multiple tags can be defined, separated by a comma. Tags are provided as a key-value pair separated by: To make configuration easier, it is possible to define which tags you want to include in discovery or exclude from discovery. In case of defining tag in both lists (include and exclude), exclude list has higher priority. If there is no need for filtering services, the configuration should not be defined. It’s not mandatory to define all values to enable filtering.

Users are able to specify how often sensors poll the AWS tagged resources that use the tagged-services-poll-rate configuration property (default 300 seconds).

Tags are only available with the AWS Agent.

To define how often sensors poll the tagged resources use following configuration:

com.instana.plugin.aws:
  tagged-services-poll-rate: 60 #default 300

To include services by tags into discovery, use following configuration:

com.instana.plugin.aws.mq:
  include_tags: # Comma separated list of tags in key:value format (e.g. env:prod,env:staging)

To exclude services by tags from discovery use following configuration:

com.instana.plugin.aws.mq:
  exclude_tags: # Comma separated list of tags in key:value format (e.g. env:dev,env:test)

AWS services without tags are monitored by default but can be excluded by setting the include_untagged field to false:

com.instana.plugin.aws.mq:
  include_untagged: false # True value by default

Instana Agent Tags

Note that tags are only available with the AWS Agent. More details on using tags are described here.