0.1 C
New York
Thursday, March 19, 2026

Amazon OpenSearch Serverless monitoring: A CloudWatch setup information


Amazon OpenSearch Serverless simplifies the deployment and administration of OpenSearch workloads by routinely scaling based mostly in your utilization patterns. The service considers key metrics comparable to shard utilization, storage consumption, and CPU utilization whereas sustaining millisecond-level response occasions, with the simplicity of a serverless surroundings.

Whereas OpenSearch Serverless handles scaling routinely, implementing strong monitoring stays essential for understanding utilization patterns, optimizing prices, serving to to make sure efficiency, and sustaining reliability. Proactive monitoring helps organizations detect important points with the functions or infrastructure in actual time and establish root causes rapidly.

This submit is a part of our Amazon OpenSearch service monitoring collection, specializing in OpenSearch Serverless workloads and deployments. On this submit, we discover generally used Amazon CloudWatch metrics and alarms for OpenSearch Serverless, strolling by way of the method of choosing related metrics, setting acceptable thresholds, and configuring alerts. This information will give you a complete monitoring technique that enhances the serverless nature of your OpenSearch deployment whereas sustaining full operational visibility.

Key advantages of CloudWatch monitoring for OpenSearch Serverless

Implementing CloudWatch monitoring in your OpenSearch Serverless collections affords a number of key benefits:

  • Close to real-time efficiency monitoring – CloudWatch offers close to real-time monitoring, enabling you to trace your OpenSearch Serverless collections’ efficiency as they function. This fast visibility permits for swift detection of anomalies or efficiency points, enabling immediate response to potential issues.
  • Environment friendly error prognosis – You’ll be able to rapidly establish and deal with widespread errors with out intensive log evaluation. As an example, by monitoring ingestion request errors, you possibly can preemptively mitigate bulk indexing request failures.
  • Proactive alerting system – Use the CloudWatch alarm performance along side Amazon Easy Notification Service (SNS) to arrange customized alerts. By defining particular thresholds for important metrics, you possibly can obtain prompt notifications by way of e mail or SMS when your OpenSearch Serverless collections method or exceed these limits.
  • Complete historic evaluation – The info retention capabilities of CloudWatch enable for in-depth historic evaluation. This lets you establish long-term efficiency developments, acknowledge recurring patterns in useful resource utilization and optimize workload distribution based mostly on historic insights.

Resolution overview

Understanding which metrics to observe in OpenSearch Serverless helps optimize your system’s efficiency and reliability. This information explains the important thing metrics to observe, their significance, the best way to decide acceptable thresholds, and the step-by-step course of for establishing alarms. Understanding these fundamentals will aid you set up efficient monitoring in your OpenSearch Serverless collections and assist preserve optimum efficiency and reliability.

Stipulations

Earlier than getting began, you have to have the next conditions:

CloudWatch metrics and advisable alarms for OpenSearch Serverless

The next desk summarizes key CloudWatch metrics for OpenSearch Serverless, together with advisable alarm thresholds, metric descriptions, and relevant workload varieties.

AlarmMetric StageMetric DescriptionAlarm DescriptionUse case
IndexingOCU most is >= 10 for five minutes, three consecutive occasionsAccount Stage

Serverless compute capability is measured in OpenSearch Compute Models (OCUs). Every OCU is a mix of 6 GiB of reminiscence and corresponding digital CPU (vCPU), along with information switch to Amazon Easy Storage Service (Amazon S3).

The IndexingOCU metric studies the variety of OCUs used for information ingestion throughout all collections.

This alarm will warn you when Indexing OCUs scale upto / past 10 for greater than quarter-hour.Monitor and Optimize Prices
SearchOCU most is >= 10 for five minutes, three consecutive occasionsAccount Stage

Serverless compute capability is measured in OCUs. Every OCU is a mix of 6 GiB of reminiscence and corresponding digital CPU (vCPU), along with information switch to Amazon S3.

The SearchOCU metric studies the variety of OCUs used to look assortment information throughout all collections.

This alarm will warn you when Search OCUs scale upto / past 10 for greater than quarter-hour.Monitor and Optimize Prices
IngestionRequestLatency most is >= 3 secs for 1 minutes, 5 consecutive occasions.Assortment StageThe IngestionRequestLatency metric studies the latency, in seconds, for bulk write operations to a set.This alarm displays the utmost latency of bulk write operations to a set. It triggers when the utmost IngestionRequestLatency exceeds 3 seconds for 5 consecutive 1-minute intervals (for a complete of 5 minutes). This means a sustained efficiency degradation in information ingestion operations, which might impression software efficiency and information availability.This metric is likely to be essential to observe for log-based workloads, the place indexing time is important.
SearchRequestLatency most is >= 2 secs for 1 minutes, 5 consecutive occasions.Assortment StageThe SearchRequestLatency metric studies the latency, in seconds, that it takes to finish a search operation in opposition to a set.This alarm displays the utmost latency of search operations in opposition to a set. It triggers when the utmost SearchRequestLatency exceeds 2 seconds for 5 consecutive 1-minute intervals (for a complete of 5 minutes). Constantly excessive search latency signifies efficiency points that would degrade consumer expertise and software responsiveness.This metric is likely to be essential to observe for vector and search-based workloads, the place search time is important.
IngestionRequestErrors sum is >= 100 errors for 1 minute, 5 consecutive occasionsAssortment StageThe IngestionRequestErrors metric studies the full variety of bulk indexing request errors to a set. OpenSearch Serverless emits this metric when there are bulk indexing request failures, comparable to an authentication or availability problem.This alarm displays the full depend of failed bulk indexing operations to a set. It triggers when the variety of IngestionRequestErrors equals or exceeds 100 errors for 5 consecutive 1-minute intervals (for a complete of 5 minutes).Persistent ingestion errors point out systemic points that would result in information loss or inconsistency.
SearchRequestErrors sum is >= 50 errors for 1 minute, 5 consecutive occasionsAssortment StageThe SearchRequestErrors metric studies the full variety of question errors per minute for a set.This alarm displays the full depend of failed search question operations in a set. It triggers when the variety of SearchRequestErrors equals or exceeds 50 errors for 5 consecutive 1-minute intervals (for a complete of 5 minutes).Persistent search errors point out potential points that would impression software performance and consumer expertise.
ActiveCollection minimal is 0 for 1 minutes, three consecutive occasions.Assortment StageThis metric signifies whether or not a set is energetic. A price of 1 implies that the gathering is in an ACTIVE state. This worth is emitted upon profitable creation of a set and stays 1 till you delete the gathering. The metric can’t have a price of 0.The alarm triggers when the metric is lacking for 3 consecutive 1-minute intervals (for a complete of three minutes). As a result of an energetic assortment all the time emits a price of 1, lacking information signifies the gathering has been deleted or is experiencing severe points.
Observe: Make certain to setup the CloudWatch alarm so that it’s going to deal with lacking information as breaching.
Monitor Availability of Assortment

The precise threshold values talked about are examples. Nonetheless, it’s possible you’ll want to regulate these thresholds based mostly on the distinctive necessities and SLAs of your individual functions and workloads working on OpenSearch Serverless.

To resolve when to boost the worldwide OCU limits, you need to recurrently evaluate the IndexingOCU and SearchOCU metrics on the account stage. Should you discover the metrics constantly approaching the set threshold, it’s a very good indication that you need to think about rising the general account limits to accommodate your rising utilization.

Moreover, monitor the collection-level metrics like IngestionRequestLatency and SearchRequestLatency. Should you discover sure collections have constantly excessive latency, it is likely to be an indication that the OCU allocation for these particular collections is inadequate. In such circumstances, you would think about rising the OCU limits for these high-usage collections, reasonably than elevating the worldwide account limits.

By carefully monitoring each the account-level and collection-level metrics, you may make knowledgeable selections about when and the best way to regulate your OCU limits to take care of optimum efficiency and value effectivity in your OpenSearch Serverless deployment.

Steps to create a CloudWatch alarm

CloudWatch Alarms could be created utilizing any of the next strategies:

Detailed steps and a / pattern code snippet for every technique are offered within the following sections.

Utilizing the console

The AWS Administration Console offers a user-friendly, visible interface for creating CloudWatch alarms. Comply with these step-by-step directions to arrange your alarm by way of the console.

  1. Navigate to the CloudWatch console
  2. Within the navigation pane, select Alarms after which, All alarms.
  3. Select Create alarm.

Create an alarm

  1. Select Choose Metric.
  2. Choose the namespace AOSS 

Choose CloudWatch Namespace

  1. To setup alerting on IndexingOCU throughout all collections, navigate to ClientId and choose the metric.
  2. Beneath Circumstances:
    1. For Statistic: Choose Most.
    2. For Interval: Choose 5 minutes.
    3. For Threshold sort: Select Static and Higher.

Specify metric and conditions

  1. Select Subsequent. Beneath Notification, choose an SNS matter to inform when the alarm is in ALARM state, OK state, or INSUFFICIENT_DATA state.

Configure Actions

  1. When completed, select Subsequent. Enter a reputation and outline for the alarm. The identify should comprise solely UTF-8 characters, and may’t comprise ASCII management characters. The outline can embrace markdown formatting, which is displayed solely within the alarm Particulars tab within the CloudWatch console. The markdown could be helpful so as to add hyperlinks to runbooks or different inner assets. Then select Subsequent.
  2. Beneath Preview and create, verify that the knowledge and situations are what you need, then select Create alarm.

For detailed documentation, check with Create a CloudWatch alarm based mostly on a static threshold.

Utilizing the AWS CLI

For many who favor command-line interfaces or have to automate alarm creation, the AWS CLI affords an environment friendly various. This part demonstrates the best way to create a CloudWatch alarm utilizing a single CLI command.

To arrange a CloudWatch alarm utilizing the AWS CLI, you should use the put-metric-alarm command. The next instance demonstrates the best way to create an alarm that sends an Amazon SNS e mail when the IndexingOCU exceeds 2 for quarter-hour on the account stage. Exchange [region] and [account-id] together with your AWS Area and account ID.

aws cloudwatch put-metric-alarm 
--alarm-description '# IndexingOCU scaling out' 
--actions-enabled 
--alarm-actions 'arn:aws:sns:[region]:[account-id]:SecurityHubRecurringSummary' 
--metric-name 'IndexingOCU' 
--namespace 'AWS/AOSS' 
--statistic 'Most' 
--dimensions '[{"Name":"ClientId","Value":"[account-id]"}]' 
--period 300 
--evaluation-periods 3 
--datapoints-to-alarm 3 
--threshold 2 
--comparison-operator 'GreaterThanThreshold' 
--treat-missing-data 'ignore'

CloudFormation JSON

Infrastructure as Code (IaC) allows version-controlled, repeatable deployments. This JSON template exhibits the best way to outline a CloudWatch alarm utilizing AWS CloudFormation, appropriate for individuals who favor JSON syntax for his or her IaC implementations.

Exchange [region] and [account-id] together with your AWS Area and account ID.

{
    "Sort": "AWS::CloudWatch::Alarm",
    "Properties": {
        "AlarmDescription": "# IndexingOCU scaling out",
        "ActionsEnabled": true,
        "OKActions": [],
        "AlarmActions": [
            "arn:aws:sns:[region]:[account-id]:SecurityHubRecurringSummary"
        ],
        "InsufficientDataActions": [],
        "MetricName": "IndexingOCU",
        "Namespace": "AWS/AOSS",
        "Statistic": "Most",
        "Dimensions": [
            {
                "Name": "ClientId",
                "Value": "[account-id]"
            }
        ],
        "Interval": 300,
        "EvaluationPeriods": 3,
        "DatapointsToAlarm": 3,
        "Threshold": 2,
        "ComparisonOperator": "GreaterThanThreshold",
        "TreatMissingData": "ignore"
    }
}

CloudFormation YAML

For groups that favor YAML’s extra readable format, this part offers the equal CloudFormation template in YAML. The template creates the identical CloudWatch alarm with similar configurations because the JSON model.

Exchange [region] and [account-id] together with your AWS Area and account ID.

Sort: AWS::CloudWatch::Alarm
Properties:
    AlarmDescription: "# IndexingOCU scaling out"
    ActionsEnabled: true
    OKActions: []
    AlarmActions:
        - arn:aws:sns:[region]:[account-id]:SecurityHubRecurringSummary
    InsufficientDataActions: []
    MetricName: IndexingOCU
    Namespace: AWS/AOSS
    Statistic: Most
    Dimensions:
        - Identify: ClientId
          Worth: "[account-id]"
    Interval: 300
    EvaluationPeriods: 3
    DatapointsToAlarm: 3
    Threshold: 2
    ComparisonOperator: GreaterThanThreshold
    TreatMissingData: ignore

CloudWatch dashboards

You need to use Amazon CloudWatch dashboards to observe a number of assets in a unified view. For instance, the next dashboard offers a consolidated view of OpenSearch Serverless OCU utilization, serving to you observe and handle prices.

View dashboards

Clear up

To keep away from incurring unintended future costs, delete the next assets that have been created as a part of resolution walk-through of this submit:

  • CloudWatch alarms
  • CloudFormation stacks
  • SNS matters

Conclusion

Efficient monitoring helps preserve optimum efficiency and reliability of your OpenSearch Serverless collections. By implementing the CloudWatch alarms and monitoring methods outlined on this submit, you possibly can work in the direction of proactively figuring out and responding to efficiency points earlier than they impression your functions, optimize prices by monitoring OCU utilization patterns, assist excessive availability aims by monitoring assortment well being and error charges, and assist preserve constant efficiency by way of latency monitoring. Keep in mind that the thresholds prompt on this information function a place to begin, you need to regulate them based mostly in your particular use circumstances, efficiency necessities, and finances constraints. Common evaluate and refinement of those alarms will aid you preserve an environment friendly and cost-effective OpenSearch Serverless deployment.

Associated hyperlinks

Monitoring Amazon OpenSearch Serverless

Create a CloudWatch alarm based mostly on a static threshold


Concerning the authors

Urmila Iyer

Urmila Iyer

Urmila is a Technical Account Supervisor at AWS, the place she companions with enterprise prospects to know their enterprise aims and architect options that drive significant outcomes. With 15 years of expertise in IT, together with 6 years at AWS, she makes a speciality of data-driven options, bringing enthusiasm and experience to information analytics initiatives utilizing OpenSearch and real-time analytics platforms.

Parth Shah

Parth Shah

Parth is a Senior Options Architect at AWS captivated with fixing advanced information challenges for strategic prospects. As a analytics fanatic, he helps organizations make sense of their information by way of revolutionary cloud options, with deep experience in OpenSearch implementations.
Outdoors of labor, he enjoys spending time with household, exploring totally different cuisines and taking part in cricket.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles