# Kibana M/L API validate check error

**URL:** <https://discuss.elastic.co/t/kibana-m-l-api-validate-check-error/152142>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-machine-learning\
**Created:** [October 12, 2018, 2:05am UTC](https://discuss.elastic.co/t/kibana-m-l-api-validate-check-error/152142 "2018-10-12T02:05:11Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![GibbsKim](https://avatars.discourse-cdn.com/v4/letter/g/4af34b/32.png) [@GibbsKim](https://discuss.elastic.co/u/GibbsKim)\
**Post date:** [October 12, 2018, 2:05am UTC](https://discuss.elastic.co/t/kibana-m-l-api-validate-check-error/152142/1 "2018-10-12T02:05:11Z")

</div>

Hi there. I'm ELK 6.3.1 user.  
When I tested M/L API of Kibana, cannot understanding thing occur.

My data based on MongoDB like below

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/a/3/a384929da18cfb3b49c86864f6a46bb96c35cd9f.jpeg)

I uploaded data to ES and type check also 'Date'.  
However, at validate check on Kibana error message is revealed. Refer below image

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

Anyone could tell me why this situation happen?  
Thanks for reading mine.

---

<div class="post-metadata">

**Author:** ![jbudz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jbudz/32/45922_2.png) [@jbudz](https://discuss.elastic.co/u/jbudz)\
**Post date:** [October 15, 2018, 10:36pm UTC](https://discuss.elastic.co/t/kibana-m-l-api-validate-check-error/152142/2 "2018-10-15T22:36:27Z")

</div>

Wanted to double check, when you request the mappings for (GET per\_test\_181011/\_mappings) receivedAt is listed as type: 'date'?

---

<div class="post-metadata">

**Author:** ![GibbsKim](https://avatars.discourse-cdn.com/v4/letter/g/4af34b/32.png) [@GibbsKim](https://discuss.elastic.co/u/GibbsKim)\
**Post date:** [October 16, 2018, 12:57am UTC](https://discuss.elastic.co/t/kibana-m-l-api-validate-check-error/152142/3 "2018-10-16T00:57:13Z")

</div>

Thank you for your reply.  
First, type of receivedAt is 'date', refer below image  
(index name is different, but same sample data)

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/9/19811bc0870615be13962a172c6a6473d889cc9a.png)

and also M/L shows to me date types field.  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/5/4/54c81aebcd128c450549191743a1b1ab0ae3e6e4.png)  
However, I can not find anomalies through M/L API because of not valid date type.

---

<div class="post-metadata">

**Author:** ![walterra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/walterra/32/139867_2.png) [@walterra](https://discuss.elastic.co/u/walterra)\
**Post date:** [October 16, 2018, 3:14pm UTC](https://discuss.elastic.co/t/kibana-m-l-api-validate-check-error/152142/4 "2018-10-16T15:14:28Z")

</div>

Hi GibbsKim,

Can you try just creating the job even if Job Validation is returning the error? (Job Validation won't stop you from trying to still create the job even if it returns an error)

Let us know if that works. If yes, please also let us know if the results in Anomaly Explorer and Single Metric Viewer show up correctly.

In the meantime, we're trying to reproduce the issue with job validation you're experiencing.

Best,  
Walter

---

<div class="post-metadata">

**Author:** ![GibbsKim](https://avatars.discourse-cdn.com/v4/letter/g/4af34b/32.png) [@GibbsKim](https://discuss.elastic.co/u/GibbsKim)\
**Post date:** [October 17, 2018, 1:14am UTC](https://discuss.elastic.co/t/kibana-m-l-api-validate-check-error/152142/5 "2018-10-17T01:14:26Z")

</div>

Appreciate your reply.  
I made some test samples, below is one of the capture.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/9/19721b27f3acfc3eb7612b65bea16591195a14dc.png)

As I understand, showing anomaly score reason is amount of data.  
It means that when I tested first, used one day's sample but at used quite many date samples (e.g. 4 days)

Though I can see result of M/L API still show not valid Job validation when I create new job. At least now I give up why this happening. Below things are my test capture.  
thank you for your reply again.

(when I clicked 'Validation job')

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/3/13c3ad04094653af9bc959f80c4deb4f71dc3595.png)

(after created finish)

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

---

<div class="post-metadata">

**Author:** ![walterra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/walterra/32/139867_2.png) [@walterra](https://discuss.elastic.co/u/walterra)\
**Post date:** [October 17, 2018, 12:34pm UTC](https://discuss.elastic.co/t/kibana-m-l-api-validate-check-error/152142/6 "2018-10-17T12:34:04Z")

</div>

Thanks for all the details you provided. We identified a bug with job validation: It fails to identify the date field if it's a nested field, for example like in your case `metadata.receivedAt`. I filed a bug here: [https://github.com/elastic/kibana/issues/24129](https://github.com/elastic/kibana/issues/24129)

Update: A bugfix is in and will be released with the upcoming 6.5 Elastic Stack release.

---

<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:** [November 14, 2018, 12:44pm UTC](https://discuss.elastic.co/t/kibana-m-l-api-validate-check-error/152142/7 "2018-11-14T12:44:20Z")

</div>

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