Get anomaly detection job results for buckets
- POST also GET /_ml/anomaly_detectors/{job_id}/results/buckets/{timestamp}
- POST also GET /_ml/anomaly_detectors/{job_id}/results/buckets
The API presents a chronological view of the records, grouped by bucket.
- Cluster privileges:
monitor_ml
Query Parameters
-
anomaly_scorenumber · default: 0 Returns buckets with anomaly scores greater or equal than this value.
-
descboolean · default: false If
true, the buckets are sorted in descending order.-
endDateTime · default: -1 Returns buckets with timestamps earlier than this time.
-1means it is unset and results are not limited to specific timestamps.-
exclude_interimboolean · default: false If
true, the output excludes interim results.-
expandboolean · default: false If true, the output includes anomaly records.
-
fromnumber · default: 0 Skips the specified number of buckets.
-
sizenumber · default: 100 Specifies the maximum number of buckets to obtain.
-
sortstring Field · default: timestamp Specifies the sort field for the requested buckets.
-
startDateTime · default: -1 Returns buckets with timestamps after this time.
-1means it is unset and results are not limited to specific timestamps.
Request
-
anomaly_scorenumber · default: 0 -
Refer to the description for the
anomaly_scorequery parameter. -
descboolean · default: false -
Refer to the description for the
descquery parameter. -
endDateTime · default: -1 -
Refer to the description for the
endquery parameter. -
exclude_interimboolean · default: false -
Refer to the description for the
exclude_interimquery parameter. -
expandboolean · default: false -
Refer to the description for the
expandquery parameter. -
pagePage -
sortstring Field · default: timestamp -
Refer to the desription for the
sortquery parameter. -
startDateTime · default: -1 -
Refer to the description for the
startquery parameter.
Response
-
bucketsBucketSummaryrequired -
anomaly_scorenumberrequired -
The maximum anomaly score, between 0-100, for any of the bucket influencers. This is an overall, rate-limited score for the job. All the anomaly records in the bucket contribute to this score. This value might be updated as new data is analyzed.
-
bucket_influencersBucketInfluencerrequired -
anomaly_scorenumberrequired -
A normalized score between 0-100, which is calculated for each bucket influencer. This score might be updated as newer data is analyzed.
-
bucket_spanDurationValueUnitSecondsrequired -
The length of the bucket in seconds. This value matches the bucket span that is specified in the job.
-
influencer_field_namestring Fieldrequired -
The field name of the influencer.
-
initial_anomaly_scorenumberrequired -
The score between 0-100 for each bucket influencer. This score is the initial value that was calculated at the time the bucket was processed.
-
is_interimbooleanrequired -
If true, this is an interim result. In other words, the results are calculated based on partial input data.
-
job_idstring Idrequired -
Identifier for the anomaly detection job.
-
probabilitynumberrequired -
The probability that the bucket has this behavior, in the range 0 to 1. This value can be held to a high precision of over 300 decimal places, so the
anomaly_scoreis provided as a human-readable and friendly interpretation of this. -
raw_anomaly_scorenumberrequired -
Internal.
-
result_typestringrequired -
Internal. This value is always set to
bucket_influencer. -
timestampEpochTimeUnitMillisrequired -
The start time of the bucket for which these results were calculated.
-
timestamp_stringDateTime -
The start time of the bucket for which these results were calculated.
-
bucket_spanDurationValueUnitSecondsrequired -
The length of the bucket in seconds. This value matches the bucket span that is specified in the job.
-
event_countnumberrequired -
The number of input data records processed in this bucket.
-
initial_anomaly_scorenumberrequired -
The maximum anomaly score for any of the bucket influencers. This is the initial value that was calculated at the time the bucket was processed.
-
is_interimbooleanrequired -
If true, this is an interim result. In other words, the results are calculated based on partial input data.
-
job_idstring Idrequired -
Identifier for the anomaly detection job.
-
processing_time_msDurationValueUnitMillisrequired -
The amount of time, in milliseconds, that it took to analyze the bucket contents and calculate results.
-
result_typestringrequired -
Internal. This value is always set to bucket.
-
timestampEpochTimeUnitMillisrequired -
The start time of the bucket. This timestamp uniquely identifies the bucket. Events that occur exactly at the timestamp of the bucket are included in the results for the bucket.
-
timestamp_stringDateTime -
The start time of the bucket. This timestamp uniquely identifies the bucket. Events that occur exactly at the timestamp of the bucket are included in the results for the bucket.
-
countnumberrequired