# Could not create ml job based on rollup job index

**URL:** <https://discuss.elastic.co/t/could-not-create-ml-job-based-on-rollup-job-index/256135>\
**Category:** Kibana\
**Tags:** elastic-stack-machine-learning\
**Created:** [November 20, 2020, 2:47pm UTC](https://discuss.elastic.co/t/could-not-create-ml-job-based-on-rollup-job-index/256135 "2020-11-20T14:47:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nujabness](https://avatars.discourse-cdn.com/v4/letter/n/b9e5f3/32.png) [@nujabness](https://discuss.elastic.co/u/nujabness)\
**Post date:** [November 20, 2020, 2:47pm UTC](https://discuss.elastic.co/t/could-not-create-ml-job-based-on-rollup-job-index/256135/1 "2020-11-20T14:47:00Z")

</div>

Hi,

Im using Elasticsearch Service in cloud version 7.9.2.

Im trying to create a machine learning job based on an index created from a rollup job that counts the number of requests per webservice.

I first create a rollup job that launches every minute with a buket of 10s, here is the config:

![image](https://us1.discourse-cdn.com/elastic/original/3X/d/e/de7b14089cd7a624ba7457f90568bfcaa2aea843.png)

When I create my machine learning job with a buket of 60s I throw the following error:

Bad Request: [illegal\_argument\_exception] Rollup capabilities do not have a [date\_histogram] aggregation with an interval that is a multiple of the datafeed's interval.

i found that in the documentation :

> The bucket span of your anomaly detection job must be divisible by the value of the `calendar_interval` or `fixed_interval` in your aggregation (with no remainder).

But my configuration still not work. Have I missed anything?

---

<div class="post-metadata">

**Author:** ![richcollier](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/richcollier/32/115035_2.png) [@richcollier](https://discuss.elastic.co/u/richcollier)\
**Post date:** [November 23, 2020, 4:22pm UTC](https://discuss.elastic.co/t/could-not-create-ml-job-based-on-rollup-job-index/256135/2 "2020-11-23T16:22:34Z")

</div>

> Rollup indices and index patterns cannot be used in machine learning jobs or datafeeds. This limitation applies irrespective of whether you create the jobs in Kibana or by using APIs. In Kibana, if you select an index, saved search, or index pattern that uses the Rollup feature, the machine learning job creation wizards fail.

> **[Machine learning anomaly detection limitations | Machine Learning in the...](https://www.elastic.co/guide/en/machine-learning/current/ml-limitations.html#_rollup_indices_and_index_patterns_are_not_supported)**

---

<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:** [December 21, 2020, 4:22pm UTC](https://discuss.elastic.co/t/could-not-create-ml-job-based-on-rollup-job-index/256135/3 "2020-12-21T16:22:34Z")

</div>

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