<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>Elastic Observability Labs - Articles by Udayasimha Theepireddy (Uday)</title>
        <link>https://www.elastic.co/observability-labs</link>
        <description>Trusted security news &amp; research from the team at Elastic.</description>
        <lastBuildDate>Wed, 12 Aug 2026 14:23:00 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <image>
            <title>Elastic Observability Labs - Articles by Udayasimha Theepireddy (Uday)</title>
            <url>https://www.elastic.co/observability-labs/assets/observability-labs-thumbnail.png</url>
            <link>https://www.elastic.co/observability-labs</link>
        </image>
        <copyright>© 2026. Elasticsearch B.V. All Rights Reserved</copyright>
        <item>
            <title><![CDATA[Observability for Amazon MQ with Elastic: Demystifying Messaging Flows with Real-Time Insights]]></title>
            <link>https://www.elastic.co/observability-labs/blog/amazonmq-observability-rabbitmq-integration</link>
            <guid isPermaLink="false">amazonmq-observability-rabbitmq-integration</guid>
            <pubDate>Fri, 02 May 2025 00:00:00 GMT</pubDate>
            <description><![CDATA[RabbitMQ, managed by Amazon MQ, enables asynchronous communication in distributed architectures but introduces operational risks such as retries, processing delays, and queue backlogs. Elastic’s Amazon MQ integration for RabbitMQ delivers deep observability into broker health, queue performance, message flow, and resource usage through Amazon CloudWatch metrics and logs. This blog outlines key operational risks associated with RabbitMQ and explains how Elastic observability helps maintain system reliability and optimize message delivery at scale.]]></description>
            <content:encoded><![CDATA[<h1>Observability for Amazon MQ with Elastic: Demystifying Messaging Flows with Real-Time Insights</h1>
<h2>Managing the Hidden Complexity of Message-Driven Architectures</h2>
<p>Amazon MQ is a managed message broker service for <a href="http://activemq.apache.org/">Apache ActiveMQ</a> Classic and <a href="https://www.rabbitmq.com/">RabbitMQ</a> that manages the setup, operation, and maintenance of message brokers. Messaging systems like RabbitMQ, managed by <a href="https://aws.amazon.com/amazon-mq/">Amazon MQ</a>, are pivotal in modern decoupled, event-driven applications. By serving as an intermediary between services, RabbitMQ facilitates asynchronous communication through message queuing, routing, and reliable delivery, making it an ideal fit for microservices, real-time pipelines, and event-driven architectures. However, this flexibility introduces operational challenges, such as retries, processing delays, consumer failures, and queue backlogs, which can gradually impact downstream performance and system reliability.</p>
<p>With Elastic’s <a href="https://www.elastic.co/docs/reference/integrations/aws_mq">Amazon MQ integration</a>, users gain deep visibility into message flow patterns, queue performance, and consumer health. This integration allows for the proactive detection of bottlenecks, helps optimize system behaviour, and ensures reliable message delivery at scale.</p>
<p>In this blog, we'll dive into the operational challenges of RabbitMQ in modern architectures, while also examining the common gaps and strategies for overcoming them.</p>
<h2>Why Observability for RabbitMQ on Amazon MQ Matters?</h2>
<p>RabbitMQ brokers are integral to distributed systems, handling tasks ranging from order processing to payment workflows and notification delivery. Any disruption can cascade into significant downstream issues. Observability into RabbitMQ helps answer critical operational questions like:​</p>
<ul>
<li>Is CPU and memory utilization increasing over time?</li>
<li>What are the trends in the message publish rate, message confirmation rate?</li>
<li>Are consumers failing to acknowledge messages?</li>
<li>Which queues are experiencing abnormal growth?</li>
<li>Are there an increasing number of messages being dead-lettered over time?</li>
</ul>
<h2>Enhanced Observability with Amazon MQ Integration</h2>
<p>Elastic provides a dedicated <a href="https://www.elastic.co/docs/reference/integrations/aws_mq">Amazon MQ integration</a> for RabbitMQ that utilizes Amazon CloudWatch metrics and logs to deliver comprehensive observability data. This integration enables the ingestion of metrics related to connections, nodes, queues, exchanges, and system logs.</p>
<p>By deploying <a href="https://www.elastic.co/elastic-agent">Elastic Agent</a> with this integration, the users can monitor:​</p>
<ul>
<li><strong>Queue performance and Dead-letter queue (DLQ) metrics</strong> include total message count (<code>MessageCount.max</code>), messages ready for delivery (<code>MessageReadyCount.max</code>), and unacknowledged messages (<code>MessageUnacknowledgedCount.max</code>). <code>MessageCount.max</code> metric tracks the total number of messages in a queue, including those that have been dead-lettered, and monitoring this over time can help identify trends in message accumulation, which may suggest issues leading to dead-lettering.</li>
<li><strong>Consumer behaviour</strong> through metrics like consumer count (<code>ConsumerCount.max</code>) and acknowledgement rate (<code>AckRate.max</code>), which help identify underperforming consumers or potential backlogs.</li>
<li><strong>Messaging throughput</strong> by tracking publish (<code>PublishRate.max</code>), confirm (<code>ConfirmRate.max</code>), and acknowledgement rates in real time. These are crucial for understanding application messaging patterns and flow.</li>
<li><strong>Broker and node-level health,</strong> including memory usage (<code>RabbitMQMemUsed.max</code>), CPU utilization (<code>SystemCpuUtilization.max</code>), disk availability (<code>RabbitMQDiskFree.min</code>), and file descriptor usage (<code>RabbitMQFdUsed.max</code>). These indicators are essential for diagnosing resource saturation and avoiding service disruption.</li>
</ul>
<p><img src="https://www.elastic.co/observability-labs/assets/images/amazonmq-observability-rabbitmq-integration/amazonmq-rabbitmq-dashboard-overview.png" alt="" /></p>
<h2>Integrating Amazon MQ Metrics into Elastic Observability</h2>
<p>Elastic's Amazon MQ integration facilitates the ingestion of CloudWatch metrics and logs into Elastic Observability, delivering near real-time insights into RabbitMQ. The prebuilt Amazon MQ dashboard visualizes this data, providing a centralized view of broker health, messaging activity, and resource usage, helping users quickly detect and resolve issues. Elastic's <a href="https://www.elastic.co/docs/solutions/observability/incident-management/alerting">alerting</a> for Observability enables proactive notifications based on custom conditions, while its <a href="https://www.elastic.co/docs/solutions/observability/incident-management/service-level-objectives-slos">SLO</a> capabilities allow users to define and track key performance targets, strengthening system reliability and service commitments. </p>
<p>Elastic brings together logs and metrics from Amazon MQ alongside data from a wide range of other services and applications, whether running in AWS, on-premises, or across multi-cloud environments, offering unified observability from a single platform.</p>
<h3>Prerequisites</h3>
<p>To follow along, ensure you have:</p>
<ul>
<li>An account on <a href="http://cloud.elastic.co/">Elastic Cloud</a> and a deployed stack in AWS (<a href="https://www.elastic.co/guide/en/elastic-stack/current/installing-elastic-stack.html">see instructions here</a>). Ensure you are using version 8.16.5 or higher. Alternatively, you can use <a href="https://www.elastic.co/cloud/serverless">Elastic Cloud Serverless</a>, a fully managed solution that eliminates infrastructure management, automatically scales based on usage, and lets you focus entirely on extracting value from your data.</li>
<li>An AWS account with permissions to pull the necessary data from AWS. <a href="https://docs.elastic.co/en/integrations/aws#aws-permissions">See details in our documentation</a>.</li>
</ul>
<h2>Architecture</h2>
<p><img src="https://www.elastic.co/observability-labs/assets/images/amazonmq-observability-rabbitmq-integration/rabbitmq_lambda_messageflow.png" alt="" /></p>
<h2>Tracing Audit Flows from RabbitMQ to AWS Lambda</h2>
<p>Consider a financial audit trail use case, where every user action, such as a funds transfer, is published to RabbitMQ. A Python-based AWS Lambda function consumes these messages, deduplicates them using the <strong>id</strong> field, and logs structured audit events for downstream analysis.</p>
<p>Sample payload sent through RabbitMQ:</p>
<pre><code class="language-json">{
  &quot;id&quot;: &quot;txn-849302&quot;,
  &quot;type&quot;: &quot;audit&quot;,
  &quot;payload&quot;: {
    &quot;user_id&quot;: &quot;u-10245&quot;,
    &quot;event&quot;: &quot;funds.transfer&quot;,
    &quot;amount&quot;: 1200.75,
    &quot;currency&quot;: &quot;USD&quot;,
    &quot;timestamp&quot;: &quot;T14:20:15Z&quot;,
    &quot;ip&quot;: &quot;192.168.0.8&quot;,
    &quot;location&quot;: &quot;New York, USA&quot;
  }
}
</code></pre>
<p>You can now correlate message publishing activity from RabbitMQ with AWS Lambda invocation logs, track processing latency, and configure alerts for conditions like drops in consumer throughput or an unexpected surge in RabbitMQ queue depth.</p>
<h3>AWS Lambda Function: Processing RabbitMQ Messages</h3>
<p>This Python-based AWS Lambda function processes audit events received from RabbitMQ. It deduplicates messages based on the <strong>id</strong> field and logs structured event data for downstream analysis or compliance. Save the code below in a file named <strong>app.py</strong>.</p>
<pre><code class="language-python">import json
import logging
import base64
# Configure logging
logger = logging.getLogger()
logger.setLevel(logging.INFO)
# In-memory set to track processed message IDs for deduplication
processed_ids = set()
def lambda_handler(event, context):
    logger.info(&quot;Lambda triggered by RabbitMQ event&quot;)
    if 'rmqMessagesByQueue' not in event:
        logger.warning(&quot;Invalid event: missing 'rmqMessagesByQueue'&quot;)
        return {'statusCode': 400, 'body': 'Invalid RabbitMQ event'}
    for queue_name, messages in event['rmqMessagesByQueue'].items():
        logger.info(f&quot;Processing queue: {queue_name}, Messages count: {len(messages)}&quot;)
        for msg in messages:
            try:
                raw_data = msg['data']
                decoded_json = base64.b64decode(raw_data).decode('utf-8')
                message = json.loads(decoded_json)
                logger.info(f&quot;Decoded message: {json.dumps(message)}&quot;)
                message_id = message.get('id')
                if not message_id:
                    logger.warning(&quot;Message missing 'id', skipping.&quot;)
                    continue
                if message_id in processed_ids:
                    logger.warning(f&quot;Duplicate message detected: {message_id}&quot;)
                    continue
                payload = message.get('payload', {})
                logger.info(f&quot;Processing message ID: {message_id}&quot;)
                logger.info(f&quot;Event Type: {message.get('type')}&quot;)
                logger.info(f&quot;User ID: {payload.get('user_id')}&quot;)
                logger.info(f&quot;Event: {payload.get('event')}&quot;)
                logger.info(f&quot;Amount: {payload.get('amount')} {payload.get('currency')}&quot;)
                logger.info(f&quot;Timestamp: {payload.get('timestamp')}&quot;)
                logger.info(f&quot;IP Address: {payload.get('ip')}&quot;)
                logger.info(f&quot;Location: {payload.get('location')}&quot;)
                processed_ids.add(message_id)
            except Exception as e:
                logger.error(f&quot;Error processing message: {str(e)}&quot;)
    return {'statusCode': 200, 'body': 'Messages processed successfully'}

</code></pre>
<h3>Setting up AWS Secrets Manager</h3>
<p>To securely store and manage your RabbitMQ credentials, use AWS Secrets Manager.​</p>
<ol>
<li>
<p><strong>Create a New Secret:</strong></p>
<ul>
<li>Navigate to the<a href="https://console.aws.amazon.com/secretsmanager/"> AWS Secrets Manager console</a>.</li>
<li>Choose <strong>Store a new secret</strong>.</li>
<li>Select <strong>Other type of secret</strong>.</li>
<li>Enter the following key-value pairs:
<ul>
<li><code>username</code>: Your RabbitMQ username</li>
<li><code>password</code>: Your RabbitMQ password</li>
</ul>
</li>
</ul>
</li>
<li>
<p><strong>Configure the Secret:</strong></p>
<ul>
<li>Provide a meaningful name, such as <code>RabbitMQAccess</code>.</li>
<li>Optionally, add tags and set rotation if needed.​</li>
</ul>
</li>
<li>
<p><strong>Store the Secret:</strong></p>
<ul>
<li>Review the settings and store the secret. Note the ARN of the secret you have created.
<img src="https://www.elastic.co/observability-labs/assets/images/amazonmq-observability-rabbitmq-integration/aws-secret-manager-configuration.png" alt="" /></li>
</ul>
</li>
</ol>
<h3>Setting up Amazon MQ for RabbitMQ</h3>
<p>To get started with RabbitMQ on Amazon MQ, follow these steps to set up your broker.</p>
<ul>
<li>Open the <a href="https://console.aws.amazon.com/amazonmq/">Amazon MQ console</a>.</li>
<li>Create a new broker with the <strong>RabbitMQ</strong> engine.</li>
<li>Choose your preferred deployment option—<strong>single-instance</strong> or <strong>clustered</strong></li>
<li>Use the same <strong>username</strong> and <strong>password</strong> that you previously stored in <strong>AWS Secrets Manager</strong>.</li>
<li>Under <strong>Additional settings</strong>, enable <strong>CloudWatch Logs</strong> for observability.
<img src="https://www.elastic.co/observability-labs/assets/images/amazonmq-observability-rabbitmq-integration/amazonmq-cloudwatch-enable.png" alt="" /></li>
<li>Configure access and security settings, ensuring that the broker is accessible to your AWS Lambda function.</li>
</ul>
<ul>
<li>
<p>After the broker is created, note the following important details:</p>
<ul>
<li>ARN of the RabbitMQ broker.</li>
<li>RabbitMQ web console URL.
<img src="https://www.elastic.co/observability-labs/assets/images/amazonmq-observability-rabbitmq-integration/amazonmq-rabbitmq-configuration-summary.png" alt="" /></li>
</ul>
</li>
<li>
<p>You’ll need the RabbitMQ log group ARN to set up Elastic’s Amazon MQ integration for RabbitMQ. Follow these steps to locate it:</p>
<ul>
<li>Go to the <strong>General – Enabled Logs</strong> section of the broker. </li>
<li>Copy the <strong>CloudWatch log group ARN</strong>.
<img src="https://www.elastic.co/observability-labs/assets/images/amazonmq-observability-rabbitmq-integration/amazonmq-rabbitmq-loggroup-arn.png" alt="" /></li>
</ul>
</li>
</ul>
<h3>Create a RabbitMQ Queue</h3>
<p>Now that the RabbitMQ broker is configured, use the management console to create a queue where messages will be published.</p>
<ul>
<li>Access the RabbitMQ management console using the web console URL.</li>
<li>Create a new queue (example: <strong>myQueue</strong>) to receive messages.
<img src="https://www.elastic.co/observability-labs/assets/images/amazonmq-observability-rabbitmq-integration/rabbitmq-create-queue.png" alt="" /></li>
</ul>
<h3>Build and deploy the AWS Lambda function</h3>
<p>In this section, we'll set up the Lambda function using AWS SAM, add the message processing logic, and deploy it to AWS. This Lambda function will be responsible for consuming messages from RabbitMQ and logging audit events.</p>
<p>Before continuing, make sure you have completed the following prerequisites.</p>
<ul>
<li>
<p><a href="https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/prerequisites.html">AWS SAM prerequisites</a></p>
</li>
<li>
<p><a href="https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/install-sam-cli.html">Install the AWS SAM CLI</a></p>
</li>
</ul>
<p>Next, follow the steps outlined below to continue with the setup.</p>
<ol>
<li>In your command line, run the command <code>sam init</code> from a directory of your choice.</li>
<li>The AWS SAM CLI will walk you through the setup.
<ul>
<li>Select <strong>AWS Quick Start Templates</strong>.</li>
<li>Choose the <strong>Hello World Example</strong> </li>
<li>Use the <strong>Python</strong> runtime and <strong>zip</strong> package type.</li>
<li>Proceed with the default options.</li>
<li>Name your application as <strong>sample-rabbitmq-app</strong>.</li>
<li>The AWS SAM CLI downloads your starting template and creates the application project directory structure.</li>
</ul>
</li>
<li>From your command line, move to the newly created sample-rabbitmq-app directory.
<ul>
<li>Replace the content of the <strong>hello_world/app.py</strong> file with the lambda function code for rabbitmq message processing.</li>
<li>In the <strong>template.yaml</strong> file, use the values mentioned below to update the file content.
<pre><code class="language-yaml">Resources: SampleRabbitMQApp:   Type: AWS::Serverless::Function   Properties:     CodeUri: hello_world/     Description: A starter AWS Lambda function.     MemorySize: 128     Timeout: 3     Handler: app.lambda_handler     Runtime: python3.10     PackageType: Zip     Policies:       - Statement:           - Effect: Allow             Resource: '*'             Action:               - mq:DescribeBroker               - secretsmanager:GetSecretValue               - ec2:CreateNetworkInterface               - ec2:DescribeNetworkInterfaces               - ec2:DescribeVpcs               - ec2:DeleteNetworkInterface               - ec2:DescribeSubnets               - ec2:DescribeSecurityGroups     Events:       MQEvent:         Type: MQ         Properties:           Broker: &lt;ARN of the Broker&gt;           Queues:             - myQueue           SourceAccessConfigurations:             - Type: BASIC_AUTH               URI: &lt;ARN of the secret&gt;
</code></pre></li>
</ul>
</li>
<li>Run the command <code>sam deploy --guided</code> and wait for the confirmation message. This deploys all of the resources.</li>
</ol>
<h3>Sending Audit Events to RabbitMQ and Triggering Lambda</h3>
<p>To test the end-to-end setup, simulate the flow by publishing audit event data into RabbitMQ using its web UI. Once the message is sent, it triggers the Lambda function. </p>
<ol>
<li>
<p>Navigate to the <a href="https://console.aws.amazon.com/amazon-mq/home">Amazon MQ console</a> and select your newly created broker.</p>
</li>
<li>
<p>Locate and open the Rabbit web console URL<br />
<img src="https://www.elastic.co/observability-labs/assets/images/amazonmq-observability-rabbitmq-integration/amazonmq-rabbitmq-webconsole-details.png" alt="" /></p>
</li>
<li>
<p>Under the <strong>Queues and Streams</strong> tab, select the target queue (example: <strong>myQueue</strong>).</p>
</li>
<li>
<p>Enter the message payload, and click <strong>Publish message</strong> to send it to the queue.<br />
Here’s a sample payload published via RabbitMQ:</p>
<pre><code class="language-json">{
  &quot;id&quot;: &quot;txn-849302&quot;,
  &quot;type&quot;: &quot;audit&quot;,
  &quot;payload&quot;: {
    &quot;user_id&quot;: &quot;u-10245&quot;,
    &quot;event&quot;: &quot;funds.transfer&quot;,
    &quot;amount&quot;: 1200.75,
    &quot;currency&quot;: &quot;USD&quot;,
    &quot;timestamp&quot;: &quot;T14:20:15Z&quot;,
    &quot;ip&quot;: &quot;192.168.0.8&quot;,
    &quot;location&quot;: &quot;New York, USA&quot;
  }
}
</code></pre>
</li>
<li>
<p>Navigate to the AWS Lambda function created earlier.</p>
</li>
<li>
<p>Under the <strong>Monitor</strong> tab, click <strong>View CloudWatch logs</strong>.</p>
</li>
<li>
<p>Check the latest log stream to confirm that the Lambda was triggered by Amazon MQ and that the message was processed successfully.
<img src="https://www.elastic.co/observability-labs/assets/images/amazonmq-observability-rabbitmq-integration/amazonmq-lambda-logstream.png" alt="" /></p>
</li>
</ol>
<h1>Configuring Amazon MQ integration for Metrics and Logs collection</h1>
<p>Elastic’s <a href="https://www.elastic.co/docs/reference/integrations/aws_mq">Amazon MQ integration</a> simplifies the collection of logs and metrics from RabbitMQ brokers managed by Amazon MQ. Logs are ingested via <strong>Amazon CloudWatch Logs</strong>, while metrics are fetched from the specified AWS region at a defined interval.</p>
<p>Elastic provides a default configuration for metrics collection. You can accept these defaults or adjust settings such as the <strong>Collection Period</strong> to better fit your needs.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/amazonmq-observability-rabbitmq-integration/amazonmq-metrics-configuration.png" alt="" /></p>
<p>To enable the collection of logs:</p>
<ol>
<li>Navigate to the <a href="https://console.aws.amazon.com/amazon-mq/home">Amazon MQ console</a> and select the newly created broker.</li>
<li>Click the <strong>Logs</strong> hyperlink under the <strong>General – Enabled Logs</strong> section to open the detailed log settings page.</li>
<li>From this page, copy the <strong>CloudWatch log group ARN</strong>.
<img src="https://www.elastic.co/observability-labs/assets/images/amazonmq-observability-rabbitmq-integration/amazonmq-rabbitmq-loggroup-arn.png" alt="" /></li>
<li>In <strong>Elastic</strong>, set up the <strong>Amazon MQ integration</strong> and paste the CloudWatch log group ARN.
<img src="https://www.elastic.co/observability-labs/assets/images/amazonmq-observability-rabbitmq-integration/amazonmq-logs-configuration.png" alt="" /></li>
<li><strong>Accept Defaults or Customize Settings</strong> – Elastic provides a <strong>default configuration</strong> for logs collection. You can accept these defaults or adjust settings such as <strong>collection intervals</strong> to better fit your needs.</li>
</ol>
<h3>Visualizing RabbitMQ Workloads with the Pre-Built Amazon MQ Dashboard</h3>
<p>You can access the RabbitMQ dashboard by:</p>
<ol>
<li>
<p>Navigate to the Dashboard Menu – Select the Dashboard menu option in Elastic and search for <strong>[Amazon MQ] RabbitMQ Overview</strong> to open the dashboard.</p>
</li>
<li>
<p>Navigate to the Integrations Menu – Open the <strong>Integrations</strong> menu in Elastic, select <strong>Amazon MQ</strong>, go to the <strong>Assets</strong> tab, and choose <strong>[Amazon MQ] RabbitMQ Overview</strong> from the dashboard assets</p>
</li>
</ol>
<p>The Amazon MQ RabbitMQ dashboard in the Elastic integration delivers a comprehensive overview of broker health and messaging activity. It provides real-time insights into broker resource utilization, queue and topic performance, connection trends, and messaging throughput. The dashboard helps users track system behaviour, detect performance bottlenecks, and ensure reliable message delivery across distributed applications.</p>
<h4>Broker Metrics</h4>
<p>This section provides a centralised view of the overall health and performance of the RabbitMQ broker on Amazon MQ. The visualizations highlights the number of configured exchanges and queues, active broker connections, producers, consumers, and total messages in flight. System-level metrics such as CPU utilization, memory consumption, and free disk space help assess whether the broker has sufficient resources to handle current workloads.</p>
<p>Message flow metrics such as publish rate, confirmation rate, and acknowledgement rate are displayed to provide visibility into how messages are processed through the broker. Monitoring trends in these values helps detect message delivery issues, throughput degradation, or potential saturation of the broker under load.</p>
<h4>Node Metrics</h4>
<p>Node-level visibility helps identify resource imbalances across nodes in clustered RabbitMQ setups. This section includes per-node CPU usage, memory consumption, and available disk space, offering insight into the underlying infrastructure's ability to support broker operations.</p>
<h4>Queue Metrics</h4>
<p>Queue-specific insights are critical for understanding message delivery patterns and backlog conditions. This section details total messages, ready messages, and unacknowledged messages, segmented by broker, virtual host, and queue.</p>
<p>By observing how these counts change over time, users can identify slow consumers, message build-ups, or delivery issues that may affect application performance or lead to dropped messages under pressure.</p>
<h4>Logs</h4>
<p>This section displays log level, process ID, and raw message content. These logs provide immediate visibility into events such as connection failures, resource thresholds being hit, or unexpected queue behaviors.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/amazonmq-observability-rabbitmq-integration/amazonmq-rabbitmq-dashboard.png" alt="" /></p>
<h3>Detecting Queue Backlogs with Alerting Rules</h3>
<p>Elastic’s <a href="https://www.elastic.co/docs/solutions/observability/incident-management/alerting">alert</a> framework allows you to define rules that monitor critical RabbitMQ metrics and automatically trigger actions when specific thresholds are breached. </p>
<h4>Alert: Queue Backlog (Message Ready or Unacknowledged Messages)</h4>
<p>This alert helps detect queue backlog in Amazon MQ by evaluating two metrics</p>
<ul>
<li><code>MessageUnacknowledgedCount.max</code> and</li>
<li><code>MessageReadyCount.max</code>. </li>
</ul>
<p>The alert is triggered if either condition persists for more than <strong>10 minutes</strong>:</p>
<ul>
<li><code>MessageUnacknowledgedCount.max</code> exceeds <strong>5,000</strong></li>
<li><code>MessageReadyCount.max</code> exceeds <strong>7,000</strong></li>
</ul>
<p>These thresholds should be adjusted based on typical message volume and consumer throughput. Sustained high values can indicate that consumers are not keeping up or message delivery pipelines are congested, potentially causing delays or dropped messages. Sustained high values may result in processing delays or dropped messages if not addressed.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/amazonmq-observability-rabbitmq-integration/amazonmq-alert-configuration.png" alt="" /></p>
<h3>Tracking Resource Utilization to Maintain RabbitMQ Performance</h3>
<p>Elastic’s <a href="https://www.elastic.co/docs/solutions/observability/incident-management/service-level-objectives-slos">Service-level objectives (SLOs)</a> capabilities allow you to define and monitor performance targets using key indicators like latency, availability, and error rates. Once configured, Elastic continuously evaluates these SLOs in real time, offering intuitive dashboards, alerts for threshold violations, and insights into error budget consumption. This enables teams to stay ahead of issues, ensuring service reliability and consistent performance.</p>
<h4>SLO: Node Resource Health (CPU, Memory, Disk)</h4>
<p>This SLO focuses on ensuring RabbitMQ brokers and nodes have sufficient resources to process messages without performance degradation. It tracks CPU, memory, and disk usage across RabbitMQ brokers and nodes to prevent resource exhaustion that could lead to service interruptions.</p>
<p><strong>Target thresholds:</strong></p>
<ul>
<li><code>SystemCpuUtilization.max</code> remains below <strong>85%</strong> for <strong>99%</strong> of the time.</li>
<li><code>RabbitMQMemUsed.max</code> remains below <strong>80%</strong> of <code>RabbitMQMemLimit.max</code> for <strong>99%</strong> of the time.</li>
<li><code>RabbitMQDiskFree.min</code> remains above <strong>25%</strong> of <code>RabbitMQDiskFreeLimit.max</code> for <strong>99%</strong> of the time.</li>
</ul>
<p>Sustained high values in CPU or memory usage can signal resource contention, which may result in slower message processing or downtime. Low disk availability may cause the broker to stop accepting messages, risking message loss. These thresholds are designed to catch early signs of resource saturation and ensure smooth, uninterrupted message flow across RabbitMQ deployments.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/amazonmq-observability-rabbitmq-integration/amazonmq-slo-configuration.png" alt="" /></p>
<h2>Conclusion</h2>
<p>As RabbitMQ-based messaging architectures scale and become more complex, the need for in-depth visibility into system performance and potential issues deepens. Elastic’s <a href="https://www.elastic.co/docs/reference/integrations/aws_mq">Amazon MQ integration</a> brings that visibility front and center—helping you go beyond basic health checks to understand real-time messaging throughput, queue backlog trends, and resource saturation across your brokers and consumers.</p>
<p>By leveraging the prebuilt dashboards, configuring alerts and SLOs, you can proactively detect anomalies, fine-tune consumer performance, and ensure reliable delivery across your event-driven applications.</p>
]]></content:encoded>
            <category>observability-labs</category>
            <enclosure url="https://www.elastic.co/observability-labs/assets/images/amazonmq-observability-rabbitmq-integration/AmazonMQ-observability-RabbitMQ.jpg" length="0" type="image/jpg"/>
        </item>
        <item>
            <title><![CDATA[Achieving seamless API management: Introducing AWS API Gateway integration with Elastic]]></title>
            <link>https://www.elastic.co/observability-labs/blog/api-management-aws-api-gateway-integration</link>
            <guid isPermaLink="false">api-management-aws-api-gateway-integration</guid>
            <pubDate>Thu, 14 Sep 2023 00:00:00 GMT</pubDate>
            <description><![CDATA[With Elastic's AWS API Gateway integration, application owners and developers unlock the capability to proactively identify and resolve problems, fine-tune resource utilization, and provide extraordinary digital experiences to their users.]]></description>
            <content:encoded><![CDATA[<p><a href="https://aws.amazon.com/api-gateway/">AWS API Gateway</a> is a powerful service that redefines API management. It serves as a gateway for creating, deploying, and managing APIs, enabling businesses to establish seamless connections between different applications and services. With features like authentication, authorization, and traffic control, API Gateway ensures the security and reliability of API interactions.</p>
<p>In an era where APIs serve as the backbone of modern applications, having the means to maintain visibility and control over these vital components is absolutely essential. In this blog post, we dive deep into the comprehensive observability solution offered by Elastic&lt;sup&gt;®&lt;/sup&gt;, ensuring real-time visibility, advanced analytics, and actionable insights, empowering you to fine-tune your API Gateway for optimal performance.</p>
<p>For application owners and developers, this integration stands as a beacon of empowerment. Elastic's meticulous orchestration of the seamless merging of metrics, logs, and traces, built upon the robust <a href="https://www.elastic.co/elastic-stack">ELK Stack</a> foundation, equips them with potent real-time monitoring and analysis tools. These tools facilitate precise performance optimization and swift issue resolution, all within a secure and dependable environment.</p>
<p>With Elastic's AWS API Gateway integration, application owners and developers unlock the capability to proactively identify and resolve problems, fine-tune resource utilization, and provide extraordinary digital experiences to their users.</p>
<h2>Architecture</h2>
<p><img src="https://www.elastic.co/observability-labs/assets/images/api-management-aws-api-gateway-integration/elastic-blog-1-architecture.png" alt="architecture" /></p>
<h2>Why the AWS API Gateway integration matters</h2>
<p>API Gateway now serves as the foundation of contemporary application development, simplifying the process of creating and overseeing APIs on a large scale. Yet, monitoring and troubleshooting these API endpoints can be challenging. With the new AWS API Gateway integration introduced by Elastic, you can gain the following:</p>
<ul>
<li><strong>Unprecedented visibility:</strong> Monitor your API Gateway endpoints' performance, error rates, and usage metrics in real time. Get a comprehensive view of your APIs' health and performance.</li>
<li><strong>Log analysis:</strong> Dive deep into API Gateway logs with ease. Our integration enables you to collect and analyze logs for HTTP, REST, and Websocket API types, helping you troubleshoot issues and gain valuable insights.</li>
<li><strong>Rapid issue resolution:</strong> Identify and resolve issues in your API Gateway workflows faster than ever. <a href="https://www.elastic.co/observability">Elastic Observability's</a> powerful search and analytics tools help you pinpoint problems with ease.</li>
<li><strong>Alerting and notifications:</strong> Set up custom alerts based on API Gateway metrics and logs. Receive notifications when performance thresholds are breached, ensuring that you can take action promptly.</li>
<li><strong>Optimized costs:</strong> Visualize resource usage and performance metrics for your API Gateway deployments. Use these insights to optimize resource allocation and reduce operational costs.</li>
<li><strong>Custom dashboards:</strong> Create customized dashboards and visualizations tailored to your API Gateway monitoring needs. Stay in control with real-time data and actionable insights.</li>
<li><strong>Effortless integration:</strong> Seamlessly connect your AWS API Gateway to our observability solution. Our intuitive setup process ensures a smooth integration experience.</li>
<li><strong>Scalability:</strong> Whether you have a handful of APIs or a complex API Gateway landscape, our observability solution scales to meet your needs. Grow confidently as your API infrastructure expands.</li>
</ul>
<h2>How to get started</h2>
<p>Getting started with the AWS API Gateway integration in Elastic Observability is seamless. Here's a quick overview of the steps:</p>
<h3>Prerequisites and configurations</h3>
<p>If you intend to follow the steps outlined in this blog post, there are a few prerequisites and configurations that you should have in place beforehand.</p>
<ol>
<li>
<p>You will need an account on <a href="http://cloud.elastic.co/">Elastic Cloud</a> and a deployed stack and agent. Instructions for deploying a stack on AWS can be found <a href="https://www.elastic.co/guide/en/elastic-stack/current/installing-elastic-stack.html">here</a>. This is necessary for AWS API Gateway logging and analysis.</p>
</li>
<li>
<p>You will also need an AWS account with the necessary permissions to pull data from AWS. Details on the required permissions can be found in our <a href="https://docs.elastic.co/en/integrations/aws#aws-permissions">documentation</a>.</p>
</li>
<li>
<p>You can monitor API execution by using CloudWatch, which collects and processes raw data from API Gateway into readable, near-real-time metrics and logs. Details on the required steps to enable logging can be found <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-logging.html">here</a>.</p>
</li>
</ol>
<h3>Step 1. Create an account with Elastic</h3>
<p><a href="https://cloud.elastic.co/registration?fromURI=/home">Create an account on Elastic Cloud</a> by following the steps provided.</p>
<h3>Step 2. Add integration</h3>
<ul>
<li>Log in to your Elastic Cloud deployment.</li>
</ul>
<p><img src="https://www.elastic.co/observability-labs/assets/images/api-management-aws-api-gateway-integration/elastic-blog-2-signup.png" alt="signup" /></p>
<ul>
<li>Click on <strong>Add integrations</strong>. You will be navigated to a catalog of supported integrations.</li>
</ul>
<p><img src="https://www.elastic.co/observability-labs/assets/images/api-management-aws-api-gateway-integration/elastic-blog-3-welcome-home.png" alt="welcome home dashboard" /></p>
<ul>
<li>Search and select <strong>AWS API Gateway</strong>.</li>
</ul>
<p><img src="https://www.elastic.co/observability-labs/assets/images/api-management-aws-api-gateway-integration/elastic-blog-4-integrations.png" alt="Integration " /></p>
<h3>Step 3. Configure integration</h3>
<ul>
<li>Click on the <strong>Add AWS API Gateway</strong> button and provide the required details.</li>
<li>If this is your first time adding an AWS integration, you’ll need to <a href="https://www.elastic.co/guide/en/fleet/current/elastic-agent-installation.html">configure and enroll the Elastic Agent</a> on an AWS instance.</li>
</ul>
<p><img src="https://www.elastic.co/observability-labs/assets/images/api-management-aws-api-gateway-integration/elastic-blog-5-aws-api-gateway.png" alt="aws-api-gateway" /></p>
<ul>
<li>Then complete the “Configure integration” form, providing all the necessary information required for agents to collect the AWS API Gateway metrics and associated CloudWatch logs. Multiple AWS credential methods are supported, including access keys, temporary security credentials, and IAM role ARN. Please see the <a href="https://docs.aws.amazon.com/apigateway/latest/developerguide/security-iam.html">IAM security and access documentation</a> for more details. You can choose to collect API Gateway metrics, API Gateway logs via S3, or API Gateway logs via CloudWatch.</li>
<li>Click on the <strong>Save and continue</strong> button at the bottom of the page.</li>
</ul>
<p><img src="https://www.elastic.co/observability-labs/assets/images/api-management-aws-api-gateway-integration/elastic-blog-6-add-aws-integration.png" alt="add-aws-integration" /></p>
<h3>Step 4. Analyze and monitor</h3>
<p>Explore the data using the out-of-the-box dashboards available for the integration. Select <strong>Discover</strong> from the Elastic Cloud top-level menu.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/api-management-aws-api-gateway-integration/elastic-blog-7-discover-dashboard.png" alt="discover-dashboard" /></p>
<p>Or, create custom dashboards, set up alerts, and gain actionable insights into your API Gateway service performance.</p>
<p>Here are key monitoring metrics collected through this integration across Rest APIs, HTTP APIs, and Websocket APIs:</p>
<ul>
<li><strong>4XXError</strong> – The number of client-side errors captured in a given period</li>
<li><strong>5XXError</strong> – The number of server-side errors captured in a given period</li>
<li><strong>CacheHitCount</strong> – The number of requests served from the API cache in a given period</li>
<li><strong>CacheMissCount</strong> – The number of requests served from the backend in a given period, when API caching is enabled</li>
<li><strong>Count</strong> – The total number of API requests in a given period</li>
<li><strong>IntegrationLatency</strong> – The time between when API Gateway relays a request to the backend and when it receives a response from the backend</li>
<li><strong>Latency</strong> – The time between when API Gateway receives a request from a client and when it returns a response to the client — the latency includes the integration latency and other API Gateway overhead</li>
<li><strong>DataProcessed</strong> – The amount of data processed in bytes</li>
<li><strong>ConnectCount</strong> – The number of messages sent to the $connect route integration<br />
<strong>MessageCount</strong> – The number of messages sent to the WebSocket API, either from or to the client</li>
</ul>
<p><img src="https://www.elastic.co/observability-labs/assets/images/api-management-aws-api-gateway-integration/elastic-blog-8-graphs.png" alt="graphs" /></p>
<h2>Conclusion</h2>
<p>The native integration of AWS API Gateway into Elastic Observability marks a significant advancement in streamlining the monitoring and management of your APIs. With this integration, you gain access to a wealth of insights, real-time visibility, and powerful analytics tools, empowering you to optimize your API performance, enhance security, and troubleshoot with ease. Don't miss out on this opportunity to take your API management to the next level, ensuring your digital assets operate at their best, all while providing a seamless experience for your users. Embrace this integration, and stay at the forefront of API observability in the ever-evolving world of digital technology.</p>
<p>Visit our <a href="https://docs.elastic.co/integrations/aws/apigateway">documentation</a> to learn more about Elastic Observability and the AWS API Gateway integration, or <a href="https://www.elastic.co/contact">contact our sales team</a> to get started!</p>
<h2>Start a free trial today</h2>
<p>Start your own <a href="https://aws.amazon.com/marketplace/pp/prodview-voru33wi6xs7k?trk=5fbc596b-6d2a-433a-8333-0bd1f28e84da%E2%89%BBchannel=el">7-day free trial</a> by signing up via <a href="https://aws.amazon.com/marketplace/pp/prodview-voru33wi6xs7k?trk=5fbc596b-6d2a-433a-8333-0bd1f28e84da&amp;sc_channel=el&amp;ultron=gobig&amp;hulk=regpage&amp;blade=elasticweb&amp;gambit=mp-b">AWS Marketplace</a> and quickly spin up a deployment in minutes on any of the <a href="https://www.elastic.co/guide/en/cloud/current/ec-reference-regions.html#ec_amazon_web_services_aws_regions">Elastic Cloud regions on AWS</a> around the world. Your AWS Marketplace purchase of Elastic will be included in your monthly consolidated billing statement and will draw against your committed spend with AWS.</p>
<p><em>The release and timing of any features or functionality described in this post remain at Elastic's sole discretion. Any features or functionality not currently available may not be delivered on time or at all.</em></p>
]]></content:encoded>
            <category>observability-labs</category>
            <enclosure url="https://www.elastic.co/observability-labs/assets/images/api-management-aws-api-gateway-integration/illustration-midnight-bg-aws-elastic-1680x980.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[Unleash the power of Elastic and Amazon Kinesis Data Firehose to enhance observability and data analytics]]></title>
            <link>https://www.elastic.co/observability-labs/blog/aws-kinesis-data-firehose-observability-analytics</link>
            <guid isPermaLink="false">aws-kinesis-data-firehose-observability-analytics</guid>
            <pubDate>Thu, 18 May 2023 00:00:00 GMT</pubDate>
            <description><![CDATA[AWS users can now leverage the new Amazon Kinesis Firehose Delivery Stream to directly ingest logs into Elastic Cloud in real time for centralized alerting, troubleshooting, and analytics across your cloud and on-premises infrastructure.]]></description>
            <content:encoded><![CDATA[<p>As more organizations leverage the Amazon Web Services (AWS) cloud platform and services to drive operational efficiency and bring products to market, managing logs becomes a critical component of maintaining visibility and safeguarding multi-account AWS environments. Traditionally, logs are stored in Amazon Simple Storage Service (Amazon S3) and then shipped to an external monitoring and analysis solution for further processing.</p>
<p>To simplify this process and reduce management overhead, AWS users can now leverage the new Amazon Kinesis Firehose Delivery Stream to ingest logs into Elastic Cloud in AWS in real time and view them in the Elastic Stack alongside other logs for centralized analytics. This eliminates the necessity for time-consuming and expensive procedures such as VM provisioning or data shipper operations.</p>
<p>Elastic Observability unifies logs, metrics, and application performance monitoring (APM) traces for a full contextual view across your hybrid <a href="https://www.elastic.co/blog/aws-service-metrics-monitor-observability-easy">AWS environments alongside their on-premises data sets</a>. Elastic Observability enables you to track and monitor performance <a href="https://www.elastic.co/observability/aws-monitoring">across a broad range of AWS services</a>, including AWS Lambda, Amazon Elastic Compute Cloud (EC2), Amazon Elastic Container Service (ECS), Amazon Elastic Kubernetes Service (EKS), Amazon Simple Storage Service (S3), Amazon Cloudtrail, Amazon Network Firewall, and more.</p>
<p>In this blog, we will walk you through how to use the Amazon Kinesis Data Firehose integration — <a href="https://aws.amazon.com/blogs/big-data/accelerate-data-insights-with-elastic-and-amazon-kinesis-data-firehose/">Elastic is listed in the Amazon Kinesis Firehose</a> drop-down list — to simplify your architecture and send logs to Elastic, so you can monitor and safeguard your multi-account AWS environments.</p>
<h2>Announcing the Kinesis Firehose method</h2>
<p>Elastic currently provides both agent-based and serverless mechanisms, and we are pleased to announce the addition of the Kinesis Firehose method. This new method enables customers to directly ingest logs from AWS into Elastic, supplementing our existing options.</p>
<ul>
<li><a href="https://www.youtube.com/watch?v=pnGXjljuEnY"><strong>Elastic Agent</strong></a> pulls metrics and logs from CloudWatch and S3 where logs are generally pushed from a service (for example, EC2, ELB, WAF, Route53) and ingests them into Elastic Cloud.</li>
<li><a href="https://www.elastic.co/blog/elastic-and-aws-serverless-application-repository-speed-time-to-actionable-insights-with-frictionless-log-ingestion-from-amazon-s3"><strong>Elastic’s Serverless Forwarder</strong></a> (runs Lambda and available in AWS SAR) sends logs from Kinesis Data Stream, Amazon S3, and AWS Cloudwatch log groups into Elastic. To learn more about this topic, please see this <a href="https://www.elastic.co/blog/elastic-and-aws-serverless-application-repository-speed-time-to-actionable-insights-with-frictionless-log-ingestion-from-amazon-s3">blog post</a>.</li>
<li><a href="https://docs.aws.amazon.com/firehose/latest/dev/what-is-this-service.html"><strong>Amazon Kinesis Firehose</strong></a> directly ingests logs from AWS into Elastic (specifically, if you are running the Elastic Cloud on AWS).</li>
</ul>
<p>In this blog, we will cover the last option since we have recently released the Amazon Kinesis Data Firehose integration. Specifically, we'll review:</p>
<ul>
<li>A general overview of the Amazon Kinesis Data Firehose integration and how it works with AWS</li>
<li>Step-by-step instructions to set up the Amazon Kinesis Data Firehose integration on AWS and on <a href="http://cloud.elastic.co">Elastic Cloud</a></li>
</ul>
<p>By the end of this blog, you'll be equipped with the knowledge and tools to simplify your AWS log management with Elastic Observability and Amazon Kinesis Data Firehose.</p>
<h2>Prerequisites and configurations</h2>
<p>If you intend to follow the steps outlined in this blog post, there are a few prerequisites and configurations that you should have in place beforehand.</p>
<ol>
<li>You will need an account on <a href="http://cloud.elastic.co">Elastic Cloud</a> and a deployed stack on AWS. Instructions for deploying a stack on AWS can be found <a href="https://www.elastic.co/guide/en/elastic-stack/current/installing-elastic-stack.html">here</a>. This is necessary for AWS Firehose Log ingestion.</li>
<li>You will also need an AWS account with the necessary permissions to pull data from AWS. Details on the required permissions can be found in our <a href="https://docs.elastic.co/en/integrations/aws#aws-permissions">documentation</a>.</li>
<li>Finally, be sure to turn on VPC Flow Logs for the VPC where your application is deployed and send them to AWS Firehose.</li>
</ol>
<h2>Elastic’s Amazon Kinesis Data Firehose integration</h2>
<p>Elastic has collaborated with AWS to offer a seamless integration of Amazon Kinesis Data Firehose with Elastic, enabling direct ingestion of data from Amazon Kinesis Data Firehose into Elastic without the need for Agents or Beats. All you need to do is configure the Amazon Kinesis Data Firehose delivery stream to send its data to Elastic's endpoint. In this configuration, we will demonstrate how to ingest VPC Flow logs and Firewall logs into Elastic. You can follow a similar process to ingest other logs from your AWS environment into Elastic.</p>
<p>There are three distinct configurations available for ingesting VPC Flow and Network firewall logs into Elastic. One configuration involves sending logs through CloudWatch, and another uses S3 and Kinesis Firehose; each has its own unique setup. With Cloudwatch and S3 you can store and forward but with Kinesis Firehose you will have to ingest immediately. However, in this blog post, we will focus on this new configuration that involves sending VPC Flow logs and Network Firewall logs directly to Elastic.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/aws-kinesis-data-firehose-observability-analytics/image2.png" alt="AWS elastic configuration" /></p>
<p>We will guide you through the configuration of the easiest setup, which involves directly sending VPC Flow logs and Firewalls logs to Amazon Kinesis Data Firehose and then into Elastic Cloud.</p>
<p><strong>Note:</strong> It's important to note that this setup is only compatible with Elastic Cloud on AWS and cannot be used with self-managed or on-premise or other cloud provider Elastic deployments.</p>
<h2>Setting it all up</h2>
<p>To begin setting up the integration between Amazon Kinesis Data Firehose and Elastic, let's go through the necessary steps.</p>
<h3>Step 0: Get an account on Elastic Cloud</h3>
<p>Create an account on Elastic Cloud by following the instructions provided to <a href="https://cloud.elastic.co/registration?fromURI=/home">get started on Elastic Cloud</a>.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/aws-kinesis-data-firehose-observability-analytics/Screenshot_2023-05-18_at_6.00.28_PM.png" alt="elastic free trial" /></p>
<h3>Step 1: Deploy Elastic on AWS</h3>
<p>You can deploy Elastic on AWS via two different approaches: through the UI or through Terraform. We’ll start first with the UI option.</p>
<p>After logging into Elastic Cloud, create a deployment on Elastic. It's crucial to make sure that the deployment is on Elastic Cloud on AWS since the Amazon Kinesis Data Firehose connects to a specific endpoint that must be on AWS.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/aws-kinesis-data-firehose-observability-analytics/blog-elastic-create-a-deployment.png" alt="create a deployment" /></p>
<p>After your deployment is created, it's essential to copy the Elasticsearch endpoint to ensure a seamless configuration process.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/aws-kinesis-data-firehose-observability-analytics/blog-elastic-O11y-log.png" alt="O11y log" /></p>
<p>The Elasticsearch HTTP endpoint should be copied and used for Amazon Firehose destination configuration purposes, as it will be required. Here's an example of what the endpoint should look like:</p>
<pre><code class="language-bash">https://elastic-O11y-log.es.us-east-1.aws.found.io
</code></pre>
<h3><em>Alternative approach using Terraform</em></h3>
<p>An alternative approach to deploying Elastic Cloud on AWS is by using Terraform. It's also an effective way to automate and streamline the deployment process.</p>
<p>To begin, simply create a Terraform configuration file that outlines the necessary infrastructure. This file should include resources for your Elastic Cloud deployment and any required IAM roles and policies. By using this approach, you can simplify the deployment process and ensure consistency across environments.</p>
<p>One easy way to create your Elastic Cloud deployment with Terraform is to use this Github <a href="https://github.com/aws-ia/terraform-elastic-cloud">repo</a>. This resource lets you specify the region, version, and deployment template for your Elastic Cloud deployment, as well as any additional settings you require.</p>
<h3>Step 2: To turn on Elastic's AWS integrations, navigate to the Elastic Integration section in your deployment</h3>
<p>To install AWS assets in your deployment's Elastic Integration section, follow these steps:</p>
<ol>
<li>Log in to your Elastic Cloud deployment and open <strong>Kibana</strong>.</li>
<li>To get started, go to the <strong>management</strong> section of Kibana and click on &quot; <strong>Integrations.</strong>&quot;</li>
<li>Navigate to the <strong>AWS</strong> integration and click on the &quot;Install AWS Assets&quot; button in the <strong>settings</strong>.This step is important as it installs the necessary assets such as <strong>dashboards</strong> and <strong>ingest pipelines</strong> to enable data ingestion from AWS services into Elastic.</li>
</ol>
<p><img src="https://www.elastic.co/observability-labs/assets/images/aws-kinesis-data-firehose-observability-analytics/blog-elastic-aws-settings.png" alt="aws settings" /></p>
<h3>Step 3: Set up the Amazon Kinesis Data Firehose delivery stream on the AWS Console</h3>
<p>You can set up the Kinesis Data Firehose delivery stream via two different approaches: through the AWS Management Console or through Terraform. We’ll start first with the console option.</p>
<p>To set up the Kinesis Data Firehose delivery stream on AWS, follow these <a href="https://docs.aws.amazon.com/firehose/latest/dev/create-destination.html#create-destination-elastic">steps</a>:</p>
<ol>
<li>
<p>Go to the AWS Management Console and select Amazon Kinesis Data Firehose.</p>
</li>
<li>
<p>Click on Create delivery stream.</p>
</li>
<li>
<p>Choose a delivery stream name and select Direct PUT or other sources as the source.</p>
</li>
</ol>
<p><img src="https://www.elastic.co/observability-labs/assets/images/aws-kinesis-data-firehose-observability-analytics/blog-elastic-create-delivery-stream.png" alt="create delivery stream" /></p>
<ol start="4">
<li>
<p>Choose Elastic as the destination.</p>
</li>
<li>
<p>In the Elastic destination section, enter the Elastic endpoint URL that you copied from your Elastic Cloud deployment.</p>
</li>
</ol>
<p><img src="https://www.elastic.co/observability-labs/assets/images/aws-kinesis-data-firehose-observability-analytics/blog-elastic-destination-settings.png" alt="destination settings" /></p>
<ol start="6">
<li>
<p>Choose the content encoding and retry duration as shown above.</p>
</li>
<li>
<p>Enter the appropriate parameter values for your AWS log type. For example, for VPC Flow logs, you would need to specify the _ <strong>es_datastream_name</strong> _ and _ <strong>logs-aws.vpc flow-default</strong> _.</p>
</li>
<li>
<p>Configure the Amazon S3 bucket as the source backup for the Amazon Kinesis Data Firehose delivery stream failed data or all data, and configure any required tags for the delivery stream.</p>
</li>
<li>
<p>Review the settings and click on Create delivery stream.</p>
</li>
</ol>
<p>In the example above, we are using the <strong>es_datastream_name</strong> parameter to pull in VPC Flow logs through the <strong>logs-aws.vpcflow-default</strong> datastream. Depending on your use case, this parameter can be configured with one of the following types of logs:</p>
<ul>
<li>logs-aws.cloudfront_logs-default (AWS CloudFront logs)</li>
<li>logs-aws.ec2_logs-default (EC2 logs in AWS CloudWatch)</li>
<li>logs-aws.elb_logs-default (Amazon Elastic Load Balancing logs)</li>
<li>logs-aws.firewall_logs-default (AWS Network Firewall logs)</li>
<li>logs-aws.route53_public_logs-default (Amazon Route 53 public DNS queries logs)</li>
<li>logs-aws.route53_resolver_logs-default (Amazon Route 53 DNS queries &amp; responses logs)</li>
<li>logs-aws.s3access-default (Amazon S3 server access log)</li>
<li>logs-aws.vpcflow-default (AWS VPC flow logs)</li>
<li>logs-aws.waf-default (AWS WAF Logs)</li>
</ul>
<h3><em>Alternative approach using Terraform</em></h3>
<p>Using the &quot; <strong>aws_kinesis_firehose_delivery_stream</strong>&quot; resource in <strong>Terraform</strong> is another way to create a Kinesis Firehose delivery stream, allowing you to specify the delivery stream name, data source, and destination - in this case, an Elasticsearch HTTP endpoint. To authenticate, you'll need to provide the endpoint URL and an API key. Leveraging this Terraform resource is a fantastic way to automate and streamline your deployment process, resulting in greater consistency and efficiency.</p>
<p>Here's an example code that shows you how to create a Kinesis Firehose delivery stream with Terraform that sends data to an Elasticsearch HTTP endpoint:</p>
<pre><code class="language-hcl">resource &quot;aws_kinesis_firehose_delivery_stream&quot; “Elasticcloud_stream&quot; {
  name        = &quot;terraform-kinesis-firehose-ElasticCloud-stream&quot;
  destination = &quot;http_endpoint”
  s3_configuration {
    role_arn           = aws_iam_role.firehose.arn
    bucket_arn         = aws_s3_bucket.bucket.arn
    buffer_size        = 5
    buffer_interval    = 300
    compression_format = &quot;GZIP&quot;
  }
  http_endpoint_configuration {
    url        = &quot;https://cloud.elastic.co/&quot;
    name       = “ElasticCloudEndpoint&quot;
    access_key = “ElasticApi-key&quot;
    buffering_hints {
      size_in_mb = 5
      interval_in_seconds = 300
    }

   role_arn       = &quot;arn:Elastic_role&quot;
   s3_backup_mode = &quot;FailedDataOnly&quot;
  }
}
</code></pre>
<h3>Step 4: Configure VPC Flow Logs to send to Amazon Kinesis Data Firehose</h3>
<p>To complete the setup, you'll need to configure VPC Flow logs in the VPC where your application is deployed and send them to the Amazon Kinesis Data Firehose delivery stream you set up in Step 3.</p>
<p>Enabling VPC flow logs in AWS is a straightforward process that involves several steps. Here's a step-by-step details to enable VPC flow logs in your AWS account:</p>
<ol>
<li>
<p>Select the VPC for which you want to enable flow logs.</p>
</li>
<li>
<p>In the VPC dashboard, click on &quot;Flow Logs&quot; under the &quot;Logs&quot; section.</p>
</li>
<li>
<p>Click on the &quot;Create Flow Log&quot; button to create a new flow log.</p>
</li>
<li>
<p>In the &quot;Create Flow Log&quot; wizard, provide the following information:</p>
</li>
</ol>
<p>Choose the target for your flow logs: In this case, Amazon Kinesis Data Firehose in the same AWS account.</p>
<ul>
<li>Provide a name for your flow log.</li>
<li>Choose the VPC and the network interface(s) for which you want to enable flow logs.</li>
<li>Choose the flow log format: either AWS default or Custom format.</li>
</ul>
<ol start="5">
<li>
<p>Configure the IAM role for the flow logs. If you have an existing IAM role, select it. Otherwise, create a new IAM role that grants the necessary permissions for the flow logs.</p>
</li>
<li>
<p>Review the flow log configuration and click &quot;Create.&quot;</p>
</li>
</ol>
<p><img src="https://www.elastic.co/observability-labs/assets/images/aws-kinesis-data-firehose-observability-analytics/blog-elastic-flow-log-settings.png" alt="flow log settings" /></p>
<p>Create the VPC Flow log.</p>
<h3>Step 5: After a few minutes, check if flows are coming into Elastic</h3>
<p>To confirm that the VPC Flow logs are ingesting into Elastic, you can check the logs in Kibana. You can do this by searching for the index in the Kibana Discover tab and filtering the results by the appropriate index and time range. If VPC Flow logs are flowing in, you should see a list of documents representing the VPC Flow logs.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/aws-kinesis-data-firehose-observability-analytics/blog-elastic-expanded-document.png" alt="expanded document" /></p>
<h3>Step 6: Navigate to Kibana to see your logs parsed and visualized in the [Logs AWS] VPC Flow Log Overview dashboard</h3>
<p>Finally, there is an Elastic out-of-the-box (OOTB) VPC Flow logs dashboard that displays the top IP addresses that are hitting your VPC, their geographic location, time series of the flows, and a summary of VPC flow log rejects within the selected time frame. This dashboard can provide valuable insights into your network traffic and potential security threats.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/aws-kinesis-data-firehose-observability-analytics/blog-elastic-VPC-flow-log-map.png" alt="vpc flow log map" /></p>
<p><em>Note: For additional VPC flow log analysis capabilities, please refer to</em> <a href="https://www.elastic.co/blog/vpc-flow-logs-monitoring-analytics-observability"><em>this blog</em></a><em>.</em></p>
<h3>Step 7: Configure AWS Network Firewall Logs to send to Kinesis Firehose</h3>
<p>To create a Kinesis Data Firehose delivery stream for AWS Network firewall logs, first log in to the AWS Management Console, navigate to the Kinesis service, select &quot;Data Firehose&quot;, and follow the step-by-step instructions as shown in Step 3. Specify the Elasticsearch endpoint, API key, add a parameter (_ <strong>es_datastream_name=logs-aws.firewall_logs-default</strong> _), and create the delivery stream.</p>
<p>Second, to set up a Network Firewall rule group to send logs to the Kinesis Firehose, go to the Network Firewall section of the console, create a rule group, add a rule to allow traffic to the Kinesis endpoint, and attach the rule group to your Network Firewall configuration. Finally, test the configuration by sending traffic through the Network Firewall to the Kinesis Firehose endpoint and verify that logs are being delivered to your S3 bucket.</p>
<p>Kindly follow the instructions below to set up a firewall rule and logging.</p>
<ol>
<li>Set up a Network Firewall rule group to send logs to Amazon Kinesis Data Firehose:</li>
</ol>
<ul>
<li>Go to the AWS Management Console and select Network Firewall.</li>
<li>Click on &quot;Rule groups&quot; in the left menu and then click &quot;Create rule group.&quot;</li>
<li>Choose &quot;Stateless&quot; or &quot;Stateful&quot; depending on your requirements, and give your rule group a name. Click &quot;Create rule group.&quot;</li>
<li>Add a rule to the rule group to allow traffic to the Kinesis Firehose endpoint. For example, if you are using the us-east-1 region, you would add a rule like this:json</li>
</ul>
<pre><code class="language-json">{
  &quot;RuleDefinition&quot;: {
    &quot;Actions&quot;: [
      {
        &quot;Type&quot;: &quot;AWS::KinesisFirehose::DeliveryStream&quot;,
        &quot;Options&quot;: {
          &quot;DeliveryStreamArn&quot;: &quot;arn:aws:firehose:us-east-1:12387389012:deliverystream/my-delivery-stream&quot;
        }
      }
    ],
    &quot;MatchAttributes&quot;: {
      &quot;Destination&quot;: {
        &quot;Addresses&quot;: [&quot;api.firehose.us-east-1.amazonaws.com&quot;]
      },
      &quot;Protocol&quot;: {
        &quot;Numeric&quot;: 6,
        &quot;Type&quot;: &quot;TCP&quot;
      },
      &quot;PortRanges&quot;: [
        {
          &quot;From&quot;: 443,
          &quot;To&quot;: 443
        }
      ]
    }
  },
  &quot;RuleOptions&quot;: {
    &quot;CustomTCPStarter&quot;: {
      &quot;Enabled&quot;: true,
      &quot;PortNumber&quot;: 443
    }
  }
}
</code></pre>
<ul>
<li>Save the rule group.</li>
</ul>
<ol start="2">
<li>Attach the rule group to your Network Firewall configuration:</li>
</ol>
<ul>
<li>Go to the AWS Management Console and select Network Firewall.</li>
<li>Click on &quot;Firewall configurations&quot; in the left menu and select the configuration you want to attach the rule group to.</li>
<li>Scroll down to &quot;Associations&quot; and click &quot;Edit.&quot;</li>
<li>Select the rule group you created in Step 2 and click &quot;Save.&quot;</li>
</ul>
<ol start="3">
<li>Test the configuration:</li>
</ol>
<ul>
<li>Send traffic through the Network Firewall to the Kinesis Firehose endpoint and verify that logs are being delivered to your S3 bucket.</li>
</ul>
<h3>Step 8: Navigate to Kibana to see your logs parsed and visualized in the [Logs AWS] Firewall Log dashboard</h3>
<p><img src="https://www.elastic.co/observability-labs/assets/images/aws-kinesis-data-firehose-observability-analytics/blog-elastic-firewall-log-dashboard.png" alt="firewall log dashboard" /></p>
<h2>Wrapping up</h2>
<p>We’re excited to bring you this latest integration for AWS Cloud and Kinesis Data Firehose into production. The ability to consolidate logs and metrics to gain visibility across your cloud and on-premises environment is crucial for today’s distributed environments and applications.</p>
<p>From EC2, Cloudwatch, Lambda, ECS and SAR, <a href="https://www.elastic.co/integrations/data-integrations?solution=all-solutions&amp;category=aws">Elastic Integrations</a> allow you to quickly and easily get started with ingesting your telemetry data for monitoring, analytics, and observability. Elastic is constantly delivering frictionless customer experiences, allowing anytime, anywhere access to all of your telemetry data — this streamlined, native integration with AWS is the latest example of our commitment.</p>
<h2>Start a free trial today</h2>
<p>You can begin with a <a href="https://aws.amazon.com/marketplace/pp/prodview-voru33wi6xs7k">7-day free trial</a> of Elastic Cloud within the AWS Marketplace to start monitoring and improving your users' experience today!</p>
<p><em>The release and timing of any features or functionality described in this post remain at Elastic's sole discretion. Any features or functionality not currently available may not be delivered on time or at all.</em></p>
]]></content:encoded>
            <category>observability-labs</category>
            <enclosure url="https://www.elastic.co/observability-labs/assets/images/aws-kinesis-data-firehose-observability-analytics/image2.png" length="0" type="image/png"/>
        </item>
        <item>
            <title><![CDATA[Revolutionizing big data management: Unveiling the power of Amazon EMR and Elastic integration]]></title>
            <link>https://www.elastic.co/observability-labs/blog/big-data-management-amazon-emr-elastic-integration</link>
            <guid isPermaLink="false">big-data-management-amazon-emr-elastic-integration</guid>
            <pubDate>Tue, 26 Sep 2023 00:00:00 GMT</pubDate>
            <description><![CDATA[Amazon EMR allows you to easily run and scale big data workloads. With Elastic’s native integration, you'll find the confidence to monitor, analyze, and optimize your EMR clusters, opening up exciting opportunities for your data-driven initiatives.]]></description>
            <content:encoded><![CDATA[<p>In the dynamic realm of data processing, Amazon EMR takes center stage as an AWS-provided big data service, offering a cost-effective conduit for running Apache Spark and a plethora of other open-source applications. While the capabilities of EMR are impressive, the art of vigilant monitoring holds the key to unlocking its full potential. This blog post explains the pivotal role of monitoring Amazon EMR clusters, accentuating the transformative integration with Elastic&lt;sup&gt;®&lt;/sup&gt;.</p>
<p>Elastic can make it easier for organizations to transform data into actionable insights and stop threats quickly with unified visibility across your environment — so mission-critical applications can keep running smoothly no matter what. From a free trial and fast deployment to sending logs to Elastic securely and frictionlessly, all you need to do is point and click to capture, store, and search data from your AWS services.</p>
<h2>Monitoring EMR via Elastic Observability</h2>
<p>In this article, we will delve into the following key aspects:</p>
<ul>
<li><strong>Enabling EMR cluster metrics for Elastic integration:</strong> Learn the intricacies of configuring an EMR cluster to emit metrics that Elastic can effectively extract, paving the way for insightful analysis.</li>
<li><strong>Harnessing Kibana</strong> &lt;sup&gt;®&lt;/sup&gt; <strong>dashboards for EMR workload analysis:</strong> Discover the potential of utilizing Kibana dashboards to dissect metrics related to an EMR workload. By gaining a deeper understanding, we open the doors to optimization opportunities.</li>
</ul>
<h3>Key benefits of AWS EMR integration</h3>
<ul>
<li><strong>Comprehensive monitoring:</strong> Monitor the health and performance of your EMR clusters in real time. Track metrics related to cluster status and utilization, node status, IO, and many others, allowing you to identify bottlenecks and optimize your data processing.</li>
<li><strong>Log analysis:</strong> Dive deep into EMR logs with ease. Our integration enables you to collect and analyze logs from your clusters, helping you troubleshoot issues and gain valuable insights.</li>
<li><strong>Cost optimization:</strong> Understand the cost implications of your EMR clusters. By monitoring resource utilization, you can identify opportunities to optimize your cluster configurations and reduce costs.</li>
<li><strong>Alerting and notifications:</strong> Set up custom alerts based on EMR metrics and logs. Receive notifications when performance thresholds are breached, ensuring that you can take action promptly.</li>
<li><strong>Seamless integration:</strong> Our integration is designed for ease of use. Getting started is simple, and you can start monitoring your EMR clusters quickly.</li>
</ul>
<p>Accompanying these discussions is an illustrative solution architecture diagram, providing a visual representation of the intricacies and interactions within the proposed solution.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/big-data-management-amazon-emr-elastic-integration/elastic-blog-1-flowchart-aws-emr.png" alt="1" /></p>
<h2>How to get started</h2>
<p>Getting started with AWS EMR integration in Observability is easy. Here's a quick overview of the steps:</p>
<h3>Prerequisites and configurations</h3>
<p>If you intend to follow the steps outlined in this blog post, there are a few prerequisites and configurations that you should have in place beforehand.</p>
<ol>
<li>
<p>You will need an account on <a href="http://cloud.elastic.co/">Elastic Cloud</a> and a deployed stack and agent. Instructions for deploying a stack on AWS can be found <a href="https://www.elastic.co/guide/en/elastic-stack/current/installing-elastic-stack.html">here</a>. This is necessary for AWS EMR logging and analysis.</p>
</li>
<li>
<p>You will also need an AWS account with the necessary permissions to pull data from AWS. Details on the required permissions can be found in our <a href="https://docs.elastic.co/en/integrations/aws#aws-permissions">documentation</a>.</p>
</li>
<li>
<p>Finally, be sure to turn on EMR monitoring for the EMR cluster when you deploy the cluster.</p>
</li>
</ol>
<h3>Step 1: Create an account with Elastic</h3>
<p><a href="https://cloud.elastic.co/registration?fromURI=/home">Create an account on Elastic Cloud</a> by following the steps provided.</p>
<h3>Step 2: Add integration</h3>
<ol>
<li>Log in to your <a href="https://cloud.elastic.co/registration">Elastic Cloud on AWS</a> deployment.</li>
</ol>
<p><img src="https://www.elastic.co/observability-labs/assets/images/big-data-management-amazon-emr-elastic-integration/elastic-blog-2-free-trial.png" alt="2 free trial" /></p>
<ol start="2">
<li>Click on <strong>Add Integration</strong>. You will be navigated to a catalog of supported integrations.</li>
</ol>
<p><img src="https://www.elastic.co/observability-labs/assets/images/big-data-management-amazon-emr-elastic-integration/elastic-blog-3-welcome-home.png" alt="3 welcome home" /></p>
<ol start="3">
<li>Search and select <strong>Amazon EMR</strong>.</li>
</ol>
<p><img src="https://www.elastic.co/observability-labs/assets/images/big-data-management-amazon-emr-elastic-integration/elastic-blog-4-integrations.png" alt="4 integrations" /></p>
<h3>Step 3: Configure integration</h3>
<ol>
<li>
<p>Click on the <strong>Add Amazon EMR</strong> button and provide the required details.</p>
</li>
<li>
<p>Provide the required access credentials to connect to your EMR instance.</p>
</li>
<li>
<p>You can choose to collect EMR metrics, EMR logs via S3, or EMR logs via Cloudwatch.</p>
</li>
<li>
<p>Click on the <strong>Save and continue</strong> button at the bottom of the page.</p>
</li>
</ol>
<p><img src="https://www.elastic.co/observability-labs/assets/images/big-data-management-amazon-emr-elastic-integration/elastic-blog-5-amazon-emr.png" alt="5 amazon emr" /></p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/big-data-management-amazon-emr-elastic-integration/elastic-blog-6-add-amazon-emr.png" alt="6 add amazon emr integration" /></p>
<h3>Step 4: Analyze and monitor</h3>
<p>Explore the data using the out-of-the-box dashboards available for the integration. Select <strong>Discover</strong> from the Elastic Cloud top-level menu.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/big-data-management-amazon-emr-elastic-integration/elastic-blog-7-manage-deployment.png" alt="7 manage deployment" /></p>
<p>Or, create custom dashboards, set up alerts, and gain actionable insights into your EMR clusters' performance.</p>
<p>This integration streamlines the collection of vital metrics and logs, including Cluster Status, Node Status, IO, and Cluster Capacity. Some metrics gathered include:</p>
<ul>
<li><strong>IsIdle:</strong> Indicates that a cluster is no longer performing work, but is still alive and accruing charges</li>
<li><strong>ContainerAllocated:</strong> The number of resource containers allocated by the ResourceManager</li>
<li><strong>ContainerReserved:</strong> The number of containers reserved</li>
<li><strong>CoreNodesRunning:</strong> The number of core nodes working</li>
<li><strong>CoreNodesPending:</strong> The number of core nodes waiting to be assigned</li>
<li><strong>MRActiveNodes:</strong> The number of nodes presently running MapReduce tasks or jobs</li>
<li><strong>MRLostNodes:</strong> The number of nodes allocated to MapReduce that have been marked in a LOST state</li>
<li><strong>HDFSUtilization:</strong> The percentage of HDFS storage currently used</li>
<li><strong>HDFSBytesRead/Written:</strong> The number of bytes read/written from HDFS (This metric aggregates MapReduce jobs only, and does not apply for other workloads on Amazon EMR.)</li>
<li><strong>TotalUnitsRequested/TotalNodesRequested/TotalVCPURequested:</strong> The target total number of units/nodes/vCPUs in a cluster as determined by managed scaling</li>
</ul>
<p><img src="https://www.elastic.co/observability-labs/assets/images/big-data-management-amazon-emr-elastic-integration/elastic-blog-8-pie-graphs.png" alt="8 pie graph" /></p>
<h2>Conclusion</h2>
<p>Elastic is committed to fulfilling all your observability requirements, offering an effortless experience. Our integrations are designed to simplify the process of ingesting telemetry data, granting you convenient access to critical information for monitoring, analytics, and observability. The native AWS EMR integration underscores our dedication to delivering seamless solutions for your data needs. With this integration, you'll find the confidence to monitor, analyze, and optimize your EMR clusters, opening up exciting opportunities for your data-driven initiatives.</p>
<h2>Start a free trial today</h2>
<p>Start your own <a href="https://aws.amazon.com/marketplace/pp/prodview-voru33wi6xs7k?trk=5fbc596b-6d2a-433a-8333-0bd1f28e84da%E2%89%BBchannel=el">7-day free trial</a> by signing up via <a href="https://aws.amazon.com/marketplace/pp/prodview-voru33wi6xs7k?trk=5fbc596b-6d2a-433a-8333-0bd1f28e84da&amp;sc_channel=el&amp;ultron=gobig&amp;hulk=regpage&amp;blade=elasticweb&amp;gambit=mp-b">AWS Marketplace</a> and quickly spin up a deployment in minutes on any of the <a href="https://www.elastic.co/guide/en/cloud/current/ec-reference-regions.html#ec_amazon_web_services_aws_regions">Elastic Cloud regions on AWS</a> around the world. Your AWS Marketplace purchase of Elastic will be included in your monthly consolidated billing statement and will draw against your committed spend with AWS.</p>
<p><em>The release and timing of any features or functionality described in this post remain at Elastic's sole discretion. Any features or functionality not currently available may not be delivered on time or at all.</em></p>
]]></content:encoded>
            <category>observability-labs</category>
            <enclosure url="https://www.elastic.co/observability-labs/assets/images/big-data-management-amazon-emr-elastic-integration/21-cubes.jpeg" length="0" type="image/jpeg"/>
        </item>
        <item>
            <title><![CDATA[Getting started with the Elastic AI Assistant for Observability and Amazon Bedrock]]></title>
            <link>https://www.elastic.co/observability-labs/blog/elastic-ai-assistant-observability-amazon-bedrock</link>
            <guid isPermaLink="false">elastic-ai-assistant-observability-amazon-bedrock</guid>
            <pubDate>Fri, 03 May 2024 00:00:00 GMT</pubDate>
            <description><![CDATA[Follow this step-by-step process to get started with the Elastic AI Assistant for Observability and Amazon Bedrock.]]></description>
            <content:encoded><![CDATA[<p>Elastic recently released version <a href="https://www.elastic.co/blog/whats-new-elastic-8-13-0">8.13, which includes the general availability of Amazon Bedrock integration for the Elastic AI Assistant for Observability</a>. This blog post will walk through the step-by-step process of setting up the Elastic AI Assistant with Amazon Bedrock. Then, we’ll show you how to add content to the AI Assistant’s knowledge base to demonstrate how the power of Elasticsearch combined with Amazon Bedrock can supercharge the answers Elastic AI Assistant provides so that they are uniquely specific to your needs.</p>
<p>Managing applications and the infrastructure they run on requires advanced observability into the diverse types of data involved like logs, traces, profiles, and metrics. General purpose generative AI large language models (LLMs) offer a new capability to provide human readable guidance to your observability questions. However, they have limitations. Specifically, when it comes to providing answers about your application’s distinct observability data like real-time metrics, the LLMs require additional context to provide answers that will help to actually resolve issues. This is a limitation that the Elastic AI Assistant for Observability can uniquely solve.</p>
<p>Elastic Observability, serving as a central datastore of all the observability data flowing from your application, combined with the Elastic AI Assistant gives you the ability to generate a context window that can inform an LLM’s responses and vastly improve the answers it provides. For example, when you ask the Elastic AI Assistant a question about a specific issue happening in your application, it gathers up all the relevant details — current errors captured from logs or a related runbook that your team has stored in the Elastic AI Assistant’s knowledge base. Then, it sends that information to the Amazon Bedrock LLM as a context window from which it can better answer your observability questions.</p>
<p>Read on to follow the steps for setting up the Elastic AI Assistant for yourself.</p>
<h2>Set up the Elastic AI Assistant for Observability: Create an Amazon Bedrock connector in Elastic Cloud</h2>
<p>Start by creating an Elastic Cloud 8.13 deployment via the <a href="https://aws.amazon.com/marketplace/pp/prodview-voru33wi6xs7k">AWS marketplace</a>. If you’re a new user of Elastic Cloud, you can create a new deployment with a 7-day free trial.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/1.png" alt="1" /></p>
<p>Sign in to the Elastic Cloud deployment you’ve created. From the top level menu, select <strong>Stack Management</strong>.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/2.png" alt="2" /></p>
<p>Select <strong>Connectors</strong>.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/3.png" alt="3" /></p>
<p>Click the <strong>Create connector</strong> button.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/4.png" alt="4" /></p>
<h2>Enable Amazon Bedrock model access</h2>
<p>For populating the required connector settings, enable Amazon Bedrock model access in the AWS console using the following steps.</p>
<p>In a new browser tab, open <a href="https://console.aws.amazon.com/bedrock/">Amazon Bedrock</a> and click the <strong>Get started</strong> button.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/5.png" alt="5" /></p>
<p>Currently, access to the Amazon Bedrock foundation models is granted by requesting access using the Bedrock <strong>Model access</strong> section in the AWS console.</p>
<p>Select <strong>Model access</strong> from the navigation menu.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/6.png" alt="6" /></p>
<p>To request access, select the foundation models that you want to access and click the <strong>Save Changes</strong> button. For this blog post, we will choose the Anthropic Claude models.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/7.png" alt="7" /></p>
<p>Once access is granted, the <strong>Manage model</strong> <strong>access</strong> settings will indicate that access has been granted.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/8.png" alt="8" /></p>
<h3>Create AWS IAM User</h3>
<p>Create an <a href="https://aws.amazon.com/iam/">IAM</a> user and assign it a role with <a href="https://docs.aws.amazon.com/aws-managed-policy/latest/reference/AmazonBedrockFullAccess.html">Amazon Bedrock full access</a> and also <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html">generate an IAM access key and secret key</a> in the console. If you already have an IAM user with a generated access key and secret key, you can use the existing credentials to access Amazon Bedrock.</p>
<h3>Configure Elastic connector to use Amazon Bedrock</h3>
<p>Back in the Elastic Cloud deployment create connector flyout, select the connector for Amazon Bedrock.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/9.png" alt="9" /></p>
<p>Enter a <strong>Name</strong> of your choice for the connector. Also, enter the <strong>Access Key</strong> and <strong>Key Secret</strong> that you copied in a previous step. Click the <strong>Save &amp; test</strong> button to create the connector.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/10.png" alt="10" /></p>
<p>Within the <strong>Edit Connector</strong> flyout window, click the <strong>Run</strong> button to confirm that the connector configuration is valid and can successfully connect to your Amazon Bedrock instance.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/11.png" alt="11" /></p>
<p>You should see confirmation that the connector test was successful.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/12.png" alt="12" /></p>
<h3>Add an example logs record</h3>
<p>Now that the connector is configured, let's add a logs record to demonstrate how the Elastic AI Assistant can help you to better understand the diverse types of information contained within logs.</p>
<p>Use the Elastic Dev Tools to add a single logs record. Click the top-level menu and select <strong>Dev Tools</strong>.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/13.png" alt="13" /></p>
<p>Within the console area of Dev Tools, enter the following POST statement:</p>
<pre><code class="language-json">POST /logs-elastic_agent-default/_doc
{
    &quot;message&quot;: &quot;Status(StatusCode=\&quot;BadGateway\&quot;, Detail=\&quot;Error: The server encountered a temporary error and could not complete your request\&quot;).&quot;,
    &quot;@timestamp&quot;: &quot;2024-04-21T10:33:00.884Z&quot;,
    &quot;log&quot;: {
   	 &quot;level&quot;: &quot;error&quot;
    },
    &quot;service&quot;: {
   	 &quot;name&quot;: &quot;proxyService&quot;
    },
    &quot;host&quot;: {
   	 &quot;name&quot;: &quot;appserver-2&quot;
    }
}
</code></pre>
<p>Then run the POST command by clicking the green <strong>Run</strong> button.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/14.png" alt="14" /></p>
<p>You should see a 201 response confirming that the example logs record was successfully created.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/15.png" alt="15" /></p>
<h3>Use the Elastic AI Assistant</h3>
<p>Now that you have a log entry, let’s use the AI Assistant to see how it interacts with logs data. Click the top-level menu and select <strong>Observability</strong>.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/16.png" alt="16" /></p>
<p>Select <strong>Logs</strong> <strong>Explorer</strong> under Observability.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/17.png" alt="17" /></p>
<p>In the Logs Explorer search box, enter the text “badgateway” and press the <strong>Enter</strong> key to perform the search.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/18.png" alt="18" /></p>
<p>Click the <strong>View all matches</strong> button to include all search results.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/19.png" alt="19" /></p>
<p>You should see the one log record that you previously inserted via Dev Tools. Click the expand icon in the <strong>actions</strong> column to see the log record’s details.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/20.png" alt="20" /></p>
<p>You should see the expanded view of the logs record. Let’s use the AI Assistant to summarize it. Click on the <strong>What's this message?</strong> button.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/21.png" alt="21" /></p>
<p>We get a fairly generic answer back. Depending on the exception or error we're trying to analyze, this can still be really useful, but we can improve this response by adding additional documentation to the AI Assistant knowledge base.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/22.png" alt="22" /></p>
<p>Let’s add an entry in AI Assistant’s knowledge base to improve its understanding of this specific logs message.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/23.png" alt="23" /></p>
<p>Click the <strong>AI Assistant</strong> button at the top right of the window.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/24.png" alt="24" /></p>
<p>Click the <strong>Install Knowledge base</strong> button.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/25.png" alt="25" /></p>
<p>Click the top-level menu and select <strong>Stack Management</strong>.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/26.png" alt="26" /></p>
<p>Then select <strong>AI Assistants</strong>.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/27.png" alt="27" /></p>
<p>Click <strong>Elastic AI Assistant for Observability</strong>.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/28.png" alt="28" /></p>
<p>Select the <strong>Knowledge base</strong> tab.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/29.png" alt="29" /></p>
<p>Click the <strong>New entry</strong> button and select <strong>Single entry</strong>.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/30.png" alt="30" /></p>
<p>Give it the <strong>Name</strong> “proxyservice” and enter the following text as the <strong>Contents</strong> :</p>
<pre><code class="language-markdown">
​​I have the following runbook located on Github. Store this information in your knowledge base and always include the link to the runbook in your response if the topic is related to a bad gateway error.

Runbook Link: https://github.com/elastic/observability-aiops/blob/main/ai_assistant/runbooks/slos/502-errors.md

Runbook Title: Handling 502 Bad Gateway Errors

Summary: This is likely an issue with Nginx proxy configuration

Body: This runbook provides instructions for diagnosing and resolving 502 Bad Gateway errors in your system.
</code></pre>
<p>Click <strong>Save</strong> to save the new knowledge base entry.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/31.png" alt="31" /></p>
<p>Now let’s go back to the Observability Logs Explorer. Click the top-level menu and select <strong>Observability</strong>.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/32.png" alt="32" /></p>
<p>Then select <strong>Explorer</strong> under <strong>Logs</strong>.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/33.png" alt="33" /></p>
<p>Expand the same logs entry as you did previously and click the <strong>What’s this message?</strong> button.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/34.png" alt="34" /></p>
<p>The response you get now should be much more relevant.</p>
<p><img src="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/35.png" alt="35" /></p>
<h2>Try out the Elastic AI Assistant with a knowledge base filled with your own data</h2>
<p>Now you’ve seen the complete process of connecting the Elastic AI Assistant to Amazon Bedrock. You’ve also seen how to use the AI Assistant’s knowledge base to store custom remediation documentation like runbooks that the AI Assistant can leverage to generate more helpful responses. Steps like this can help you remediate issues more quickly when they happen. Try out the Elastic AI Assistant with your own logs and custom knowledge base.</p>
<p>Start a <a href="https://aws.amazon.com/marketplace/pp/prodview-voru33wi6xs7k?trk=5fbc596b-6d2a-433a-8333-0bd1f28e84da%E2%89%BBchannel=el">7-day free trial</a> by signing up via <a href="https://aws.amazon.com/marketplace/pp/prodview-voru33wi6xs7k">AWS Marketplace</a> and quickly spin up a deployment in minutes on any of the <a href="https://www.elastic.co/guide/en/cloud/current/ec-reference-regions.html#ec_amazon_web_services_aws_regions">Elastic Cloud regions on AWS</a> around the world.</p>
<p><em>The release and timing of any features or functionality described in this post remain at Elastic's sole discretion. Any features or functionality not currently available may not be delivered on time or at all.</em></p>
<p><em>In this blog post, we may have used or referred to third party generative AI tools, which are owned and operated by their respective owners. Elastic does not have any control over the third party tools and we have no responsibility or liability for their content, operation or use, nor for any loss or damage that may arise from your use of such tools. Please exercise caution when using AI tools with personal, sensitive or confidential information. Any data you submit may be used for AI training or other purposes. There is no guarantee that information you provide will be kept secure or confidential. You should familiarize yourself with the privacy practices and terms of use of any generative AI tools prior to use.</em></p>
<p><em>Elastic, Elasticsearch, ESRE, Elasticsearch Relevance Engine and associated marks are trademarks, logos or registered trademarks of Elasticsearch N.V. in the United States and other countries. All other company and product names are trademarks, logos or registered trademarks of their respective owners.</em></p>
]]></content:encoded>
            <category>observability-labs</category>
            <enclosure url="https://www.elastic.co/observability-labs/assets/images/elastic-ai-assistant-observability-amazon-bedrock/AI_hand.jpg" length="0" type="image/jpg"/>
        </item>
    </channel>
</rss>