This commit is contained in:
parent
818a709377
commit
459d57f4c5
|
@ -35,6 +35,19 @@
|
||||||
job_id: old-cluster-job
|
job_id: old-cluster-job
|
||||||
- match: { count: 1 }
|
- match: { count: 1 }
|
||||||
|
|
||||||
|
---
|
||||||
|
"Test get old cluster job's timing stats":
|
||||||
|
- skip:
|
||||||
|
version: " - 7.2.99"
|
||||||
|
reason: timing_stats was introduced in 7.3.0
|
||||||
|
- do:
|
||||||
|
ml.get_job_stats:
|
||||||
|
job_id: old-cluster-job-with-ts
|
||||||
|
- match: { jobs.0.job_id: old-cluster-job-with-ts }
|
||||||
|
- match: { jobs.0.state: "closed" }
|
||||||
|
- match: { jobs.0.timing_stats.job_id: old-cluster-job-with-ts }
|
||||||
|
- gte: { jobs.0.timing_stats.bucket_count: 0 }
|
||||||
|
|
||||||
---
|
---
|
||||||
"Test get old cluster categorization job":
|
"Test get old cluster categorization job":
|
||||||
- do:
|
- do:
|
||||||
|
|
|
@ -169,6 +169,64 @@
|
||||||
index: [".ml-state", ".ml-anomalies-shared"]
|
index: [".ml-state", ".ml-anomalies-shared"]
|
||||||
wait_for_status: green
|
wait_for_status: green
|
||||||
|
|
||||||
|
---
|
||||||
|
"Put job with timing stats checking on the old cluster and post some data":
|
||||||
|
|
||||||
|
- do:
|
||||||
|
ml.put_job:
|
||||||
|
job_id: old-cluster-job-with-ts
|
||||||
|
body: >
|
||||||
|
{
|
||||||
|
"description":"Cluster upgrade with timing stats checking",
|
||||||
|
"analysis_config" : {
|
||||||
|
"bucket_span": "60s",
|
||||||
|
"detectors" :[{"function":"metric","field_name":"responsetime","by_field_name":"airline"}]
|
||||||
|
},
|
||||||
|
"analysis_limits" : {
|
||||||
|
"model_memory_limit": "50mb"
|
||||||
|
},
|
||||||
|
"data_description" : {
|
||||||
|
"format":"xcontent",
|
||||||
|
"time_field":"time",
|
||||||
|
"time_format":"epoch"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- match: { job_id: old-cluster-job-with-ts }
|
||||||
|
|
||||||
|
- do:
|
||||||
|
ml.open_job:
|
||||||
|
job_id: old-cluster-job-with-ts
|
||||||
|
|
||||||
|
- do:
|
||||||
|
ml.post_data:
|
||||||
|
job_id: old-cluster-job-with-ts
|
||||||
|
body:
|
||||||
|
- airline: AAL
|
||||||
|
responsetime: 132.2046
|
||||||
|
sourcetype: post-data-job
|
||||||
|
time: 1403481600
|
||||||
|
- airline: JZA
|
||||||
|
responsetime: 990.4628
|
||||||
|
sourcetype: post-data-job
|
||||||
|
time: 1403481700
|
||||||
|
- match: { processed_record_count: 2 }
|
||||||
|
|
||||||
|
- do:
|
||||||
|
ml.close_job:
|
||||||
|
job_id: old-cluster-job-with-ts
|
||||||
|
|
||||||
|
- do:
|
||||||
|
ml.get_buckets:
|
||||||
|
job_id: old-cluster-job-with-ts
|
||||||
|
- match: { count: 1 }
|
||||||
|
|
||||||
|
# Wait for indices to be fully allocated before
|
||||||
|
# killing the node
|
||||||
|
- do:
|
||||||
|
cluster.health:
|
||||||
|
index: [".ml-state", ".ml-anomalies-shared"]
|
||||||
|
wait_for_status: green
|
||||||
|
|
||||||
---
|
---
|
||||||
"Put job with empty strings in the configuration":
|
"Put job with empty strings in the configuration":
|
||||||
- do:
|
- do:
|
||||||
|
|
|
@ -109,6 +109,26 @@ setup:
|
||||||
name: ".ml-state-write"
|
name: ".ml-state-write"
|
||||||
- is_true: ''
|
- is_true: ''
|
||||||
|
|
||||||
|
---
|
||||||
|
"Test get old cluster job's timing stats":
|
||||||
|
- do:
|
||||||
|
ml.get_job_stats:
|
||||||
|
job_id: old-cluster-job-with-ts
|
||||||
|
- match: { jobs.0.job_id: old-cluster-job-with-ts }
|
||||||
|
- match: { jobs.0.state: "closed" }
|
||||||
|
- match: { jobs.0.timing_stats.job_id: old-cluster-job-with-ts }
|
||||||
|
- gte: { jobs.0.timing_stats.bucket_count: 0 }
|
||||||
|
|
||||||
|
- do:
|
||||||
|
ml.delete_job:
|
||||||
|
job_id: old-cluster-job-with-ts
|
||||||
|
- match: { acknowledged: true }
|
||||||
|
|
||||||
|
- do:
|
||||||
|
catch: missing
|
||||||
|
ml.get_jobs:
|
||||||
|
job_id: old-cluster-job-with-ts
|
||||||
|
|
||||||
---
|
---
|
||||||
"Test job with pre 6.4 rules":
|
"Test job with pre 6.4 rules":
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue