-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* [ML] apm modules * [ML] apm modules * [ML] update mocha test * [ML] fix config * [ML] single line JSON formatting for queries * [ML] remove an empty path component with a trailing slash * [ML] change detector descriptions, remove scroll size * [ML] remove chunking_config from datafeeds * [ML] fix configs Co-authored-by: Elastic Machine <[email protected]> Co-authored-by: Elastic Machine <[email protected]>
- Loading branch information
1 parent
b50e5ff
commit a8e578f
Showing
21 changed files
with
633 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/logo.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"icon": "apmApp" | ||
} |
53 changes: 53 additions & 0 deletions
53
x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/manifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"id": "apm_jsbase", | ||
"title": "APM: RUM Javascript", | ||
"description": "Detect problematic spans and identify user agents that are potentially causing issues.", | ||
"type": "APM data", | ||
"logoFile": "logo.json", | ||
"defaultIndexPattern": "apm-*", | ||
"query": { | ||
"bool": { | ||
"filter": [{ "term": { "agent.name": "js-base" } }] | ||
} | ||
}, | ||
"jobs": [ | ||
{ | ||
"id": "abnormal_span_durations_jsbase", | ||
"file": "abnormal_span_durations_jsbase.json" | ||
}, | ||
{ | ||
"id": "anomalous_error_rate_for_user_agents_jsbase", | ||
"file": "anomalous_error_rate_for_user_agents_jsbase.json" | ||
}, | ||
{ | ||
"id": "decreased_throughput_jsbase", | ||
"file": "decreased_throughput_jsbase.json" | ||
}, | ||
{ | ||
"id": "high_count_by_user_agent_jsbase", | ||
"file": "high_count_by_user_agent_jsbase.json" | ||
} | ||
], | ||
"datafeeds": [ | ||
{ | ||
"id": "datafeed-abnormal_span_durations_jsbase", | ||
"file": "datafeed_abnormal_span_durations_jsbase.json", | ||
"job_id": "abnormal_span_durations_jsbase" | ||
}, | ||
{ | ||
"id": "datafeed-anomalous_error_rate_for_user_agents_jsbase", | ||
"file": "datafeed_anomalous_error_rate_for_user_agents_jsbase.json", | ||
"job_id": "anomalous_error_rate_for_user_agents_jsbase" | ||
}, | ||
{ | ||
"id": "datafeed-decreased_throughput_jsbase", | ||
"file": "datafeed_decreased_throughput_jsbase.json", | ||
"job_id": "decreased_throughput_jsbase" | ||
}, | ||
{ | ||
"id": "datafeed-high_count_by_user_agent_jsbase", | ||
"file": "datafeed_high_count_by_user_agent_jsbase.json", | ||
"job_id": "high_count_by_user_agent_jsbase" | ||
} | ||
] | ||
} |
41 changes: 41 additions & 0 deletions
41
...l/server/models/data_recognizer/modules/apm_jsbase/ml/abnormal_span_durations_jsbase.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"job_type": "anomaly_detector", | ||
"groups": [ | ||
"apm" | ||
], | ||
"description": "APM JSBase: Looks for spans that are taking longer than usual to process.", | ||
"analysis_config": { | ||
"bucket_span": "15m", | ||
"detectors": [ | ||
{ | ||
"detector_description": "increased span duration", | ||
"function": "high_mean", | ||
"field_name": "span.duration.us", | ||
"partition_field_name": "span.type" | ||
} | ||
], | ||
"influencers": [ | ||
"span.type", | ||
"trace.id", | ||
"span.name", | ||
"service.name" | ||
] | ||
}, | ||
"allow_lazy_open": true, | ||
"analysis_limits": { | ||
"model_memory_limit": "128mb" | ||
}, | ||
"data_description": { | ||
"time_field": "@timestamp" | ||
}, | ||
"custom_settings": { | ||
"created_by": "ml-module-apm-jsbase", | ||
"custom_urls": [ | ||
{ | ||
"url_name": "APM", | ||
"time_range": "2h", | ||
"url_value": "apm#/traces?rangeFrom=$earliest$&rangeTo=$latest$&kuery=trace.id:\"$trace.id$\"&_g=()" | ||
} | ||
] | ||
} | ||
} |
40 changes: 40 additions & 0 deletions
40
...ls/data_recognizer/modules/apm_jsbase/ml/anomalous_error_rate_for_user_agents_jsbase.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"job_type": "anomaly_detector", | ||
"groups": [ | ||
"apm" | ||
], | ||
"description": "APM JSBase: Detects user agents that are encountering errors at an above normal rate. This can help detect browser compatibility issues.", | ||
"analysis_config": { | ||
"bucket_span": "15m", | ||
"detectors": [ | ||
{ | ||
"detector_description": "high error rate for user agent", | ||
"function": "high_non_zero_count", | ||
"partition_field_name": "user_agent.name" | ||
} | ||
], | ||
"influencers": [ | ||
"user_agent.name", | ||
"error.exception.message.keyword", | ||
"error.page.url", | ||
"service.name" | ||
] | ||
}, | ||
"allow_lazy_open": true, | ||
"analysis_limits": { | ||
"model_memory_limit": "32mb" | ||
}, | ||
"data_description": { | ||
"time_field": "@timestamp" | ||
}, | ||
"custom_settings": { | ||
"created_by": "ml-module-apm-jsbase", | ||
"custom_urls": [ | ||
{ | ||
"url_name": "APM", | ||
"time_range": "2h", | ||
"url_value": "apm#/services/$service.name$/errors?rangeFrom=$earliest$&rangeTo=$latest$&refreshPaused=true&refreshInterval=0&kuery=user_agent.name:\"$user_agent.name$\"&_g=()" | ||
} | ||
] | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...models/data_recognizer/modules/apm_jsbase/ml/datafeed_abnormal_span_durations_jsbase.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"job_id": "JOB_ID", | ||
"indices": [ | ||
"INDEX_PATTERN_NAME" | ||
], | ||
"max_empty_searches": 10, | ||
"query": { | ||
"bool": { | ||
"must": [ | ||
{ "bool": { "filter": { "term": { "agent.name": "js-base" } } } }, | ||
{ "bool": { "filter": { "term": { "processor.event": "span" } } } } | ||
] | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...ecognizer/modules/apm_jsbase/ml/datafeed_anomalous_error_rate_for_user_agents_jsbase.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"job_id": "JOB_ID", | ||
"indices": [ | ||
"INDEX_PATTERN_NAME" | ||
], | ||
"max_empty_searches": 10, | ||
"query": { | ||
"bool": { | ||
"must": [ | ||
{ "bool": { "filter": { "term": { "agent.name": "js-base" } } } }, | ||
{ "exists": { "field": "user_agent.name" } } | ||
] | ||
} | ||
} | ||
} |
Oops, something went wrong.