# Error Machine Learning in APM with Basic License

**URL:** <https://discuss.elastic.co/t/error-machine-learning-in-apm-with-basic-license/288490>\
**Category:** APM\
**Tags:** docker, server, ui\
**Created:** [November 5, 2021, 11:47am UTC](https://discuss.elastic.co/t/error-machine-learning-in-apm-with-basic-license/288490 "2021-11-05T11:47:18Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![RdrgPorto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rdrgporto/32/13278_2.png) [@RdrgPorto](https://discuss.elastic.co/u/RdrgPorto)\
**Post date:** [November 5, 2021, 11:47am UTC](https://discuss.elastic.co/t/error-machine-learning-in-apm-with-basic-license/288490/1 "2021-11-05T11:47:18Z")

</div>

**Kibana version** : 7.15.1

**Elasticsearch version** : 7.15.1

**APM Server version** : 7.15.1

**APM Agent language and version** : NodeJS ^3.17.0

**Browser version** : Microsoft Edge 95.0.1020.40

**Original install method (e.g. download page, yum, deb, from source, etc.) and version**: Kubernetes with official Docker image [docker.elastic.co/apm/apm-server:7.15.1](http://docker.elastic.co/apm/apm-server:7.15.1)

**Fresh install or upgraded from other version?** Upgraded from 7.14.2

**Is there anything special in your setup?** For example, are you using the Logstash or Kafka outputs? Are you using a load balancer in front of the APM Servers? Have you changed index pattern, generated custom templates, changed agent configuration etc.

APM Server --\> Apache Kafka --\> Logstash --\> Elasticsearch

**Description of the problem including expected versus actual behavior. Please include screenshots (if relevant)**:

Hi, everyone

I have an **Elastic Stack** with **basic license**. When I access to **APM UI** , **Kibana** show the follow error:

```auto
Error: To use anomaly detection, you must be subscribed to an Elastic Platinum license. With it, you'll be able to monitor your services with the aid of machine learning.
    at handler (/usr/share/kibana/x-pack/plugins/apm/server/routes/settings/anomaly_detection.js:115:27)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at /usr/share/kibana/x-pack/plugins/apm/server/routes/register_routes/index.js:148:13
    at Router.handle (/usr/share/kibana/src/core/server/http/router/router.js:163:30)
    at handler (/usr/share/kibana/src/core/server/http/router/router.js:124:50)

```

Is it normal this kind of behaviour ?

Thanks in advance,

Rodrigo

---

<div class="post-metadata">

**Author:** ![dgieselaar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dgieselaar/32/46947_2.png) [@dgieselaar](https://discuss.elastic.co/u/dgieselaar)\
**Post date:** [November 5, 2021, 11:58am UTC](https://discuss.elastic.co/t/error-machine-learning-in-apm-with-basic-license/288490/2 "2021-11-05T11:58:31Z")

</div>

> [@RdrgPorto](#):
>
> `To use anomaly detection, you must be subscribed to an Elastic Platinum license. With it, you'll be able to monitor your services with the aid of machine learning.`

Does the Kibana UI show this error, or the logs?

---

<div class="post-metadata">

**Author:** ![zx8086](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zx8086/32/94917_2.png) [@zx8086](https://discuss.elastic.co/u/zx8086)\
**Post date:** [November 5, 2021, 12:01pm UTC](https://discuss.elastic.co/t/error-machine-learning-in-apm-with-basic-license/288490/3 "2021-11-05T12:01:55Z")

</div>

@dgieselaar @dgieselaar

This shows up in the Kibana log.

For Machine Learning you need to upgrade your license.

---

<div class="post-metadata">

**Author:** ![RdrgPorto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rdrgporto/32/13278_2.png) [@RdrgPorto](https://discuss.elastic.co/u/RdrgPorto)\
**Post date:** [November 5, 2021, 12:13pm UTC](https://discuss.elastic.co/t/error-machine-learning-in-apm-with-basic-license/288490/4 "2021-11-05T12:13:16Z")

</div>

Hi,

That error is showed in **Kibana's log**.

Thanks in advance,

Regards

---

<div class="post-metadata">

**Author:** ![dgieselaar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dgieselaar/32/46947_2.png) [@dgieselaar](https://discuss.elastic.co/u/dgieselaar)\
**Post date:** [November 5, 2021, 12:14pm UTC](https://discuss.elastic.co/t/error-machine-learning-in-apm-with-basic-license/288490/5 "2021-11-05T12:14:55Z")

</div>

Thank you (and @zx8086). Indeed, you need to upgrade your license to be able to use Machine Learning, as mentioned by the error message:

> To use anomaly detection, you must be subscribed to an Elastic Platinum license. With it, you'll be able to monitor your services with the aid of machine learning.

The error should _not_ show up in the UI though, only in logs, but looks like it only shows up in the latter, which is expected.

---

<div class="post-metadata">

**Author:** ![RdrgPorto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rdrgporto/32/13278_2.png) [@RdrgPorto](https://discuss.elastic.co/u/RdrgPorto)\
**Post date:** [November 5, 2021, 12:19pm UTC](https://discuss.elastic.co/t/error-machine-learning-in-apm-with-basic-license/288490/6 "2021-11-05T12:19:08Z")

</div>

Hi,

I understand the error. Nevertheless, I do not understand why it appears when I use a basic license. For instance, with **Elastic Stack 7.14.2 this error does not show up**.

Thanks,

Regards

---

<div class="post-metadata">

**Author:** ![dgieselaar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dgieselaar/32/46947_2.png) [@dgieselaar](https://discuss.elastic.co/u/dgieselaar)\
**Post date:** [November 6, 2021, 4:16pm UTC](https://discuss.elastic.co/t/error-machine-learning-in-apm-with-basic-license/288490/7 "2021-11-06T16:16:41Z")

</div>

Do you have an idea of what page is triggering this error showing up in the Kibana server-side logs?

---

<div class="post-metadata">

**Author:** ![RdrgPorto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rdrgporto/32/13278_2.png) [@RdrgPorto](https://discuss.elastic.co/u/RdrgPorto)\
**Post date:** [November 6, 2021, 4:29pm UTC](https://discuss.elastic.co/t/error-machine-learning-in-apm-with-basic-license/288490/8 "2021-11-06T16:29:56Z")

</div>

Hi,

It showed up when I access to APM UI (Observabilty).

Regards

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [November 6, 2021, 4:58pm UTC](https://discuss.elastic.co/t/error-machine-learning-in-apm-with-basic-license/288490/9 "2021-11-06T16:58:57Z")

</div>

Hi @RdrgPorto

Apologies I am a little confused about the concern / issue.

Is there something that is not working as expected?

I just deployed 7.14.2. and the same error messages are in the kibana log file. I am not an expert on the internal mechanism of how we do feature flagging / licensing etc but our philosophy is to show feature and the have the GUI alert the use when necessary. Behind the scene there are many API calls, some of which would pull in functionality if the appropriate license is applied, is the license is not available they throw an internal error / log message, it's just part of the framework, there is not serious error. I did a quick look at the code and to me those message have been in the code back to at least 2020, probably earlier... but perhaps i am mistaken.

From my brand new clean installation of 7.14.2 and navigation to the APM UI Screen here is the log

> kib01 | {"type":"log","@timestamp":"2021-11-06T16:52:19+00:00","tags":["error","plugins","apm"],"pid":1216,"message":"Error: To use anomaly detection, you must be subscribed to an Elastic Platinum license. With it, you'll be able to monitor your services with the aid of machine learning.\n at handler (/usr/share/kibana/x-pack/plugins/apm/server/routes/settings/anomaly\_detection.js:115:27)\n at runMicrotasks ()\n at processTicksAndRejections (internal/process/task\_queues.js:95:5)\n at /usr/share/kibana/x-pack/plugins/apm/server/routes/register\_routes/index.js:139:22\n at Router.handle (/usr/share/kibana/src/core/server/http/router/router.js:163:30)\n at handler (/usr/share/kibana/src/core/server/http/router/router.js:124:50)\n at exports.Manager.execute (/usr/share/kibana/node\_modules/@hapi/hapi/lib/toolkit.js:60:28)\n at Object.internals.handler (/usr/share/kibana/node\_modules/@hapi/hapi/lib/handler.js:46:20)\n at exports.execute (/usr/share/kibana/node\_modules/@hapi/hapi/lib/handler.js:31:20)\n at Request.\_lifecycle (/usr/share/kibana/node\_modules/@hapi/hapi/lib/request.js:370:32)\n at Request.\_execute (/usr/share/kibana/node\_modules/@hapi/hapi/lib/request.js:279:9) {\n data: null,\n isBoom: true,\n isServer: false,\n output: {\n statusCode: 403,\n payload: {\n statusCode: 403,\n error: 'Forbidden',\n message: "To use anomaly detection, you must be subscribed to an Elastic Platinum license. With it, you'll be able to monitor your services with the aid of machine learning."\n },\n headers: {}\n }\n}"}

---

<div class="post-metadata">

**Author:** ![RdrgPorto](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rdrgporto/32/13278_2.png) [@RdrgPorto](https://discuss.elastic.co/u/RdrgPorto)\
**Post date:** [November 10, 2021, 8:28pm UTC](https://discuss.elastic.co/t/error-machine-learning-in-apm-with-basic-license/288490/10 "2021-11-10T20:28:34Z")

</div>

Hi,

From my point of view, **Elasticsearch & Kibana with basic license** should not have anything related to machine learning because it is a premium feature.

I understand and respect your philosophy 😃 .

Thanks for your support,

Regards

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [November 10, 2021, 9:58pm UTC](https://discuss.elastic.co/t/error-machine-learning-in-apm-with-basic-license/288490/11 "2021-11-10T21:58:50Z")

</div>

Yes agree, there there are a number of "philosophies" on this...

My Last company had "Greyed Out" features in one product, the other product (same company) did not show any unlicensed features...

BTW Actually **there are** Basic / Free Machine Learning features that is why it is there... Data Vizualizer is an Free / Basic ML Feature which is used to import data or visualize and existing index. You will notice the other features are greyed out.

 ![Screen Shot 2021-11-10 at 1.39.58 PM](https://us1.discourse-cdn.com/elastic/original/3X/e/0/e0d29ba4afa30b9a925facaa37782adf89ec5079.png)

---

<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 1, 2021, 5:59pm UTC](https://discuss.elastic.co/t/error-machine-learning-in-apm-with-basic-license/288490/12 "2021-12-01T17:59:40Z")

</div>

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