# Generate 'rollup\_index' name based on index being rolled-up

**URL:** <https://discuss.elastic.co/t/generate-rollup-index-name-based-on-index-being-rolled-up/244124>\
**Category:** Elasticsearch\
**Created:** [August 7, 2020, 6:39am UTC](https://discuss.elastic.co/t/generate-rollup-index-name-based-on-index-being-rolled-up/244124 "2020-08-07T06:39:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SpicyNotNumb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spicynotnumb/32/36035_2.png) [@SpicyNotNumb](https://discuss.elastic.co/u/SpicyNotNumb)\
**Post date:** [August 7, 2020, 6:39am UTC](https://discuss.elastic.co/t/generate-rollup-index-name-based-on-index-being-rolled-up/244124/1 "2020-08-07T06:39:35Z")

</div>

I have a bunch of indices, those are **time-series** data.

```auto
GET _cat/indices/jti-log*
green open jti-logical-usage-q3-raw hppahZg0Qj6dLFWTl4ouIw
green open jti-logical-usage-q4-raw 6r5Y-bUFSqOIAl-Q-JSC5g
green open jti-logical-usage-q5-raw znT57xXhS5OGAjiVzGce_Q

```

Upon configuring rollup job, I'm trying to figure out a way to rollup to indices

```auto
jti-logical-usage-q3-raw => jti-logical-usage-q3-5min
jti-logical-usage-q4-raw => jti-logical-usage-q4-5min
jti-logical-usage-q5-raw => jti-logical-usage-q5-5min

```

I could configure 3 rollup jobs for 3 different indices:

```auto
PUT _rollup/job/older_than_1d_to_5min_q3
{
  "index_pattern": "jti-logical-usage-q3-raw",
  "rollup_index": "jti-logical-usage-q3-5min",
  rest_of_config.....
}
PUT _rollup/job/older_than_1d_to_5min_q4
{
  "index_pattern": "jti-logical-usage-q4-raw",
  "rollup_index": "jti-logical-usage-q4-5min",
  rest_of_config.....
}
PUT _rollup/job/older_than_1d_to_5min_q5
{
  "index_pattern": "jti-logical-usage-q5-raw",
  "rollup_index": "jti-logical-usage-q5-5min",
  rest_of_config.....
}

```

Just wondering if there is a way to configure this in one job.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 4, 2020, 6:39am UTC](https://discuss.elastic.co/t/generate-rollup-index-name-based-on-index-being-rolled-up/244124/2 "2020-09-04T06:39:53Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
