You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to enable ML on a monitor with an autogenerated ID and got the following error:
Looking in the network debugger I see the following response:
We should:
Surface the error visibly to the user
Only send valid job names. I'm a bit confused because the job name seems valid. We need to see what's up here.
{
"JSON": {
"jobs": [{
"id": "auto-icmp-0X270404C479E6C53A_high_latency_by_geo",
"success": false,
"error": {
"msg": "[illegal_argument_exception] Invalid job_id; 'auto-icmp-0X270404C479E6C53A_high_latency_by_geo' can contain lowercase alphanumeric (a-z and 0-9), hyphens or underscores; must start and end with alphanumeric",
"path": "/_ml/anomaly_detectors/auto-icmp-0X270404C479E6C53A_high_latency_by_geo",
"query": {},
"body": "{\"job_type\":\"anomaly_detector\",\"groups\":[\"uptime\"],\"description\":\"Uptime Heartbeat: Identify periods of increased latency across geographical regions.\",\"analysis_config\":{\"bucket_span\":\"15m\",\"detectors\":[{\"detector_description\":\"increased latency\",\"function\":\"high_mean\",\"field_name\":\"monitor.duration.us\",\"partition_field_name\":\"observer.geo.name\",\"use_null\":true}],\"influencers\":[\"monitor.id\",\"monitor.name\",\"observer.geo.name\"]},\"allow_lazy_open\":true,\"analysis_limits\":{\"model_memory_limit\":\"32mb\"},\"data_description\":{\"time_field\":\"@timestamp\"},\"custom_settings\":{\"created_by\":\"ml-module-uptime-heartbeat\",\"custom_urls\":[]}}",
"statusCode": 400,
"response": "{\"error\":{\"root_cause\":[{\"type\":\"illegal_argument_exception\",\"reason\":\"Invalid job_id; 'auto-icmp-0X270404C479E6C53A_high_latency_by_geo' 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; 'auto-icmp-0X270404C479E6C53A_high_latency_by_geo' can contain lowercase alphanumeric (a-z and 0-9), hyphens or underscores; must start and end with alphanumeric\"},\"status\":400}"
}
}],
"datafeeds": [{
"id": "datafeed-auto-icmp-0X270404C479E6C53A_high_latency_by_geo",
"success": false,
"started": false,
"error": {
"msg": "[status_exception] Invalid datafeed_id; 'datafeed-auto-icmp-0X270404C479E6C53A_high_latency_by_geo' can contain lowercase alphanumeric (a-z and 0-9), hyphens or underscores; must start and end with alphanumeric",
"path": "/_ml/datafeeds/datafeed-auto-icmp-0X270404C479E6C53A_high_latency_by_geo",
"query": {},
"body": "{\"job_id\":\"auto-icmp-0X270404C479E6C53A_high_latency_by_geo\",\"indices\":[\"heartbeat-8*\"],\"max_empty_searches\":10,\"query\":{\"bool\":{\"filter\":[{\"term\":{\"monitor.id\":\"auto-icmp-0X270404C479E6C53A\"}}]}}}",
"statusCode": 400,
"response": "{\"error\":{\"root_cause\":[{\"type\":\"status_exception\",\"reason\":\"Invalid datafeed_id; 'datafeed-auto-icmp-0X270404C479E6C53A_high_latency_by_geo' 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-auto-icmp-0X270404C479E6C53A_high_latency_by_geo' can contain lowercase alphanumeric (a-z and 0-9), hyphens or underscores; must start and end with alphanumeric\"},\"status\":400}"
}
}],
"kibana": {}
},
"Response Payload": {
"EDITOR_CONFIG": {
"text": "{\"jobs\":[{\"id\":\"auto-icmp-0X270404C479E6C53A_high_latency_by_geo\",\"success\":false,\"error\":{\"msg\":\"[illegal_argument_exception] Invalid job_id; 'auto-icmp-0X270404C479E6C53A_high_latency_by_geo' can contain lowercase alphanumeric (a-z and 0-9), hyphens or underscores; must start and end with alphanumeric\",\"path\":\"/_ml/anomaly_detectors/auto-icmp-0X270404C479E6C53A_high_latency_by_geo\",\"query\":{},\"body\":\"{\\\"job_type\\\":\\\"anomaly_detector\\\",\\\"groups\\\":[\\\"uptime\\\"],\\\"description\\\":\\\"Uptime Heartbeat: Identify periods of increased latency across geographical regions.\\\",\\\"analysis_config\\\":{\\\"bucket_span\\\":\\\"15m\\\",\\\"detectors\\\":[{\\\"detector_description\\\":\\\"increased latency\\\",\\\"function\\\":\\\"high_mean\\\",\\\"field_name\\\":\\\"monitor.duration.us\\\",\\\"partition_field_name\\\":\\\"observer.geo.name\\\",\\\"use_null\\\":true}],\\\"influencers\\\":[\\\"monitor.id\\\",\\\"monitor.name\\\",\\\"observer.geo.name\\\"]},\\\"allow_lazy_open\\\":true,\\\"analysis_limits\\\":{\\\"model_memory_limit\\\":\\\"32mb\\\"},\\\"data_description\\\":{\\\"time_field\\\":\\\"@timestamp\\\"},\\\"custom_settings\\\":{\\\"created_by\\\":\\\"ml-module-uptime-heartbeat\\\",\\\"custom_urls\\\":[]}}\",\"statusCode\":400,\"response\":\"{\\\"error\\\":{\\\"root_cause\\\":[{\\\"type\\\":\\\"illegal_argument_exception\\\",\\\"reason\\\":\\\"Invalid job_id; 'auto-icmp-0X270404C479E6C53A_high_latency_by_geo' 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; 'auto-icmp-0X270404C479E6C53A_high_latency_by_geo' can contain lowercase alphanumeric (a-z and 0-9), hyphens or underscores; must start and end with alphanumeric\\\"},\\\"status\\\":400}\"}}],\"datafeeds\":[{\"id\":\"datafeed-auto-icmp-0X270404C479E6C53A_high_latency_by_geo\",\"success\":false,\"started\":false,\"error\":{\"msg\":\"[status_exception] Invalid datafeed_id; 'datafeed-auto-icmp-0X270404C479E6C53A_high_latency_by_geo' can contain lowercase alphanumeric (a-z and 0-9), hyphens or underscores; must start and end with alphanumeric\",\"path\":\"/_ml/datafeeds/datafeed-auto-icmp-0X270404C479E6C53A_high_latency_by_geo\",\"query\":{},\"body\":\"{\\\"job_id\\\":\\\"auto-icmp-0X270404C479E6C53A_high_latency_by_geo\\\",\\\"indices\\\":[\\\"heartbeat-8*\\\"],\\\"max_empty_searches\\\":10,\\\"query\\\":{\\\"bool\\\":{\\\"filter\\\":[{\\\"term\\\":{\\\"monitor.id\\\":\\\"auto-icmp-0X270404C479E6C53A\\\"}}]}}}\",\"statusCode\":400,\"response\":\"{\\\"error\\\":{\\\"root_cause\\\":[{\\\"type\\\":\\\"status_exception\\\",\\\"reason\\\":\\\"Invalid datafeed_id; 'datafeed-auto-icmp-0X270404C479E6C53A_high_latency_by_geo' 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-auto-icmp-0X270404C479E6C53A_high_latency_by_geo' can contain lowercase alphanumeric (a-z and 0-9), hyphens or underscores; must start and end with alphanumeric\\\"},\\\"status\\\":400}\"}}],\"kibana\":{}}",
"mode": "application/json"
}
}
}
The text was updated successfully, but these errors were encountered:
I tried to enable ML on a monitor with an autogenerated ID and got the following error:
Looking in the network debugger I see the following response:
We should:
The text was updated successfully, but these errors were encountered: