How OpenSearch index rollups and transforms keep long-term metrics affordable
When a team holds months or years of metrics and the raw detail is becoming expensive to keep, OpenSearch offers two ways to shrink the footprint without deleting history: index rollups and transforms. An index rollup periodically compresses old time-series data into a summarized index with coarser time buckets and only the fields you select, and it can run on demand or on a schedule. A transform builds a different kind of summary, an entity-centric index with one document per entity, such as per host, service or customer, aggregated over a chosen set of fields. Teams usually reach for rollups when they need long-range trend dashboards at lower resolution, and for transforms when they need to answer questions about the entities themselves.
The distinction matters because the two produce different data. A rollup keeps the time axis and drops resolution: a metric sampled every few seconds might be kept as hourly sums, averages or counts, and the per-event fields you no longer need are simply not carried forward. A transform keeps the entity axis and drops the time sequence: it answers questions like the peak latency per service in a given week. Before you choose, list the queries that will still run against data older than your hot retention window. If those queries are time-bucketed trends, plan rollups. If they are per-entity rankings or lookups, plan transforms. Many long-term designs use both, with each summary feeding a different dashboard.
Whichever you choose, the decision interacts with your retention policy, and the interaction is easy to get wrong. A rollup does not remove the source index on its own, so the deletion step must be configured deliberately, and the rolled-up index has its own retention. Confirm in the OpenSearch documentation for your version how index state management policies sequence rollup and deletion, and test that a dashboard still returns the expected totals after the raw index is gone. Ask your team to document which fields are kept, the bucket interval, who owns the job definitions, and how an analyst can tell whether a query hit raw or summarized data. Those answers shape storage cost more than the choice of summary alone.
Choosing between rollups, transforms and raw retention
Index rollups serve questions such as how average latency or error counts changed across the last year, shown at hourly or daily resolution. The rollup job periodically compresses old time-series data into a summarized index with coarser time buckets and only the fields you select, and it can run on demand or on a schedule. What it discards is per-event detail and any field you did not list, so a dashboard that later needs a new dimension cannot recover it from the rollup.
- Query served: trend lines and capacity views over weeks or months at bucket resolution.
- What is lost: individual documents, unselected fields and the original timestamps within each bucket.
- Schedule: choose whether jobs run continuously or on demand, and confirm how late-arriving data is handled.
- Dashboard changes: a new panel that needs a field must be planned before the source data ages out.
- Confirm: the rollup, aggregation and bucket options available in your target OpenSearch version, since the Index Management plugin documentation should be checked against that release.
Before you commit, list every chart that must survive the retention period and the fields each one reads.
Transforms build entity-centric summaries, such as one document per host, service, account or customer, by grouping source data on chosen keys and computing aggregations for each group. This suits per-host or per-service views where the question is about the entity rather than the time axis. Transforms can run continuously or as a batch, but they discard the event sequence and only keep what the aggregations compute.
- Query served: per-entity health, ownership or usage views and lookups that join entities across sources.
- What is lost: the raw event order and any aggregation you did not define in advance.
- Key design: the grouping keys must be stable identifiers, because renamed hosts or reused IDs split or merge summaries.
- Operations: a continuous transform needs ongoing resource and failure monitoring, and its state must be checked after restarts.
- Confirm: the transform features, continuous mode and aggregation types supported in your version, and how it behaves with your source mappings.
Transforms and rollups answer different questions, so a single cluster often runs both for the same source.
Raw retention keeps the full documents, with every field and original timestamp, for incident investigation, forensic review and audit questions. It is the only option that answers questions nobody anticipated when the data was written. Its cost is storage and heap pressure that grow with volume, so the usual approach is to keep raw data for a shorter window and move older questions to summaries.
- Query served: root-cause analysis, security investigations and audit reconstruction.
- What is lost: nothing, but the storage cost continues for the whole retention period.
- Retention control: define the window in index lifecycle policies so raw indexes are deleted or moved on a set schedule.
- Access: raw events often contain personal or regulated data, so field-level controls should be planned with the security team.
- Confirm: with your compliance owner how long raw logs must be kept, because that period sets the window that summaries cannot replace.
Raw retention sets the outer limit for everything else, so decide it first.
Most long-term designs use all three layers against one source, each with its own retention. Raw indexes hold recent events for investigation, transforms maintain per-entity state that stays current, and rollups keep bucketed history for the long tail. The layers must agree on field names and timestamps, or dashboards will silently disagree with investigations. Illustrative example: a platform team keeps raw logs for a short window, keeps host summaries for a longer one and keeps hourly rollups for the longest window.
- Layering: raw data feeds both downstream products, so their schedules must run before raw indexes are deleted.
- Naming: use one field and index naming convention across layers to avoid mismatched queries.
- Ordering: check that each rollup or transform has consumed its source before lifecycle policies remove it.
- Storage: estimate the size of each layer from a sample, not from the raw volume alone.
- Confirm: how your version's lifecycle, rollup and transform features interact, including failure behavior when one job stops.
Test the full chain with a restore of old data before you rely on it for reporting.
Configuration options and when each fits
This table compares the main rollup and transform settings, from interval and field selection to run mode, target naming and retention. Read each row as a decision: the right column shows when the choice fits and which query flexibility it gives up. The main takeaway is that every summary you keep is a permanent narrowing of what you can ask of old data, so decide the fields and buckets before the source indexes age out.
| Configuration choice | What it controls | When it fits | Cost in query flexibility |
|---|---|---|---|
| Calendar interval (coarse buckets) | Time bucket size for summarized documents, such as hourly or daily | Long-horizon trend charts where only daily or weekly shape matters | Fine-grained questions on old data become unanswerable once raw detail is dropped |
| Fixed interval (finer buckets) | Shorter bucket width kept in the rollup index | Recent-but-aged data where dashboards still need short-window spikes | Larger rollup indexes and less reduction in storage savings |
| Selected fields and aggregations | Which fields are kept and which metrics (min, max, sum, average, count) are computed | Known dashboard panels and alerts that only read a fixed set of metrics | Any field or aggregation left out cannot be queried later, so confirm the list with dashboard owners first |
| On-demand run | A single rollup job executed manually for a chosen window | One-time backfill, testing a mapping, or summarizing a closed period | No automatic coverage of new data, so someone must run and check each batch |
| Scheduled run | Recurring job that rolls up new time windows on a set cadence | Steady-state retention of metrics that arrive continuously | Each run locks in its summaries, so schedule changes do not reshape history already written |
| Target index naming and placement | Name, alias and node placement of the rollup index | Separating summaries from raw data so retention and access rules can differ | Dashboards and queries must target the new name, and wildcard searches may pick up both sets |
| Retention on source indexes | How long raw indexes live before deletion | Keeping raw data for a short incident window while summaries serve long-range views | Once raw indexes are deleted, nothing can be rebuilt with a different interval or field list |
| Retention on rollup indexes | How long summaries are kept | Multi-year trend requirements with a defined end date set by your policy | Shorter summary retention ends historical comparisons, so confirm the required period with compliance owners |
How rollups combine with retention policies
Rollups only save money if the raw data they summarize is handled in a deliberate order. The cards below cover the decisions that tie raw retention, rollup retention and deletion together, and the points where a schedule can break that chain.
Keep raw data for a short window
Raw documents are the expensive part of a metrics store, so decide how long they stay searchable before a rollup replaces them. A short raw window covers recent troubleshooting and alert investigation. Confirm with your operations team which queries need full-resolution data and for how long, because those answers set the window more than storage cost does.
Keep rollups for longer
The rollup index is where multi-month and multi-year trend data lives, so its retention should be set separately from the raw index. Decide which fields the rollup keeps, since fields left out at rollup time cannot be recovered later. Ask the team that owns capacity reports which metrics and aggregations they need, and check that those fields are in the rollup definition.
Delete sources only after verification
Deleting raw indexes is the step that cannot be undone, so it should follow a check that the rollup exists, covers the expected time range and returns the expected totals. Compare rollup results with raw query results for a sample period in a test cluster before you automate deletion. Record the check in the runbook so the deletion job can be reviewed later.
Align lifecycle policies with rollup schedules
Index lifecycle management moves and deletes indexes on its own timetable, and a rollup job runs on its own schedule. If the lifecycle delete phase runs before the rollup has processed an index, the data is gone. Map each lifecycle phase to the rollup job that must finish first, and test the order in your environment with realistic index sizes and job durations.
Plan for late and missing data
Metrics often arrive late, from agents that were offline or from delayed ingestion. A rollup built on a fixed time window can miss those documents, and a later deletion would make the gap permanent. Decide how long you wait before treating a window as complete, and confirm how the rollup job handles documents that arrive after it has run.
Test ordering and timing end to end
The combined behavior of rollups, retention and deletion depends on your data volume, cluster sizing and schedule, so published guidance cannot settle it for you. Run the full chain in a non-production cluster with a copy of your data shape, watch for failed jobs and stuck policies, and repeat the test after each OpenSearch upgrade. Check the index rollups documentation for the current job options before you build the schedule.
Index rollups docsSetting up rollups and transforms in sequence
This sequence moves a long-term metrics design from questions to a scheduled rollup or transform, with a check at each stage so the summarized data can be trusted before raw data ages out.
Define the metrics and questions to answer
The team that owns the dashboards and alerts lists the metrics, fields, dimensions and time ranges they need after raw data is gone, such as hourly error counts by service or daily p95 latency by region. Each question determines the bucket size, the fields to keep and whether an entity-centric transform fits better than a time-bucketed rollup. The step is done when every question maps to a field, an aggregation and a bucket interval, and the owners have signed off the list in writing. Anything not on the list is treated as raw-only data.
Confirm version and plugin availability
An engineer records the exact OpenSearch version in each environment, then checks the release notes and the index management plugin documentation for the version to confirm that index rollups and transforms are available, configured and permitted for the service accounts that will run them. Upgrade planning is handled separately if a version change is needed. The step closes with a short written record of the version, the plugins enabled, and the roles that can create and run jobs. Confirm details with the vendor documentation for your exact release rather than assuming parity across versions.
Create a test rollup on a copy of data
An engineer restores a recent slice of the source index into a non-production cluster or a separate index, then creates a rollup job with the bucket interval, fields and aggregations from the first step. The test runs on demand before any schedule is set, so failures do not touch production indexes. The output is a rollup index with the expected name, mapping and document count for the sample window. If the job fails or produces an unexpected mapping, the team fixes the definition here and does not move on until the test run completes cleanly.
Validate bucket results against raw queries
For several sample intervals, the engineer runs the same aggregation against the raw index and the rollup index and compares counts, sums, minimums, maximums and averages. Differences in timezone handling, null values, late-arriving documents or rounding are investigated and documented. The check passes when the agreed tolerance is met for every metric on the list, and the query results used by dashboards return the same values from either source. Record the queries and results so that the comparison can be repeated after any change to the job.
Schedule the job in production
Once the test results match, the engineer creates the production job with a schedule that runs after the source data for each interval has finished arriving, and sets the target index names and access roles. The job should write to a separate summarized index rather than overwriting raw data. The step is complete when the first scheduled run has finished and the job status shows success with no retries pending. Set alerts on job failure so that a stalled rollup is noticed before the raw data it depends on is removed.
Confirm job status and summarized data
Over several scheduled runs, the operations team checks job status, run times, document counts and the freshness of the newest bucket in the rollup index. They compare a sample of recent buckets with raw queries again, because production data can differ from the test copy. The check passes when every run completes, the summarized index keeps pace with incoming data, and the comparison still matches. Any gap in coverage is fixed before retention is changed.
Wire retention policies to the summarized data
Only after the rollup has been verified does the team set retention for raw indexes, so that raw data is removed on a schedule and summarized data is kept for the period the business requires. The engineer confirms that dashboards, alerts and reports point at the correct index pattern and that no alert depends on raw fields that will be deleted. The step is done when a retention rule has run once in a non-production environment, the remaining raw and summarized indexes are listed as expected, and the owners confirm the retention periods in writing.
What drives the effort and duration of a rollup project
The effort in a rollup project depends less on the rollup syntax than on how many things read the raw data today. Start by counting metric sources that feed the indexes you plan to roll up, because each source has its own field names, timestamp handling and bucket needs. Next, measure the cardinality of entity fields such as host, service, tenant or customer identifiers. A rollup keeps only the fields you select, so high-cardinality terms used in grouping multiply the size of the summarized index and make the group-by design harder to validate. Ask your team to pull field cardinality from the live cluster rather than from memory, and record which fields dashboards actually group on.
The second driver is dependency. Count the dashboards, saved searches, monitors and alerts that query raw data in the indexes in scope. Each one needs a decision: point it at the rollup index, keep it on raw data for a shorter window, or retire it. Alerts deserve particular attention, because a monitor that relies on a field the rollup drops will fail quietly unless you test it. Retention and compliance requirements add a third driver. If your policy requires raw records for a fixed period, or requires that audit-relevant events stay in full detail, the rollup can only replace the portion of data your policy allows you to summarize. Confirm those requirements with your compliance and legal owners before the design starts, and confirm how the retention policy will remove raw indexes after the rollup job has run.
Testing is the last driver and often the largest. Plan comparisons between query results on raw and rolled-up data for representative dashboards, check that aggregations match within the accuracy you accept, and rehearse the retention transition in a non-production cluster. Ask any partner for a scoped estimate that lists each source, dependency, retention rule and test case, with the effort for each, tied to your environment. Ask which parts are one-time design and build work and which recur when new sources or dashboards are added. No duration is given here because it depends on those inputs, and a figure without them would not describe your project.
Security and operational considerations for long-term metrics
Rollup and transform indexes are new places where data lives, so they need the same access, audit, backup and monitoring decisions as the raw indexes they summarize. The cards below cover the checks that connect those decisions before the first job runs.
Role access on summary indexes
Summary indexes are separate indices, so the Security plugin roles that protect raw data do not automatically cover them. Define index patterns for rollup and transform targets explicitly, and grant read access only to the roles that need the summaries. Confirm in your own test cluster how index permissions apply to the target names your jobs produce before users depend on them.
Security plugin docsSummaries exposing restricted fields
A rollup keeps only the fields you select, but a restricted field that is chosen as a grouping key or metric can still reveal patterns in the raw data. Review each source field against the document-level and field-level security rules already applied to the raw index. Field masking and field-level security protect the raw data only, so decide up front which fields may appear in summaries at all.
Document and field controls
The Security plugin provides document-level security, field-level security and field masking. Confirm which of these your roles apply to the target indexes and whether they behave the same way for summary data. Test with a user who has partial access, because a summary built by an admin account can contain values that user should never see.
Audit logging of job changes
Creating, editing, disabling or deleting a rollup or transform job changes what data is kept and how long it lives. Enable the Security plugin audit logs and confirm the categories that capture configuration changes on these jobs. Store the audit records outside the cluster they describe, so an administrator who changes a job cannot also edit its history.
Snapshot coverage for summaries
Snapshots must include summary indexes, or a restore will bring back raw data without the rollups that users query. Check that your snapshot policy matches the index patterns used for rollup and transform targets. Confirm that a restore test covers both raw and summary indexes, along with the job definitions that rebuild the summaries after recovery.
Monitoring job failures
A failed rollup or transform job can leave a gap in long-term metrics that is only noticed when a dashboard looks wrong. Monitor job status and set alerts on failed or stalled runs, and review the cluster health after each scheduled run. Decide who receives those alerts and how long a gap can go unnoticed before it affects reporting or retention.
Questions teams ask before building rollups and transforms
What does it cost to build OpenSearch rollups and transforms?
Cost depends on how much of the design, build and verification your team wants to hand over, and on how many indexes, fields and downstream dashboards are involved. The software itself is open source under the Apache License, Version 2.0, so there is no license fee to plan for. The main cost components are the engineering time to define which fields to keep and which time buckets to use, the work to build and test the rollup or transform jobs, the work to connect retention policies, and the ongoing effort to check that summaries still match what dashboards and alerts need. Ask any partner for a quote that lists each component separately, states what is one-time and what recurs, and names the environments covered, including test and production. DeployOpen provides quotes from a written scope rather than a published price list.
How long does a rollup and transform project take?
Duration is set mainly by the number of data streams and indexes in scope, how many dashboards, alerts and reports read the summarized data, and whether the team has agreed on the metrics that must survive summarization. Projects with a small, well-understood set of metrics move faster than projects that must reconcile several teams' definitions of the same measure. Time also goes to testing queries against rolled-up data, validating retention timing in a non-production cluster and planning the cutover for existing indexes. Ask for a timeline that breaks these phases apart and identifies which decisions must be made before build work starts.
What does our team need to provide for the work?
Your team needs to supply the people who know the metrics, the consumers of those metrics and the retention requirements. In practice that means the owners of the time-series data, the people who maintain dashboards and alerts, and whoever sets data retention policy. Access to a non-production OpenSearch cluster that matches production settings is also needed, along with a current inventory of indexes and their growth rates. Without these inputs, the design stalls at the point where someone has to decide which fields are needed for the next two years of reporting.
Can our own engineers build rollups and transforms without a partner?
Yes, if your team already operates OpenSearch and has someone who can write and test the rollup and transform definitions. The OpenSearch index rollups documentation describes how rollups periodically compress old time-series data into summarized indexes with coarser time buckets and only selected fields, and they can run on demand or on a schedule. Teams new to the feature should plan time to test how summaries behave against real queries, because a rollup that drops a field cannot be recovered from the summary. Many teams split the work: internal staff own the data definitions and a partner reviews the design or handles the build and verification.
How do rollups differ from simply deleting old data?
A rollup keeps old data in a smaller form, while deletion removes it. According to the OpenSearch index rollups documentation, a rollup compresses older time-series data into summarized indexes with coarser time buckets and only the fields you select, so you can still query trends over long periods after the raw documents are gone. Deletion, typically handled by retention policies, frees storage completely but leaves nothing to query. Most long-term metrics plans combine both: raw data is kept for a short window, a rollup holds summaries for a longer window, and a retention policy removes the rollup when it is no longer needed. Decide which fields and bucket sizes are required before raw data is removed, since the choice cannot be undone later.
What can go wrong when summarizing metrics?
The most common failure is choosing the wrong fields or buckets, which leaves dashboards and alerts with gaps that only appear months later. Other risks include summaries built from a time bucket that does not match how analysts query, retention policies that remove raw data before the rollup has run, and transforms that are not updated when a source field is renamed. Teams should test each rollup against the queries that matter, keep a copy of the raw data for a validation window and record every definition change. Ask any partner how they will verify that summarized results match the raw data for a sample period.
Do we need security and access controls for rolled-up data?
Yes. Summarized indexes still contain operational data and can reveal patterns, so they should follow the same access model as the source indexes. The OpenSearch Security plugin provides role-based access control, document-level and field-level security, and field masking, which can be applied to the summary indexes as well as the raw ones. Confirm with your security team which roles can read summaries, whether any fields must be masked before rollup, and how audit logging will record access to long-term data.
How DeployOpen scopes and delivers rollup projects
DeployOpen plans, implements, tests, documents and supports self-hosted OpenSearch inside your own infrastructure. For index rollups and transforms, we start from the retention and query requirements your teams actually have, then build and verify the summaries in your environment before handover.
How we scope
- Inventory the indexes, fields and retention periods that need long-term summaries and the queries that must still run against them.
- Agree which rollup jobs, transform jobs and retention policies are in the written scope, with a fixed deliverable list.
- Confirm the OpenSearch version and the plugins available in your environment before design begins.
How we build
- Design rollup targets with coarser time buckets and only the selected fields, checked against each dashboard and alert that depends on them.
- Define transform jobs for entity-centric summaries and set the order in which rollups, transforms and retention policies run.
- Test on a non-production cluster with representative data, including job failures, reruns and storage growth before production change.
How we hand over
- Document each rollup and transform job, its schedule, source and target indexes, and the retention policy it depends on.
- Provide runbooks for checking job status, handling failed jobs and changing bucket or field definitions safely.
- Walk your operations and analytics staff through the setup and confirm they can operate it without us.
How we support
- Support is fixed-scope by default, and ongoing support, upgrades and continuous testing are available as a retainer.
- Review rollup and transform behavior again when your OpenSearch version moves through its maintenance cycle.
- Ask any partner for a written quote that lists the scope, deliverables and what your own team must provide.

