[DOCS] Compacted setup scripts in build.gradle (elastic/x-pack-elasticsearch#3573)

Original commit: elastic/x-pack-elasticsearch@265950c186
This commit is contained in:
Lisa Cawley 2018-01-25 09:33:21 -08:00 committed by GitHub
parent b6c9e96304
commit 705804ee0c

View File

@ -253,41 +253,7 @@ setups['server_metrics_job'] = '''
}
}
'''
setups['server_metrics_openjob'] = '''
- do:
indices.create:
index: server-metrics
body:
settings:
number_of_shards: 1
number_of_replicas: 0
mappings:
metric:
properties:
timestamp:
type: date
total:
type: long
- do:
xpack.ml.put_job:
job_id: "total-requests"
body: >
{
"description" : "Total sum of requests",
"analysis_config" : {
"bucket_span":"10m",
"detectors" :[
{
"detector_description": "Sum of total",
"function": "sum",
"field_name": "total"
}
]},
"data_description" : {
"time_field":"timestamp",
"time_format": "epoch_ms"
}
}
setups['server_metrics_openjob'] = setups['server_metrics_job'] + '''
- do:
xpack.ml.put_datafeed:
datafeed_id: "datafeed-total-requests"
@ -301,54 +267,7 @@ setups['server_metrics_openjob'] = '''
xpack.ml.open_job:
job_id: "total-requests"
'''
setups['server_metrics_startdf'] = '''
- do:
indices.create:
index: server-metrics
body:
settings:
number_of_shards: 1
number_of_replicas: 0
mappings:
metric:
properties:
timestamp:
type: date
total:
type: long
- do:
xpack.ml.put_job:
job_id: "total-requests"
body: >
{
"description" : "Total sum of requests",
"analysis_config" : {
"bucket_span":"10m",
"detectors" :[
{
"detector_description": "Sum of total",
"function": "sum",
"field_name": "total"
}
]},
"data_description" : {
"time_field":"timestamp",
"time_format": "epoch_ms"
}
}
- do:
xpack.ml.put_datafeed:
datafeed_id: "datafeed-total-requests"
body: >
{
"job_id":"total-requests",
"indexes":"server-metrics",
"types":"metric"
}
- do:
xpack.ml.open_job:
job_id: "total-requests"
setups['server_metrics_startdf'] = setups['server_metrics_openjob'] + '''
- do:
xpack.ml.start_datafeed:
datafeed_id: "datafeed-total-requests"