Skip to content

Commit aa4d3f4

Browse files
Michael Hirschelasticmachine
andauthored
[ML] Updates APM Module to Work with Service Maps (#70361) (#70616)
* updates apm integration job to work with service maps * rename apm job in setup_module test * modifies detector description Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
1 parent 660c9e7 commit aa4d3f4

File tree

5 files changed

+45
-40
lines changed

5 files changed

+45
-40
lines changed
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
{
22
"id": "apm_transaction",
33
"title": "APM",
4-
"description": "Detect anomalies in high mean of transaction duration (ECS).",
4+
"description": "Detect anomalies in transactions from your APM services.",
55
"type": "Transaction data",
66
"logoFile": "logo.json",
7-
"defaultIndexPattern": "apm-*",
7+
"defaultIndexPattern": "apm-*-transaction",
88
"query": {
99
"bool": {
1010
"filter": [
1111
{ "term": { "processor.event": "transaction" } },
12-
{ "term": { "transaction.type": "request" } }
12+
{ "exists": { "field": "transaction.duration" } }
1313
]
1414
}
1515
},
1616
"jobs": [
1717
{
18-
"id": "high_mean_response_time",
19-
"file": "high_mean_response_time.json"
18+
"id": "high_mean_transaction_duration",
19+
"file": "high_mean_transaction_duration.json"
2020
}
2121
],
2222
"datafeeds": [
2323
{
24-
"id": "datafeed-high_mean_response_time",
25-
"file": "datafeed_high_mean_response_time.json",
26-
"job_id": "high_mean_response_time"
24+
"id": "datafeed-high_mean_transaction_duration",
25+
"file": "datafeed_high_mean_transaction_duration.json",
26+
"job_id": "high_mean_transaction_duration"
2727
}
2828
]
2929
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"bool": {
88
"filter": [
99
{ "term": { "processor.event": "transaction" } },
10-
{ "term": { "transaction.type": "request" } }
10+
{ "exists": { "field": "transaction.duration.us" } }
1111
]
1212
}
1313
}

x-pack/plugins/ml/server/models/data_recognizer/modules/apm_transaction/ml/high_mean_response_time.json

Lines changed: 0 additions & 30 deletions
This file was deleted.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"job_type": "anomaly_detector",
3+
"groups": [
4+
"apm"
5+
],
6+
"description": "Detect transaction duration anomalies across transaction types for your APM services.",
7+
"analysis_config": {
8+
"bucket_span": "15m",
9+
"detectors": [
10+
{
11+
"detector_description": "high duration by transaction type for an APM service",
12+
"function": "high_mean",
13+
"field_name": "transaction.duration.us",
14+
"by_field_name": "transaction.type",
15+
"partition_field_name": "service.name"
16+
}
17+
],
18+
"influencers": [
19+
"transaction.type",
20+
"service.name"
21+
]
22+
},
23+
"analysis_limits": {
24+
"model_memory_limit": "32mb"
25+
},
26+
"data_description": {
27+
"time_field": "@timestamp"
28+
},
29+
"model_plot_config": {
30+
"enabled": true
31+
},
32+
"custom_settings": {
33+
"created_by": "ml-module-apm-transaction"
34+
}
35+
}

x-pack/test/api_integration/apis/ml/modules/setup_module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ export default ({ getService }: FtrProviderContext) => {
218218
responseCode: 200,
219219
jobs: [
220220
{
221-
jobId: 'pf5_high_mean_response_time',
221+
jobId: 'pf5_high_mean_transaction_duration',
222222
jobState: JOB_STATE.CLOSED,
223223
datafeedState: DATAFEED_STATE.STOPPED,
224224
modelMemoryLimit: '11mb',

0 commit comments

Comments
 (0)