Skip to content
23 changes: 18 additions & 5 deletions packages/aws_mq/_dev/build/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ The Amazon MQ integration allows you to efficiently collect and monitor broker p

## Compatibility

This integration presently supports Amazon MQ for [Apache ActiveMQ](http://activemq.apache.org/) metrics.
This integration presently supports Amazon MQ for [Apache ActiveMQ](http://activemq.apache.org/) and [RabbitMQ](https://www.rabbitmq.com/) metrics.

## Data streams

The Amazon MQ integration collects Apache ActiveMQ metrics.
The Amazon MQ integration collects Apache ActiveMQ and RabbitMQ metrics.


Data streams:
- `activemq_metrics`: Collects broker metrics and destination (queue and topic) metrics.
- `rabbitmq_metrics`: Collects broker, queue and node metrics.


## Requirements
Expand Down Expand Up @@ -48,9 +49,9 @@ documentation](https://docs.elastic.co/integrations/aws#requirements).

## Metrics

### ActiveMQ Metrics
### ActiveMQ metrics

Amazon MQ provides a range of broker and queue metrics that help monitor system performance, resource utilization, and message flow. These metrics can be used for various use cases, including:
Amazon MQ for ActiveMQ provides a range of broker and queue metrics that help monitor system performance, resource utilization, and message flow. These metrics can be used for various use cases, including:

- Tracking broker resource utilization, such as compute, memory, and storage.
- Monitoring message throughput and queue performance.
Expand All @@ -65,4 +66,16 @@ The following metrics are related to [Amazon MQ quotas](https://docs.aws.amazon.
- WsMaximumConnections

{{event "activemq_metrics"}}
{{fields "activemq_metrics"}}
{{fields "activemq_metrics"}}


### RabbitMQ metrics

Amazon MQ for RabbitMQ offers a variety of broker and queue metrics to monitor system performance, resource utilization, and message flow. These metrics are essential for:

- Assessing broker resource usage, including CPU, memory, and storage.
- Tracking message rates and queue depths to ensure efficient message processing.
- Analyzing connection counts and consumer activity to optimize messaging workloads.

{{event "rabbitmq_metrics"}}
{{fields "rabbitmq_metrics"}}
5 changes: 5 additions & 0 deletions packages/aws_mq/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
- version: "0.3.0"
changes:
- description: Add rabbitmq_metrics dataset for RabbitMQ metrics.
type: enhancement
link: https://github.com/elastic/integrations/pull/12924
- version: "0.2.0"
changes:
- description: Add ActiveMQ overview dashboard.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
metricsets: ["cloudwatch"]
period: {{period}}
{{#if data_granularity}}
data_granularity: {{data_granularity}}
{{/if}}
{{#if include_linked_accounts}}
include_linked_accounts: {{include_linked_accounts}}
{{#if owning_account}}
owning_account: "{{owning_account}}"
{{/if}}
{{/if}}
{{#if access_key_id}}
access_key_id: {{access_key_id}}
{{/if}}
{{#if secret_access_key}}
secret_access_key: {{secret_access_key}}
{{/if}}
{{#if session_token}}
session_token: {{session_token}}
{{/if}}
{{#if credential_profile_name}}
credential_profile_name: {{credential_profile_name}}
{{/if}}
{{#if shared_credential_file}}
shared_credential_file: {{shared_credential_file}}
{{/if}}
{{#if role_arn}}
role_arn: {{role_arn}}
{{/if}}
{{#if default_region}}
default_region: {{default_region}}
{{/if}}
{{#if regions}}
regions:
{{#each regions as |region|}}
- {{region}}
{{/each}}
{{/if}}
{{#if latency}}
latency: {{latency}}
{{/if}}
{{#if tags_filter}}
tags_filter: {{tags_filter}}
{{/if}}
{{#if proxy_url }}
proxy_url: {{proxy_url}}
{{/if}}
{{#if processors}}
processors:
{{processors}}
{{/if}}
metrics:
- namespace: AWS/AmazonMQ
statistic: ["Maximum"]
name:
- ExchangeCount
- QueueCount
- ConnectionCount
- ChannelCount
- ConsumerCount
- MessageCount
- MessageReadyCount
- MessageUnacknowledgedCount
- PublishRate
- ConfirmRate
- AckRate
- SystemCpuUtilization
- RabbitMQMemLimit
- RabbitMQMemUsed
- RabbitMQDiskFreeLimit
- RabbitMQFdUsed
- RabbitMQIOReadAverageTime
- RabbitMQIOWriteAverageTime
- namespace: AWS/AmazonMQ
statistic: ["Minimum"]
name:
- RabbitMQDiskFree
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
description: Pipeline of RabbitMQ metrics
processors:
- dot_expander:
field: "*"
ignore_failure: true
- drop:
description: "To drop the documents having RabbitMQ metrics"
if: >
ctx.aws?.amazonmq?.metrics?.size() == 1 &&
ctx.aws.amazonmq.metrics.ConsumerCount?.max != null
ignore_failure: true
- rename:
field: "aws.amazonmq.metrics"
target_field: "aws.amazonmq.metrics.rabbitmq.broker"
ignore_missing: true
if: >
ctx.aws?.dimensions?.Broker != null &&
(ctx.aws?.dimensions?.Node == null && ctx.aws?.dimensions?.Queue == null )
- rename:
field: "aws.amazonmq.metrics"
target_field: "aws.amazonmq.metrics.rabbitmq.node"
ignore_missing: true
if: >
ctx.aws?.dimensions?.Broker != null &&
(ctx.aws?.dimensions?.Node != null )
- rename:
field: "aws.amazonmq.metrics"
target_field: "aws.amazonmq.metrics.rabbitmq.queue"
ignore_missing: true
if: >
ctx.aws?.dimensions?.Broker != null &&
(ctx.aws?.dimensions?.Queue != null )

on_failure:
- set:
field: event.kind
value: pipeline_error
- append:
field: tags
value: preserve_original_event
allow_duplicates: false
- set:
field: error.message
value: 'Processor {{{_ingest.on_failure_processor_type}}} with tag {{{_ingest.on_failure_processor_tag}}} in pipeline {{{_ingest.pipeline}}} failed with message: {{{_ingest.on_failure_message}}}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
- name: data_stream.type
type: constant_keyword
description: Data stream type.
- name: data_stream.dataset
type: constant_keyword
description: Data stream dataset.
- name: data_stream.namespace
type: constant_keyword
description: Data stream namespace.
- name: '@timestamp'
type: date
description: Event timestamp.
- name: event.module
type: constant_keyword
external: ecs
value: aws
9 changes: 9 additions & 0 deletions packages/aws_mq/data_stream/rabbitmq_metrics/fields/ecs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- external: ecs
name: cloud.account.id
dimension: true
- external: ecs
name: cloud.region
dimension: true
- name: agent.id
external: ecs
dimension: true
176 changes: 176 additions & 0 deletions packages/aws_mq/data_stream/rabbitmq_metrics/fields/fields.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
- name: aws
type: group
fields:
- name: dimensions
type: group
fields:
- name: Broker
description: The name of the broker.
type: keyword
dimension: true
- name: Node
description: The name of the node.
type: keyword
dimension: true
- name: Queue
description: The name of the queue.
type: keyword
dimension: true
- name: VirtualHost
description: The name of the virtual host.
type: keyword
dimension: true
- name: cloudwatch.namespace
type: keyword
description: The namespace specified when query cloudwatch api.
- name: amazonmq.metrics.rabbitmq
type: group
fields:
- name: broker
type: group
fields:
- name: ExchangeCount.max
metric_type: gauge
type: long
description: The total number of exchanges configured on the broker.
- name: QueueCount.max
metric_type: gauge
type: long
description: The total number of queues configured on the broker.
- name: ConnectionCount.max
metric_type: gauge
type: long
description: The total number of connections established on the broker.
- name: ChannelCount.max
metric_type: gauge
type: long
description: The total number of channels established on the broker.
- name: ConsumerCount.max
metric_type: gauge
type: long
description: The total number of consumers connected to the broker.
- name: MessageCount.max
metric_type: gauge
type: long
description: The total number of messages in the queues.
- name: MessageReadyCount.max
metric_type: gauge
type: long
description: The total number of ready messages in the queues.
- name: MessageUnacknowledgedCount.max
metric_type: gauge
type: long
description: The total number of unacknowledged messages in the queues.
- name: PublishRate.max
metric_type: gauge
type: long
description: The rate at which messages are published to the broker.
- name: ConfirmRate.max
metric_type: gauge
type: long
description: The rate at which the RabbitMQ server is confirming published messages.
- name: AckRate.max
metric_type: gauge
type: long
description: The rate at which messages are being acknowledged by consumers.
- name: SystemCpuUtilization.max
metric_type: gauge
type: long
unit: percent
description: The percentage of allocated Amazon EC2 compute units that the broker currently uses. For cluster deployments, this value represents the aggregate of all three RabbitMQ nodes' corresponding metric values.
- name: RabbitMQMemLimit.max
metric_type: gauge
type: long
unit: byte
description: The RAM limit for a RabbitMQ broker. For cluster deployments, this value represents the aggregate of all RabbitMQ nodes' corresponding metric values.
- name: RabbitMQMemUsed.max
metric_type: gauge
type: long
unit: byte
description: The volume of RAM used by a RabbitMQ broker. For cluster deployments, this value represents the aggregate of all RabbitMQ nodes' corresponding metric values.
- name: RabbitMQDiskFreeLimit.max
metric_type: gauge
type: long
unit: byte
description: The disk limit for a RabbitMQ broker. For cluster deployments, this value represents the aggregate of all RabbitMQ nodes' corresponding metric values.
- name: RabbitMQDiskFree.min
metric_type: gauge
type: long
unit: byte
description: The total volume of free disk space available in a RabbitMQ broker. For cluster deployments, this value represents the aggregate of all RabbitMQ nodes' corresponding metric values.
- name: RabbitMQFdUsed.max
metric_type: gauge
type: long
description: The number of file descriptors used. For cluster deployments, this value represents the aggregate of all RabbitMQ nodes' corresponding metric values.
- name: RabbitMQIOReadAverageTime.max
metric_type: gauge
type: long
unit: ms
description: The average time for RabbitMQ to perform one read operation.
- name: RabbitMQIOWriteAverageTime.max
metric_type: gauge
type: long
unit: ms
description: The average time for RabbitMQ to perform one write operation.
- name: node
type: group
fields:
- name: SystemCpuUtilization.max
metric_type: gauge
type: long
unit: percent
description: The percentage of allocated Amazon EC2 compute units that the broker currently uses.
- name: RabbitMQMemLimit.max
metric_type: gauge
type: long
unit: byte
description: The RAM limit for a RabbitMQ node.
- name: RabbitMQMemUsed.max
metric_type: gauge
type: long
unit: byte
description: The volume of RAM used by a RabbitMQ node.
- name: RabbitMQDiskFreeLimit.max
metric_type: gauge
type: long
unit: byte
description: The disk limit for a RabbitMQ node.
- name: RabbitMQDiskFree.min
metric_type: gauge
type: long
unit: byte
description: The total volume of free disk space available in a RabbitMQ node.
- name: RabbitMQFdUsed.max
metric_type: gauge
type: long
unit: byte
description: Number of file descriptors used.
- name: RabbitMQIOReadAverageTime.max
metric_type: gauge
type: long
unit: ms
description: The average time for RabbitMQ to perform one read operation.
- name: RabbitMQIOWriteAverageTime.max
metric_type: gauge
type: long
unit: ms
description: The average time for RabbitMQ to perform one write operation.
- name: queue
type: group
fields:
- name: ConsumerCount.max
metric_type: gauge
type: long
description: The number of consumers subscribed to the queue.
- name: MessageReadyCount.max
metric_type: gauge
type: long
description: The number of messages that are currently available to be delivered.
- name: MessageUnacknowledgedCount.max
metric_type: gauge
type: long
description: The number of messages for which the server is awaiting acknowledgement.
- name: MessageCount.max
metric_type: gauge
type: long
description: The total number of MessageReadyCount and MessageUnacknowledgedCount, referred to as queue depth.
Loading