From f40d0a205dc8e20394e6900b6f98946d857a5b69 Mon Sep 17 00:00:00 2001 From: Dima Arnautov Date: Mon, 6 Jan 2020 10:49:03 +0100 Subject: [PATCH] [ML] single line JSON formatting for queries --- .../modules/apm_jsbase/manifest.json | 8 +------ ...tafeed_abnormal_span_durations_jsbase.json | 20 ++--------------- ...ous_error_rate_for_user_agents_jsbase.json | 16 ++------------ .../datafeed_decreased_throughput_jsbase.json | 6 +---- ...afeed_high_count_by_user_agent_jsbase.json | 22 ++----------------- .../ml/decreased_throughput_jsbase.json | 1 + .../modules/apm_nodejs/manifest.json | 10 +-------- ...tafeed_abnormal_span_durations_nodejs.json | 20 ++--------------- ...afeed_abnormal_trace_durations_nodejs.json | 20 ++--------------- .../datafeed_decreased_throughput_nodejs.json | 6 +---- 10 files changed, 15 insertions(+), 114 deletions(-) diff --git a/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/manifest.json b/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/manifest.json index eabe7d395395e6..e463b34be0fc27 100644 --- a/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/manifest.json +++ b/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/manifest.json @@ -7,13 +7,7 @@ "defaultIndexPattern": "apm-*", "query": { "bool": { - "filter": [ - { - "term": { - "agent.name": "js-base" - } - } - ] + "filter": [{ "term": { "agent.name": "js-base" } }] } }, "jobs": [ diff --git a/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/ml/datafeed_abnormal_span_durations_jsbase.json b/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/ml/datafeed_abnormal_span_durations_jsbase.json index 3197ad81978288..7ecbe2890b826c 100644 --- a/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/ml/datafeed_abnormal_span_durations_jsbase.json +++ b/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/ml/datafeed_abnormal_span_durations_jsbase.json @@ -7,24 +7,8 @@ "query": { "bool": { "must": [ - { - "bool": { - "filter": { - "term": { - "agent.name": "js-base" - } - } - } - }, - { - "bool": { - "filter": { - "term": { - "processor.event": "span" - } - } - } - } + { "bool": { "filter": { "term": { "agent.name": "js-base" } } } }, + { "bool": { "filter": { "term": { "processor.event": "span" } } } } ] } } diff --git a/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/ml/datafeed_anomalous_error_rate_for_user_agents_jsbase.json b/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/ml/datafeed_anomalous_error_rate_for_user_agents_jsbase.json index 9d1ae6e931913f..fbfedcbf47561b 100644 --- a/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/ml/datafeed_anomalous_error_rate_for_user_agents_jsbase.json +++ b/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/ml/datafeed_anomalous_error_rate_for_user_agents_jsbase.json @@ -7,20 +7,8 @@ "query": { "bool": { "must": [ - { - "bool": { - "filter": { - "term": { - "agent.name": "js-base" - } - } - } - }, - { - "exists": { - "field": "user_agent.name" - } - } + { "bool": { "filter": { "term": { "agent.name": "js-base" } } } }, + { "exists": { "field": "user_agent.name" } } ] } } diff --git a/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/ml/datafeed_decreased_throughput_jsbase.json b/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/ml/datafeed_decreased_throughput_jsbase.json index adb76dbde91eb2..3c77e50ec6b369 100644 --- a/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/ml/datafeed_decreased_throughput_jsbase.json +++ b/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/ml/datafeed_decreased_throughput_jsbase.json @@ -6,11 +6,7 @@ "max_empty_searches": 10, "query": { "bool": { - "filter": { - "term": { - "agent.name": "js-base" - } - } + "filter": { "term": { "agent.name": "js-base" } } } }, "aggregations": { diff --git a/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/ml/datafeed_high_count_by_user_agent_jsbase.json b/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/ml/datafeed_high_count_by_user_agent_jsbase.json index db505ac1812434..a5cb5f39f2dba0 100644 --- a/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/ml/datafeed_high_count_by_user_agent_jsbase.json +++ b/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/ml/datafeed_high_count_by_user_agent_jsbase.json @@ -7,26 +7,8 @@ "query": { "bool": { "must": [ - { - "bool": { - "filter": { - "term": { - "agent.name": "js-base" - } - } - } - }, - { - "bool": { - "filter": [ - { - "exists": { - "field": "user_agent.name" - } - } - ] - } - } + { "bool": { "filter": { "term": { "agent.name": "js-base" } } } }, + { "bool": { "filter": [{ "exists": { "field": "user_agent.name" } }] } } ] } } diff --git a/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/ml/decreased_throughput_jsbase.json b/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/ml/decreased_throughput_jsbase.json index 2f26b73786ad3e..7101390de985a7 100644 --- a/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/ml/decreased_throughput_jsbase.json +++ b/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_jsbase/ml/decreased_throughput_jsbase.json @@ -25,6 +25,7 @@ "time_field": "@timestamp" }, "custom_settings": { + "created_by": "ml-module-apm-jsbase", "custom_urls": [ { "url_name": "APM", diff --git a/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_nodejs/manifest.json b/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_nodejs/manifest.json index 1001123d071384..1865a33a1d3011 100644 --- a/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_nodejs/manifest.json +++ b/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_nodejs/manifest.json @@ -6,15 +6,7 @@ "logoFile": "logo.json", "defaultIndexPattern": "apm-*", "query": { - "bool": { - "filter": [ - { - "term": { - "agent.name": "nodejs" - } - } - ] - } + "bool": { "filter": [{ "term": { "agent.name": "nodejs" } }] } }, "jobs": [ { diff --git a/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_nodejs/ml/datafeed_abnormal_span_durations_nodejs.json b/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_nodejs/ml/datafeed_abnormal_span_durations_nodejs.json index db4e97206d45ae..3e4f4877bd0424 100644 --- a/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_nodejs/ml/datafeed_abnormal_span_durations_nodejs.json +++ b/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_nodejs/ml/datafeed_abnormal_span_durations_nodejs.json @@ -7,24 +7,8 @@ "query": { "bool": { "must": [ - { - "bool": { - "filter": { - "term": { - "agent.name": "nodejs" - } - } - } - }, - { - "bool": { - "filter": { - "term": { - "processor.event": "span" - } - } - } - } + { "bool": { "filter": { "term": { "agent.name": "nodejs" } } } }, + { "bool": { "filter": { "term": { "processor.event": "span" } } } } ] } } diff --git a/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_nodejs/ml/datafeed_abnormal_trace_durations_nodejs.json b/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_nodejs/ml/datafeed_abnormal_trace_durations_nodejs.json index 4245087cb1b451..d87f809a499406 100644 --- a/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_nodejs/ml/datafeed_abnormal_trace_durations_nodejs.json +++ b/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_nodejs/ml/datafeed_abnormal_trace_durations_nodejs.json @@ -6,24 +6,8 @@ "max_empty_searches": 10, "query": { "bool": { - "must_not": [ - { - "exists": { - "field": "parent.id" - } - } - ], - "must": [ - { - "bool": { - "filter": { - "term": { - "agent.name": "nodejs" - } - } - } - } - ] + "must_not": [{ "exists": { "field": "parent.id" } }], + "must": [{ "bool": { "filter": { "term": { "agent.name": "nodejs" } } } }] } } } diff --git a/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_nodejs/ml/datafeed_decreased_throughput_nodejs.json b/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_nodejs/ml/datafeed_decreased_throughput_nodejs.json index 9a6f1f94855b01..59ad6558aa5b94 100644 --- a/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_nodejs/ml/datafeed_decreased_throughput_nodejs.json +++ b/x-pack/legacy/plugins/ml/server/models/data_recognizer/modules/apm_nodejs/ml/datafeed_decreased_throughput_nodejs.json @@ -6,11 +6,7 @@ "max_empty_searches": 10, "query": { "bool": { - "filter": { - "term": { - "agent.name": "nodejs" - } - } + "filter": { "term": { "agent.name": "nodejs" } } } }, "aggregations": {