Error Machine Learning in APM with Basic License

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

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:

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

3 Likes

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

@dgieselaar @dgieselaar

This shows up in the Kibana log.

For Machine Learning you need to upgrade your license.

Hi,

That error is showed in Kibana's log.

Thanks in advance,

Regards

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.

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

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

Hi,

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

Regards

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}"}

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 :smiley: .

Thanks for your support,

Regards

1 Like

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.

1 Like

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