Skip to content

Commit

Permalink
[ML] single line JSON formatting for queries
Browse files Browse the repository at this point in the history
  • Loading branch information
darnautov committed Jan 6, 2020
1 parent 9a015c3 commit f40d0a2
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 114 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,7 @@
"defaultIndexPattern": "apm-*",
"query": {
"bool": {
"filter": [
{
"term": {
"agent.name": "js-base"
}
}
]
"filter": [{ "term": { "agent.name": "js-base" } }]
}
},
"jobs": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" } } } }
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" } }
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
"max_empty_searches": 10,
"query": {
"bool": {
"filter": {
"term": {
"agent.name": "js-base"
}
}
"filter": { "term": { "agent.name": "js-base" } }
}
},
"aggregations": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" } }] } }
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"time_field": "@timestamp"
},
"custom_settings": {
"created_by": "ml-module-apm-jsbase",
"custom_urls": [
{
"url_name": "APM",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,7 @@
"logoFile": "logo.json",
"defaultIndexPattern": "apm-*",
"query": {
"bool": {
"filter": [
{
"term": {
"agent.name": "nodejs"
}
}
]
}
"bool": { "filter": [{ "term": { "agent.name": "nodejs" } }] }
},
"jobs": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" } } } }
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" } } } }]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
"max_empty_searches": 10,
"query": {
"bool": {
"filter": {
"term": {
"agent.name": "nodejs"
}
}
"filter": { "term": { "agent.name": "nodejs" } }
}
},
"aggregations": {
Expand Down

0 comments on commit f40d0a2

Please sign in to comment.