-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[APM] Cannot create ML jobs for services with spaces in their name #62370
Comments
Pinging @elastic/apm-ui (Team:apm) |
@Jaraxal I've created a 7.6.1 deployment on cloud and indexed some APM data, but I'm not able to reproduce this. Any ML jobs are successfully created. Are you still running into this? |
@dgieselaar Yes, I'm still seeing this behavior. Doesn't matter which APM service I try to create an ML job for, it has the same behavior. |
There should be a request to a Kibana ML endpoint in your network tab. Can you check the response? (both status and content). |
@dgieselaar The request under the network tab is:
The response was My service names have spaces in them. Is that a potential issue? |
Could be! That is the request to search for any existing jobs. There should be another that attempts to create one, a POST request. Is it not there? |
The 404 above is when I first click on the
Followed by:
|
Here is more detailed info from the second link above (apm_transaction):
Looks like the spaces are a problem in the name of my services. |
Right, so my best guess right now is that we are not properly encoding the
service name before sending it to the ML API. I'll try to confirm, if that
is the case I will file a bug.
Op wo 15 apr. 2020 19:45 schreef Michael Young <[email protected]>:
… Here is more detailed info from the second link above (apm_transaction):
{jobs: [{id: "python wmata app-bus-incidents-high_mean_response_time", success: false, error: {,…}}],…}
datafeeds: [,…]
0: {id: "datafeed-python wmata app-bus-incidents-high_mean_response_time", success: false, started: false,…}
error: {,…}
body: "{"job_id":"python wmata app-bus-incidents-high_mean_response_time","indices":["apm-*"],"query":{"bool":{"filter":[{"term":{"service.name":"Python WMATA App"}},{"term":{"processor.event":"transaction"}},{"term":{"transaction.type":"bus-incidents"}}]}}}"
msg: "[status_exception] Invalid datafeed_id; 'datafeed-python wmata app-bus-incidents-high_mean_response_time' can contain lowercase alphanumeric (a-z and 0-9), hyphens or underscores; must start and end with alphanumeric"
path: "/_ml/datafeeds/datafeed-python%20wmata%20app-bus-incidents-high_mean_response_time"
query: {}
response: "{"error":{"root_cause":[{"type":"status_exception","reason":"Invalid datafeed_id; 'datafeed-python wmata app-bus-incidents-high_mean_response_time' can contain lowercase alphanumeric (a-z and 0-9), hyphens or underscores; must start and end with alphanumeric"}],"type":"status_exception","reason":"Invalid datafeed_id; 'datafeed-python wmata app-bus-incidents-high_mean_response_time' can contain lowercase alphanumeric (a-z and 0-9), hyphens or underscores; must start and end with alphanumeric"},"status":400}"
statusCode: 400
id: "datafeed-python wmata app-bus-incidents-high_mean_response_time"
started: false
success: false
jobs: [{id: "python wmata app-bus-incidents-high_mean_response_time", success: false, error: {,…}}]
0: {id: "python wmata app-bus-incidents-high_mean_response_time", success: false, error: {,…}}
error: {,…}
body: "{"job_type":"anomaly_detector","groups":["apm","python wmata app","bus-incidents"],"description":"Detect anomalies in high mean of transaction ***@***.***"},"model_plot_config":{"enabled":true},"custom_settings":{"created_by":"ml-module-apm-transaction"}}"
msg: "[illegal_argument_exception] Invalid job_id; 'python wmata app-bus-incidents-high_mean_response_time' can contain lowercase alphanumeric (a-z and 0-9), hyphens or underscores; must start and end with alphanumeric"
path: "/_ml/anomaly_detectors/python%20wmata%20app-bus-incidents-high_mean_response_time"
query: {}
response: "{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Invalid job_id; 'python wmata app-bus-incidents-high_mean_response_time' can contain lowercase alphanumeric (a-z and 0-9), hyphens or underscores; must start and end with alphanumeric"}],"type":"illegal_argument_exception","reason":"Invalid job_id; 'python wmata app-bus-incidents-high_mean_response_time' can contain lowercase alphanumeric (a-z and 0-9), hyphens or underscores; must start and end with alphanumeric"},"status":400}"
statusCode: 400
id: "python wmata app-bus-incidents-high_mean_response_time"
success: false
kibana: {}
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#62370 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACWDXFRKR4KJFPQDZLO2CTRMXXD3ANCNFSM4L23BLXA>
.
|
Closes elastic#62370. Per https://github.com/elastic/elasticsearch/blob/95a7eed9aa35f47b228e402508709b5bd6703cf4/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/MlStrings.java#L20-L26, spaces are not supported in job and group ids.
Closes #62370. Per https://github.com/elastic/elasticsearch/blob/95a7eed9aa35f47b228e402508709b5bd6703cf4/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/MlStrings.java#L20-L26, spaces are not supported in job and group ids.
Closes elastic#62370. Per https://github.com/elastic/elasticsearch/blob/95a7eed9aa35f47b228e402508709b5bd6703cf4/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/MlStrings.java#L20-L26, spaces are not supported in job and group ids.
Closes #62370. Per https://github.com/elastic/elasticsearch/blob/95a7eed9aa35f47b228e402508709b5bd6703cf4/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/utils/MlStrings.java#L20-L26, spaces are not supported in job and group ids.
Kibana version:
7.6.1
Elasticsearch version:
7.6.1
Server OS version:
Elastic Cloud (on GCP)
Browser version:
Microsoft Edge Version 80.0.361.109 (Official build) (64-bit)
Browser OS version:
Mac OS X 10.14.6
Original install method (e.g. download page, yum, from source, etc.):
Installed via Elastic Cloud
Describe the bug:
When I try to create an ML job through the APM UI "Integrations" dropdown, an ML job is not created as expected. The blue button labeled "Create new job" goes from blue to gray and the popout window appears to get stuck.
Steps to reproduce:
Expected behavior:
The expected behavior is an ML job should be created and the popout window should go away.
Screenshots (if relevant):

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):
Logs not available from Elastic Cloud
Any additional context:
Machine Learning is enabled with existing ML jobs working fine. A platinum license is present.
The text was updated successfully, but these errors were encountered: