# No single metric view on ML job with scripted field

**URL:** <https://discuss.elastic.co/t/no-single-metric-view-on-ml-job-with-scripted-field/169321>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-machine-learning\
**Created:** [February 21, 2019, 4:29am UTC](https://discuss.elastic.co/t/no-single-metric-view-on-ml-job-with-scripted-field/169321 "2019-02-21T04:29:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nandrik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nandrik/32/39951_2.png) [@nandrik](https://discuss.elastic.co/u/nandrik)\
**Post date:** [February 21, 2019, 4:29am UTC](https://discuss.elastic.co/t/no-single-metric-view-on-ml-job-with-scripted-field/169321/1 "2019-02-21T04:29:29Z")

</div>

I've followed the instructions on how "[Machine Learning on scripted field?](https://discuss.elastic.co/t/machine-learning-on-scripted-field/89054/2)" and have successfully set up an ML job where in the Anomaly Explorer I can see and verify visually the anomalies detected at the expected times.

However, both on the lower part of the anomaly explorer and also on the Single Metric Viewer, there are no graphs. On the Single Metric Viewer, I cannot even select it under the jobs as it's grayed out.

The steps I've followed to set up this job are:

1. Created a new advanced ML job, added name, description, etc.
2. Edited the JSON tab and added the scripted field with the desired name for that field
3. Previewed the datafeed and verified that the scripted field's output was there and that the numbers made sense
4. Went to the "analysis configuration tab" and added a detector on the new scripted field's name (which was now there)
5. Saved it and ran the feed

**Update 1** : I also found this post [Single metric viewer, greyed out](https://discuss.elastic.co/t/single-metric-viewer-greyed-out/145236) which however must be for an older version of elasticsearch since the behavior seems different in my case (no error messages, just cannot select it).

**Update 2** : Found this post: [[6.2.4] machine learning on scripted field](https://discuss.elastic.co/t/6-2-4-machine-learning-on-scripted-field/132146) which is a later one and which says that rightfully so the single metric viewer does not support scripted fields and should by design be greyed out.

@dmitri, given that I'm running 6.5 and we're at 6.6 now, wonder if there any updates on this or any workarounds?

---

<div class="post-metadata">

**Author:** ![dmitri](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dmitri/32/17997_2.png) [@dmitri](https://discuss.elastic.co/u/dmitri)\
**Post date:** [February 21, 2019, 10:12am UTC](https://discuss.elastic.co/t/no-single-metric-view-on-ml-job-with-scripted-field/169321/2 "2019-02-21T10:12:21Z")

</div>

I'm afraid the limitation is still the case.

There is an issue capturing the request to handle scripted fields: [https://github.com/elastic/kibana/issues/18464](https://github.com/elastic/kibana/issues/18464)

You can track any progress there.

---

<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:** [March 21, 2019, 10:12am UTC](https://discuss.elastic.co/t/no-single-metric-view-on-ml-job-with-scripted-field/169321/3 "2019-03-21T10:12:24Z")

</div>

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