You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/aws_mq/_dev/build/docs/README.md
+28-1
Original file line number
Diff line number
Diff line change
@@ -9,16 +9,35 @@ The Amazon MQ integration allows you to efficiently collect and monitor broker p
9
9
10
10
**IMPORTANT: Extra AWS charges on API requests will be generated by this integration. Check [API Requests](https://www.elastic.co/docs/current/integrations/aws#aws-api-requests) for more details.**
11
11
12
+
## Setup
13
+
14
+
### ActiveMQ
15
+
16
+
To enable the `activemq_general_logs` integration, you must configure your ActiveMQ broker to publish general logs to Amazon CloudWatch Logs. Follow these steps:
17
+
18
+
1.**Assign Necessary Permissions**: Ensure the IAM user creating or managing the broker has the `logs:CreateLogGroup` permission. This allows Amazon MQ to create the required log groups in CloudWatch.
19
+
20
+
2.**Set Up a Resource-Based Policy**: Configure a policy that permits Amazon MQ to publish logs to your CloudWatch log groups. This involves granting `logs:CreateLogStream` and `logs:PutLogEvents` permissions.
21
+
22
+
3.**Enable Logging on the Broker**:
23
+
24
+
- Navigate to the [Amazon MQ console](https://console.aws.amazon.com/amazon-mq/).
25
+
- During broker creation or by editing an existing broker, expand the **Additional settings** section.
26
+
- In the **Logs** section, select the option to publish **General logs** to Amazon CloudWatch Logs.
27
+
28
+
For detailed instructions, refer to the [Amazon MQ Developer Guide](https://docs.aws.amazon.com/amazon-mq/latest/developer-guide/configure-logging-monitoring-activemq.html#security-logging-monitoring-configure-cloudwatch-structure).
29
+
12
30
## Compatibility
13
31
14
32
This integration presently supports Amazon MQ for [Apache ActiveMQ](http://activemq.apache.org/) and [RabbitMQ](https://www.rabbitmq.com/) metrics.
15
33
16
34
## Data streams
17
35
18
-
The Amazon MQ integration collects Apache ActiveMQ and RabbitMQ metrics.
36
+
The Amazon MQ integration collects metrics and logs from Apache ActiveMQ and metrics from RabbitMQ.
19
37
20
38
21
39
Data streams:
40
+
-`activemq_general_logs`: Collects ActiveMQ general logs, including system events, warnings, and errors, which are published to a designated Amazon CloudWatch log group.
22
41
-`activemq_metrics`: Collects broker metrics and destination (queue and topic) metrics.
23
42
-`rabbitmq_metrics`: Collects broker, queue and node metrics.
data to Elastic, where the events will then be processed through the
47
66
integration's ingest pipelines.
48
67
68
+
## Logs
69
+
70
+
### Collecting Amazon MQ ActiveMQ General Logs from CloudWatch
71
+
72
+
When general logging is enabled for your Amazon MQ ActiveMQ broker, it publishes the `activemq.log` file at the default `INFO` logging level to a designated log group. Please note that `DEBUG` logging is not supported.
2025-03-15 13:47:13,382 | WARN | Exception occurred for client ID:b-cfab2617-b6fb-4a44-bd7a-052aa4cd96f4-1-45943-1741903831778-5:7 (tcp://127.0.0.1:63868) processing: STOMP -> java.lang.SecurityException: User name [elastic] or password is invalid. | org.apache.activemq.transport.stomp.ProtocolConverter | ActiveMQ Transport: ssl:///127.0.0.1:63868
2
+
2025-03-15 13:47:13,381 | WARN | Failed to add Connection id=ID:b-cfab2617-b6fb-4a44-bd7a-052aa4cd96f4-1-45943-1741903831778-5:7, clientId=ID:b-cfab2617-b6fb-4a44-bd7a-052aa4cd96f4-1-45943-1741903831778-5:7, clientIP=tcp://127.0.0.1:63868 due to User name [elastic] or password is invalid. | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport: ssl:///127.0.0.1:63868
"original": "2025-03-15 13:47:13,382 | WARN | Exception occurred for client ID:b-cfab2617-b6fb-4a44-bd7a-052aa4cd96f4-1-45943-1741903831778-5:7 (tcp://127.0.0.1:63868) processing: STOMP -> java.lang.SecurityException: User name [elastic] or password is invalid. | org.apache.activemq.transport.stomp.ProtocolConverter | ActiveMQ Transport: ssl:///127.0.0.1:63868",
22
+
"type": [
23
+
"error"
24
+
]
25
+
},
26
+
"log": {
27
+
"level": "WARN"
28
+
},
29
+
"message": "Exception occurred for client ID:b-cfab2617-b6fb-4a44-bd7a-052aa4cd96f4-1-45943-1741903831778-5:7 (tcp://127.0.0.1:63868) processing: STOMP -> java.lang.SecurityException: User name [elastic] or password is invalid.",
"original": "2025-03-15 13:47:13,381 | WARN | Failed to add Connection id=ID:b-cfab2617-b6fb-4a44-bd7a-052aa4cd96f4-1-45943-1741903831778-5:7, clientId=ID:b-cfab2617-b6fb-4a44-bd7a-052aa4cd96f4-1-45943-1741903831778-5:7, clientIP=tcp://127.0.0.1:63868 due to User name [elastic] or password is invalid. | org.apache.activemq.broker.TransportConnection | ActiveMQ Transport: ssl:///127.0.0.1:63868",
54
+
"type": [
55
+
"error"
56
+
]
57
+
},
58
+
"log": {
59
+
"level": "WARN"
60
+
},
61
+
"message": "Failed to add Connection id=ID:b-cfab2617-b6fb-4a44-bd7a-052aa4cd96f4-1-45943-1741903831778-5:7, clientId=ID:b-cfab2617-b6fb-4a44-bd7a-052aa4cd96f4-1-45943-1741903831778-5:7, clientIP=tcp://127.0.0.1:63868 due to User name [elastic] or password is invalid.",
description: Pipeline for ActiveMQ general logs in AmazonMQ.
3
+
processors:
4
+
- rename:
5
+
field: message
6
+
target_field: event.original
7
+
if: 'ctx.event?.original == null'
8
+
description: 'Renames the original `message` field to `event.original` to store a copy of the original message. The `event.original` field is not touched if the document already has one; it may happen when Logstash sends the document.'
9
+
- remove:
10
+
field: message
11
+
ignore_missing: true
12
+
if: ctx.event?.original != null
13
+
description: 'The `message` field is no longer required if the document has an `event.original` field.'
0 commit comments