OpenSearch alerting and anomaly detection

OpenSearch alerting and anomaly detection turn logs and metrics into notifications and unusual-pattern signals inside your own cluster. This page covers how to plan, configure and tune them so the alerts teams receive stay actionable.

On this page

What OpenSearch alerting and anomaly detection do and when teams need them

Teams need OpenSearch alerting and anomaly detection when logs or metrics already land in OpenSearch but someone still has to watch dashboards to notice problems, or when alerts fire so often that real incidents get lost. The alerting features turn known conditions into automatic checks, and the anomaly detection feature flags behavior that departs from a learned baseline without a rule written in advance. Both sit inside the Apache 2.0 licensed OpenSearch software, and the OpenSearch FAQ does not describe a paid edition that unlocks them.

The building blocks are monitors, triggers and notification channels. A monitor runs a query on a schedule against indexes you choose, a trigger defines the condition on that query result that counts as an alert, and a notification channel sends the alert to a destination such as email, chat or a webhook. Anomaly detectors take a different route: they use the Random Cut Forest algorithm to model normal values in a time-series feature, so you do not have to set a fixed threshold for every metric. Each option answers a different question, so the choice depends on whether you can name the failure condition ahead of time.

Before you enable either, confirm which of these your team will own: who defines thresholds, who receives each channel, and who reviews detector results. Confirm the features and their supported settings against the documentation for the exact OpenSearch version you will run, since they change between minor releases. Expect the design work on thresholds, routing and tuning to take more effort than the initial configuration, because noisy alerts are the usual reason these features get switched off.

Configuration options and when each fits

This table compares the monitor types, trigger conditions, notification channels and anomaly detector designs available for OpenSearch alerting, with the fit, main trade-off and upkeep for each. Read each row against the log or metric source you plan to watch, since the query shape and data volume usually decide the choice. The main takeaway is that broader monitors and detectors cover more ground but need more tuning to stay quiet.

OptionBest fitMain trade-offWhat the team must maintain
Per query monitorThreshold or count checks over a time window, such as error counts for one serviceReturns aggregate results, so it does not tell you which individual documents matchedQuery, time range and trigger threshold for each monitor, reviewed when log volume or field names change
Per document monitorAlerting on individual events that match a condition, such as a specific login failure patternCan generate many notifications during a burst, which adds alert fatigue riskDocument-level queries, suppression or grouping rules, and an owner for each high-volume match
Bucket-level monitorGrouping results by a field, such as alerting per host or per user when a count crosses a limitQuery complexity and per-bucket trigger logic rise with the number of groupsAggregation fields, bucket selectors and the grouping keys that match how assets are named
Composite monitorCombining results from several monitors into one incident, such as correlating two signalsHarder to test and debug because a failure may come from any child monitorChild monitor list, combination logic and documentation of the incident it represents
Trigger conditionsDefining when a monitor fires, using thresholds, counts or bucket filtersThresholds set too low cause noise, and thresholds set too high can hide real problemsThreshold values with a recorded reason, plus review after each change in traffic pattern
Notification channelsRouting alerts to chat, email, webhook or ticketing destinations used by the response teamEach channel has its own delivery, credential and message format limits to confirm in your versionChannel configuration, credentials, rotation schedule and test notifications after upgrades
Single stream anomaly detectorOne metric or log count series where you want deviations from its normal patternSimpler to set up, but it does not separate behavior across hosts, users or servicesFeature definition, detector interval and periodic review of whether the baseline still fits
Multi-entity anomaly detectorComparing behavior across many entities, such as hosts, accounts or services, each with its own baselineNeeds a categorical field with stable values and more data per entity before baselines are usefulEntity field mapping, cardinality checks and handling of new or retired entities

How to set up alerting and anomaly detection step by step

This sequence takes an OpenSearch cluster from a confirmed plugin and mapping baseline to working monitors, notifications and Random Cut Forest detectors, with a check at each step so the team knows which part works before the next one depends on it.

  1. Confirm plugins and index mappings

    The platform team checks that the Alerting, Alerting Dashboards, and Anomaly Detection plugins are installed on every cluster that will run monitors, and that the version matches the OpenSearch release in use. Then they review the index mappings for the log or metric indexes that will feed alerts, confirming that the timestamp field is mapped as a date and that the fields used in queries are mapped as keyword or numeric types where aggregations depend on them. Check: the plugin list from the cluster returns the expected plugins on every node, and a sample document shows the timestamp and query fields with the intended types. Confirm the exact plugin names and compatibility with your release in the install and plugin documentation before you start.

  2. Define the data source and time field

    Decide which index pattern, alias or data stream the monitor will query, and which field defines the event time. Use the same time field for monitors and detectors so that time windows line up across both. The owner of the log source confirms that the field is populated consistently, including time zone handling and ingest delay. Check: a search against the chosen source, filtered to the last hour, returns documents whose timestamps match the expected arrival times, and the team has written down the source name, time field and expected ingest delay.

  3. Build a monitor and test its query

    Create a query-level or extraction-query monitor in Alerting Dashboards, or through the Alerting API, that counts or aggregates events over a defined time window. Run the query in the monitor preview before saving it. Keep the first version narrow, for example one service or one error class, so that results are easy to verify. Check: the preview returns the count or aggregation value you get when you run the same query in Discover, and the monitor shows the expected result for a window that you know contains matching events.

  4. Add triggers and action templates

    Add a trigger to the monitor with a condition that compares the query result to a threshold you have agreed with the service owner. Write the action message template using the message variables the plugin provides, so that each notification names the monitor, the trigger, the value and a link or identifier for the affected system. Check: the trigger preview evaluates to true for a window with known matching events and false for a quiet window, and the rendered message contains the monitor name, the trigger value and the source identifier.

  5. Configure notification channels

    Create one or more notification channels for the destinations your on-call and service teams use, such as email, a chat webhook or a ticketing endpoint. Restrict who can edit channels, because a channel holds the destination details that the cluster sends alerts to. Store any webhook secrets in the secrets handling your organization already uses rather than in plain monitor text. Check: a test message sent from each channel arrives at the intended recipient, and the channel owner and access list are recorded.

  6. Create a detector with a test run

    In the Anomaly Detection plugin, create a detector on a feature set built from the fields that describe normal behavior, such as request count by service or error rate per host. Choose a detection interval and time window that match the data frequency, and set a historical analysis run over a period you know was normal. Random Cut Forest models learn from this history, so the team should review the feature definition with the data owner before the run. Check: the historical run completes without errors, and the anomaly grade and confidence values are visible for the known normal period, with few or no anomalies flagged in it.

  7. Review alert history and tune thresholds

    After the monitors and detector run in a live window, review the alert history and the anomaly results together. Count how many alerts fired, which triggers caused them, and whether each one led to a useful action. Raise thresholds, add minimum event counts, extend windows or change anomaly grade cut-offs for triggers that fire on expected behavior. Change one setting at a time and record it so that alert fatigue can be traced to a specific change. Check: the alert history shows a documented owner, action or dismissal reason for every fired alert, and the team has a written list of threshold changes with their dates and reasons.

Tuning rules to avoid alert fatigue

Alert fatigue usually comes from monitors that fire on normal variation, duplicate notifications and maintenance activity. Each rule below cuts some noise, and each one can also hide a real problem if it is set too broadly, so tune them against a documented list of what must never be silenced.

Set thresholds from baselines

Before fixing a numeric threshold in a monitor, measure what normal looks like over several weeks, including weekday and weekend peaks and batch jobs. A threshold drawn from a short quiet period will fire on every busy day. The risk is that a baseline built during an incident or a slow decline becomes the new normal, so compare it against the period you expected to be healthy. Confirm the query window and aggregation in each monitor match the signal you care about.

Deduplicate and throttle actions

Trigger actions can repeat on every run while a condition stays true, which floods channels during a long outage. Throttling limits how often a notification is sent for the same condition. The risk is a longer gap before a recurring or escalating problem is seen again, so keep the throttle shorter than the time a responder needs to act. Check the throttle setting on each destination separately.

Group alerts by entity

A monitor that counts errors across a whole fleet can send one alert per host, service or tenant when the condition is really one shared dependency failing. Grouping by a field such as host or service name lets one problem produce one alert per affected entity, with clear ownership. The risk is that a per-entity split can also multiply alerts when many entities fail together, so pair grouping with a summary condition.

Route by severity

Send only high-severity triggers to paging channels and route lower severities to ticket queues or dashboards that someone reviews on a schedule. Severity labels should map to a written response expectation so the team agrees what each one means. The risk is that low-severity signals sit unread and a slow-building failure is never escalated, so review which low-severity alerts were later confirmed as incidents.

Suppress planned maintenance windows

Planned upgrades, reindexing and snapshot runs often trip disk, latency and availability monitors. Suppress those monitors only for the named window, with a change ticket and an automatic end time, rather than disabling them. The risk is that a window left open or applied to the wrong cluster hides a real outage, so confirm that suppression expires and that cluster health checks still run during the window.

Review detector features and history

Random Cut Forest anomaly detectors learn from selected features and a window of history. Features that are noisy, seasonal in ways the detector does not see, or mostly zero will raise false anomalies, while a short history window learns today's behavior as normal. Remove unhelpful features, confirm the history size covers the cycles you expect, and review flagged anomalies against incidents on a regular schedule. The risk is removing a feature that carries the only early signal, so test each change against past incidents first.

How a monitor and detector move data to a notification

The flow starts with logs or metrics already indexed in the cluster. A scheduled monitor runs a query against those indexes, a trigger evaluates the result, and the action sends a message to a notification channel and writes the alert record to the alert index. A separate anomaly detector reads the same indexes on its own schedule and feeds its results into the same alerting path. Check that the monitor and detector run under roles that can read only the intended indexes, and that the channels and alert index sit inside the cluster boundary you control.

Monitor and detector paths from indexed data to notifications and the alert index.

Security and operational considerations for alerts

Alerting and anomaly detection touch access control, sensitive data, outbound credentials and the cluster itself. The cards below cover the decisions to settle before monitors go live, so that the alerting layer does not become a new route to the data it watches.

Who can change monitors

Monitors, triggers and detectors define what the organization is told about, so editing them is a control decision. Use roles from the OpenSearch Security plugin to separate people who view alert output from people who create, edit or disable monitors and detectors. Check that a monitor cannot query indexes its owner could not read directly, because an alerting job runs with its own permissions. Review who holds the roles that allow silencing alerts, since a quiet monitor is a silent failure.

Security docs

Sensitivity of notification payloads

A trigger notification often includes matched documents, field values or query context. Those values can carry personal data, credentials or regulated records that were never meant to leave the index. Decide which fields a message template may include, and mask or omit sensitive ones before the message reaches chat, email or a ticketing system. Ask which recipients can read each channel, and whether messages are retained there, because a copy in a third-party tool may fall outside the access model of the cluster.

Credentials for webhooks and email

Webhook URLs with embedded tokens and SMTP account passwords are long-lived secrets used by the alerting service. Store them in the cluster's secure settings or an external secrets manager rather than in monitor definitions that many administrators can read. Use dedicated sender accounts with the least privilege needed to send mail or post messages, and plan a rotation procedure that updates the channel configuration without editing every monitor. Confirm how your chosen version stores and displays these values in the interface.

Alert history outside the cluster

Alert history records what fired, when and what data triggered it, which is often evidence for an incident or an audit. If that history lives only in the cluster it describes, an attacker or a failed node can erase the trail with the data. Where your requirements call for it, route alert events to a separate store with its own retention and access controls. Confirm with your compliance team how long alert records must be kept and who may read them.

Monitoring the alerting jobs

Alerting jobs can fail quietly after a version upgrade, a permission change, a full disk or a node restart, and nothing notifies anyone that a check stopped running. Track whether each monitor executes on schedule, how often it errors and whether its notification channels accept messages. Pair this with a deliberate heartbeat alert that fires when expected alerts stop arriving. Confirm which metrics and error states your version exposes before you rely on them.

Changes to alerting configuration

Monitors, detectors and channels are configuration that should move through the same review as the rest of the platform. Keep their definitions in version control or an infrastructure-as-code workflow, require review for changes that alter recipients or severity, and record who approved each change. This makes it possible to reconstruct what was active during an incident and to restore a known-good set after an accidental deletion.

How alerting differs for logs, metrics and security events

Application and platform logs arrive as discrete documents, usually one per event, with a timestamp, a severity or status field and a service name. Error-rate alerts count matching events over a time window and fire when the count crosses a threshold. In OpenSearch this is typically handled by a query-based monitor that runs an aggregation against an index or data stream on a schedule, followed by a trigger that compares the result to a condition.

  • Monitor choice: a per-query monitor on a fixed schedule is the usual starting point, with the window and threshold written as explicit conditions.
  • Noise risk: log volume follows traffic, so a fixed threshold that suits a quiet night will fire constantly at peak hours.
  • Noise risk from bursts: a single failing deployment can produce a short spike that pages on-call for minutes and then resolves on its own.
  • Grouping: aggregating by service or host lets one noisy source be separated from the rest instead of masking them.
  • Related topics: see the log analytics and observability topic for index layout and retention, and the data streams topic for how time-based indexes affect query windows.

Before going live, confirm the expected event volume per service and replay recent history against the proposed threshold to see how often it would have fired.

Limits and what to confirm in your environment

Alerting and anomaly detection limits depend on the exact OpenSearch version and on how your cluster is sized and configured. The items below are the points to confirm against the vendor documentation for your version, then prove on a copy of your own log and metric data before any alert goes to an on-call rotation.

Supported monitor types

Confirm which monitor types your version supports, such as per-query, bucket-level, document-level and cluster metrics monitors, and whether each can run against the indexes you plan to watch. Document-level monitors and their query behavior change between releases, so a monitor design that works on one minor version may need rework on another. Write down each monitor type you depend on, then check it in the docs for your exact version before the design is approved.

Cluster docs

Detector limits per cluster

Ask how many anomaly detectors one cluster can run at once, how many a single node can host, and how detector count interacts with shard count, memory and the cluster's thread pools. Detector limits are usually set by configuration, and the defaults can differ between versions. Test a realistic number of detectors on a staging cluster and watch heap and task queues before you size production.

Notification channel support

Verify which notification channels your version can send to, such as email, Slack, Microsoft Teams, webhooks or a paging service, and whether each needs a plugin, an outbound network path or a stored credential. Check whether channel credentials are stored in the cluster and who can read them under your access model. Send a test notification from every channel your on-call process needs.

Alert history retention

Confirm how long triggered alert records are kept, where they are stored and whether they can be exported to an outside system. Alert history is often indexed in the same cluster being monitored, so a cluster outage can also erase the evidence of when alerts fired. Decide how long you need that record for incident reviews and audit requests, then set a retention policy and test that it works.

Behavior with sparse or irregular data

Check how the Random Cut Forest detector handles gaps, bursts, low-volume periods and fields that are often empty, because the model learns from the shape of the data it receives. Sparse series can produce unstable baselines or false anomalies, while irregular ingestion can look like an incident. Review the detector documentation for your version, then replay a period with known gaps and outages to see how the model reacts.

Testing on your own data first

Replay at least several weeks of your own logs and metrics through each monitor and detector before any alert pages a person. Count how many alerts would have fired, how many were real, and how many would have been ignored, then adjust thresholds, windows and filters until the noise is acceptable to the team that receives it. Record the results so the tuning decisions can be reviewed later and repeated after each upgrade.

Questions teams ask before setting up alerting and anomaly detection

What drives the cost of setting up OpenSearch alerting and anomaly detection?

The main cost drivers are the volume of logs and metrics the detectors read, the number of monitors, triggers and anomaly detectors in scope, the notification channels that must be connected, and the time spent tuning thresholds after the first alerts arrive. Software licensing is not one of them, because OpenSearch and its alerting and anomaly detection plugins are released under the Apache License, Version 2.0, and the OpenSearch FAQ does not describe a paid edition. Most of the spend is labor and infrastructure: the cluster capacity to run queries and detectors, the engineering time to design the rules, and the review cycles needed to reduce noise. Ask for a quote that lists each detector and monitor group separately, names the notification integrations, and states how many tuning rounds are included.

How long does a first working alerting setup take?

The duration depends on how many data sources are in scope, how clean the field mappings are, and how many people must approve alert routing. A narrow first scope, such as a single log index with a handful of monitors and one notification channel, takes far less time than a multi-team rollout covering logs, metrics and several on-call paths. Anomaly detection adds time because a Random Cut Forest detector needs historical data to learn normal behavior, and the team must review its results before trusting them. No duration is set here because none has been researched for this scope. Ask any provider for a written timeline tied to a defined list of data sources, monitors and detectors, and confirm which items depend on your own teams for access or approvals.

What does the work need from our internal team?

The work needs three kinds of input from your side. First, someone who owns the data: the index names, field meanings, timestamp fields and the business context for which events matter. Second, someone who owns the response: the on-call rotation, escalation paths and chat or ticketing systems that alerts will reach. Third, access to the cluster and to the systems that send notifications, including service accounts, webhook endpoints and any role mapping in the OpenSearch Security plugin. Your team also needs to agree on what counts as a actionable alert, because that decision drives most of the tuning. Plan time for these people up front, since delays in access or decisions often extend a project more than the technical work does.

Can our own engineers set up OpenSearch alerting and anomaly detection without a partner?

Yes, a capable team can do this in-house, since the alerting and anomaly detection features are part of the Apache 2.0 OpenSearch distribution and are configured through OpenSearch Dashboards and the API. The skills that matter are a working knowledge of index mappings, query syntax, role-based access control and the operating model of your on-call team. The harder parts are usually tuning detectors so they stop flooding responders and keeping rules current as log formats change. Consider a partner when the team has no time to iterate on noise reduction, when several business units need consistent rules, or when the alerts must be reviewed under a compliance program. Whichever path you choose, document each monitor's owner, purpose and threshold so the setup survives staff changes.

Why do alerting setups create alert fatigue, and how is it controlled?

Alert fatigue usually comes from monitors that fire on normal variation, duplicate notifications for the same incident, and anomaly detectors whose baselines were trained on a period that did not reflect typical load. Controlling it means starting with a small set of monitors tied to actions someone will take, reviewing every trigger that fires without leading to a response, and adjusting thresholds or suppression windows based on that record. Anomaly detection results should be reviewed against known events before they page anyone. Ask any provider how they will measure alert volume, which owners will approve threshold changes, and how the review cycle will be scheduled after go-live.

What should we ask for in a fixed-scope quote?

Ask for a written scope that lists each deliverable: the clusters and indexes covered, the monitors and triggers, the anomaly detectors and the features they read, the notification integrations, the role and access configuration, the documentation and the handover. Ask which tuning rounds are included and what happens if the review finds additional data sources. Ask who is responsible for each access request, approval and environment change, and what the dependencies on your team are. Confirm the timeline, the acceptance criteria and how changes to scope will be priced. DeployOpen works from a written scope agreed before work starts and does not publish a price list, so a quote follows from that scope.

Does alerting and anomaly detection need a separate security review before go-live?

It depends on what the alerts read and who can see them. Monitors on logs that contain personal data, credentials or regulated records need the same access controls as the source data, including role-based access control and, where required, field-level or document-level security. Notification channels also carry data out of the cluster, so the destinations and message contents should be reviewed. Ask your compliance lead whether alert records count as audit evidence and where they must be retained. DeployOpen prepares systems and evidence for compliance assessments but does not issue audit reports or certifications, so independent auditors and certification bodies make the final determination.

How DeployOpen scopes and supports alerting and anomaly detection

DeployOpen starts every alerting and anomaly detection engagement with a written scope that names the indexes, log sources and metrics to be watched, the notification channels involved, and the people who will receive and act on alerts. The scope also states what is out of bounds, such as detectors on indexes owned by another team or triggers that page on-call staff. Work begins only after that scope, its deliverables and its timeline are agreed in writing. Because the scope comes first, the client can see which monitors, triggers, channels and detectors are being built and why each one exists before any of them go live.

The build happens inside the client's own OpenSearch cluster, in the client's cloud account, data center or air-gapped network. DeployOpen creates the monitors that run on query schedules, the triggers with their threshold conditions, the notification channels, and the Random Cut Forest anomaly detectors on the agreed indexes. The client's operations team reviews these objects with DeployOpen during tuning, because they know which spikes are routine, which hosts are noisy, and who holds on-call duty. Tuning covers thresholds, evaluation windows, detector feature selection and the routing of alerts so that the first version does not overwhelm the people receiving it. Each change is recorded so the client can explain why an alert fires.

Alerting needs care after go-live, because log volumes, deployments and team changes shift what normal looks like. DeployOpen offers retainers for ongoing support and tuning, covering reviews of noisy alerts, detector retraining decisions, changes to channels and access, and checks after OpenSearch version upgrades. Ask any provider to confirm in writing who owns each monitor and detector after handover, which runbook covers a silenced or disabled alert, and how the team will test that notifications still reach the right people. Retainer terms, response expectations and any service levels should appear in the written agreement, not in a general description.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.