# ML newbie - where are results stored and for how long

**URL:** <https://discuss.elastic.co/t/ml-newbie-where-are-results-stored-and-for-how-long/210184>\
**Category:** Kibana\
**Tags:** elastic-stack-machine-learning\
**Created:** [December 2, 2019, 12:48pm UTC](https://discuss.elastic.co/t/ml-newbie-where-are-results-stored-and-for-how-long/210184 "2019-12-02T12:48:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefws](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stefws/32/6442_2.png) [@stefws](https://discuss.elastic.co/u/stefws)\
**Post date:** [December 2, 2019, 12:48pm UTC](https://discuss.elastic.co/t/ml-newbie-where-are-results-stored-and-for-how-long/210184/1 "2019-12-02T12:48:32Z")

</div>

Are initially playing a bit with ML and wondering about where and for how long ML processing results are stored and how to maintain such data.

Eg. got a ML job which seems to indicate anormalities prior to existing data as data are removed by index management. How to like-wise maintain ML results?

 ![03](https://us1.discourse-cdn.com/elastic/original/3X/8/d/8d253463f34594ad93031f60aad20525b85a1834.png)

---

<div class="post-metadata">

**Author:** ![edsavage](https://avatars.discourse-cdn.com/v4/letter/e/c67d28/32.png) [@edsavage](https://discuss.elastic.co/u/edsavage)\
**Post date:** [December 2, 2019, 4:47pm UTC](https://discuss.elastic.co/t/ml-newbie-where-are-results-stored-and-for-how-long/210184/2 "2019-12-02T16:47:10Z")

</div>

Hi Steffen,

thanks for playing with our ML product. We hope you're enjoying it so far.

The results are stored in a special "system" index. By default this index is called `.ml-anomalies-shared`. You can view this index from the management console but you will need to `Include system indices` to view them:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/c/5cfb260535d10b52b05a5a82d28bcb878631afe9.png)

You can get some brief information about your results by clicking on the index name and then clicking on the `Summary` tab.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/6/868e38706a983a08e0765c413246ae7c70bb931d.png)

more detailed information can be found by exploring the other tabs.

How long the results are stored is configurable. Full details are in the documentation [https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-job-resource.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-job-resource.html). The relevant setting is

`results_retention_days`

(long) Advanced configuration option. The number of days for which job results are retained. Once per day at 00:30 (server time), results older than this period are deleted from Elasticsearch. The default value is null, which means results are retained.

Hope this helps & happy festive season!

Ed

---

<div class="post-metadata">

**Author:** ![stefws](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stefws/32/6442_2.png) [@stefws](https://discuss.elastic.co/u/stefws)\
**Post date:** [December 3, 2019, 7:03am UTC](https://discuss.elastic.co/t/ml-newbie-where-are-results-stored-and-for-how-long/210184/3 "2019-12-03T07:03:30Z")

</div>

Thanks for your reply!

Could the advanced settings be edited for an existing job?

I only found it possible to do this by cloning an existing job and then adding a setting in the 'Edit JSON' tab

---

<div class="post-metadata">

**Author:** ![edsavage](https://avatars.discourse-cdn.com/v4/letter/e/c67d28/32.png) [@edsavage](https://discuss.elastic.co/u/edsavage)\
**Post date:** [December 3, 2019, 9:57am UTC](https://discuss.elastic.co/t/ml-newbie-where-are-results-stored-and-for-how-long/210184/4 "2019-12-03T09:57:15Z")

</div>

Morning Steffen,

Cloning the job in order to reconfigure is indeed a valid approach but is inconvenient for long running or real time jobs.

We do offer a REST API that allows updating the configuration of certain parameters and luckily `results_retention_days` is on that list [https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/ml-update-job.html)

You can use the `Dev Tools` console to interact with the REST API

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/c/7c3c473158c9fecb81acf57e2d5e3c7fc830cc10.png)

or, if you prefer you can always use 3rd party utilities such as `curl`, `postman` etc.

Hope that helps,

Cheers, Ed

---

<div class="post-metadata">

**Author:** ![stefws](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stefws/32/6442_2.png) [@stefws](https://discuss.elastic.co/u/stefws)\
**Post date:** [December 6, 2019, 9:41am UTC](https://discuss.elastic.co/t/ml-newbie-where-are-results-stored-and-for-how-long/210184/5 "2019-12-06T09:41:52Z")

</div>

@edsavage Thanks!

---

<div class="post-metadata">

**Author:** ![edsavage](https://avatars.discourse-cdn.com/v4/letter/e/c67d28/32.png) [@edsavage](https://discuss.elastic.co/u/edsavage)\
**Post date:** [December 6, 2019, 9:44am UTC](https://discuss.elastic.co/t/ml-newbie-where-are-results-stored-and-for-how-long/210184/6 "2019-12-06T09:44:02Z")

</div>

np 🙂

---

<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:** [January 3, 2020, 9:44am UTC](https://discuss.elastic.co/t/ml-newbie-where-are-results-stored-and-for-how-long/210184/7 "2020-01-03T09:44:02Z")

</div>

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