Skip to content

Commit

Permalink
[ML] Changes interval to fixed_interval in aggregations in created jo…
Browse files Browse the repository at this point in the history
…bs (#36759)

* [ML] Changes interval to fixed_interval in aggregations in created jobs

* updates following review
  • Loading branch information
jgowdyelastic authored May 22, 2019
1 parent 2a56fb9 commit 0babbf1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ export function SingleMetricJobServiceProvider() {
buckets: {
date_histogram: {
field: formConfig.timeField,
interval: interval
fixed_interval: `${interval}ms`
},
aggregations: {
[formConfig.timeField]: {
Expand All @@ -237,7 +237,7 @@ export function SingleMetricJobServiceProvider() {
buckets: {
date_histogram: {
field: formConfig.timeField,
interval: ((interval / 100) * 10) // use 10% of bucketSpan to allow for better sampling
fixed_interval: `${((interval / 100) * 10)}ms` // use 10% of bucketSpan to allow for better sampling
},
aggregations: {
[dtr.field_name]: {
Expand All @@ -261,7 +261,7 @@ export function SingleMetricJobServiceProvider() {
buckets: {
date_histogram: {
field: formConfig.timeField,
interval: interval
fixed_interval: `${interval}ms`
},
aggregations: {
[formConfig.timeField]: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"buckets": {
"date_histogram": {
"field": "@timestamp",
"interval": 900000,
"fixed_interval": "15m",
"offset": 0,
"order": {
"_key": "asc"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"buckets": {
"date_histogram": {
"field": "@timestamp",
"interval": 900000,
"fixed_interval": "15m",
"offset": 0,
"order": {
"_key": "asc"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"buckets": {
"date_histogram": {
"field": "@timestamp",
"interval": 900000,
"fixed_interval": "15m",
"offset": 0,
"order": {
"_key": "asc"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"buckets": {
"date_histogram": {
"field": "@timestamp",
"interval": 900000,
"fixed_interval": "15m",
"offset": 0,
"order": {
"_key": "asc"
Expand Down

0 comments on commit 0babbf1

Please sign in to comment.