Definitions

Datafeed Resources

A datafeed resource has the following properties:

aggregations
(object) If set, the datafeed performs aggregation searches. Support for aggregations is limited and should only be used with low cardinality data. For more information, see Aggregating Data For Faster Performance.
chunking_config
(object) Specifies how data searches are split into time chunks. See Chunking Configuration Objects. For example: {"mode": "manual", "time_span": "3h"}
datafeed_id
(string) A numerical character string that uniquely identifies the datafeed.
frequency
(time units) The interval at which scheduled queries are made while the datafeed runs in real time. The default value is either the bucket span for short bucket spans, or, for longer bucket spans, a sensible fraction of the bucket span. For example: 150s.
indexes
(array) An array of index names. For example: ["it_ops_metrics"]
job_id
(string) The unique identifier for the job to which the datafeed sends data.
query
(object) The Elasticsearch query domain-specific language (DSL). This value corresponds to the query object in an Elasticsearch search POST body. All the options that are supported by Elasticsearch can be used, as this object is passed verbatim to Elasticsearch. By default, this property has the following value: {"match_all": {"boost": 1}}.
query_delay
(time units) The number of seconds behind real time that data is queried. For example, if data from 10:04 a.m. might not be searchable in Elasticsearch until 10:06 a.m., set this property to 120 seconds. The default value is 60s.
script_fields

(object) Specifies scripts that evaluate custom expressions and returns script fields to the datafeed. The detector configuration objects in a job can contain functions that use these script fields. For more information, see Script Fields. For example:

{
  "script_fields": {
    "total_error_count": {
      "script": {
        "lang": "painless",
        "inline": "doc['error_count'].value + doc['aborted_count'].value"
      }
    }
  }
}
scroll_size
(unsigned integer) The size parameter that is used in Elasticsearch searches. The default value is 1000.
types
(array) A list of types to search for within the specified indices. For example: ["network","sql","kpi"].

Chunking Configuration Objects

Datafeeds might be required to search over long time periods, for several months or years. This search is split into time chunks in order to ensure the load on Elasticsearch is managed. Chunking configuration controls how the size of these time chunks are calculated and is an advanced configuration option.

A chunking configuration object has the following properties:

mode

There are three available modes:

auto
The chunk size will be dynamically calculated. This is the default and recommended value.
manual
Chunking will be applied according to the specified time_span.
off
No chunking will be applied.
time_span
(time units) The time span that each search will be querying. This setting is only applicable when the mode is set to manual. For example: 3h.

Datafeed Counts

The get datafeed statistics API provides information about the operational progress of a datafeed. For example:

assignment_explanation
(string) For started datafeeds only, contains messages relating to the selection of a node.
datafeed_id
(string) A numerical character string that uniquely identifies the datafeed.
node

(object) The node upon which the datafeed is started. The datafeed and job will be on the same node.

id
The unique identifier of the node. For example, "0-o0tOoRTwKFZifatTWKNw".
name
The node name. For example, 0-o0tOo.
ephemeral_id
The node ephemeral ID.
transport_address
The host and port where transport HTTP connections are accepted. For example, 127.0.0.1:9300.
attributes
For example, {"max_running_jobs": "10"}.
state

(string) The status of the datafeed, which can be one of the following values:

started
The datafeed is actively receiving data.
stopped
The datafeed is stopped and will not receive data until it is re-started.

Job Resources

A job resource has the following properties:

analysis_config
(object) The analysis configuration, which specifies how to analyze the data. See analysis configuration objects.
analysis_limits
(object) Defines approximate limits on the memory resource requirements for the job. See analysis limits.
background_persist_interval
(time units) Advanced configuration option. The time between each periodic persistence of the model. The default value is a randomized value between 3 to 4 hours, which avoids all jobs persisting at exactly the same time. The smallest allowed value is 1 hour.
Tip

For very large models (several GB), persistence could take 10-20 minutes, so do not set the background_persist_interval value too low.

create_time
(string) The time the job was created. For example, 1491007356077.
data_description
(object) Describes the data format and how APIs parse timestamp fields. See data description objects.
description
(string) An optional description of the job.
finished_time
(string) If the job closed or failed, this is the time the job finished, otherwise it is null.
job_id
(string) The unique identifier for the job.
job_type
(string) Reserved for future use, currently set to anomaly_detector.
model_plot_config
(object) Configuration properties for storing additional model information. See model plot configuration.
model_snapshot_id
(string) A numerical character string that uniquely identifies the model snapshot. For example, 1491007364. For more information about model snapshots, see Model Snapshot Resources.
model_snapshot_retention_days
(long) The time in days that model snapshots are retained for the job. Older snapshots are deleted. The default value is 1 day.
renormalization_window_days
(long) Advanced configuration option. The period over which adjustments to the score are applied, as new data is seen. The default value is the longer of 30 days or 100 bucket_spans.
results_index_name
(string) The name of the index in which to store the machine learning results. The default value is shared, which corresponds to the index name .ml-anomalies-shared
results_retention_days
(long) Advanced configuration option. The number of days for which job results are retained. Once per day at 00:30 (server time), results older than this period are deleted from Elasticsearch. The default value is null, which means results are retained.

Analysis Configuration Objects

An analysis configuration object has the following properties:

bucket_span
(time units) The size of the interval that the analysis is aggregated into, typically between 5m and 1h. The default value is 5m.
categorization_field_name
(string) If not null, the values of the specified field will be categorized. The resulting categories can be used in a detector by setting by_field_name, over_field_name, or partition_field_name to the keyword mlcategory.
categorization_filters
(array of strings) If categorization_field_name is specified, you can also define optional filters. This property expects an array of regular expressions. The expressions are used to filter out matching sequences off the categorization field values. This functionality is useful to fine tune categorization by excluding sequences that should not be taken into consideration for defining categories. For example, you can exclude SQL statements that appear in your log files.
detectors
(array) An array of detector configuration objects, which describe the anomaly detectors that are used in the job. See detector configuration objects.
Note

If the detectors array does not contain at least one detector, no analysis can occur and an error is returned.

influencers
(array of strings) A comma separated list of influencer field names. Typically these can be the by, over, or partition fields that are used in the detector configuration. You might also want to use a field name that is not specifically named in a detector, but is available as part of the input data. When you use multiple detectors, the use of influencers is recommended as it aggregates results for each influencer entity.
latency
(unsigned integer) The size of the window, in seconds, in which to expect data that is out of time order. The default value is 0 (no latency).
Note

Latency is only applicable when you send data by using the post data API.

multivariate_by_fields
(boolean) If set to true, the analysis will automatically find correlations between metrics for a given by field value and report anomalies when those correlations cease to hold. For example, suppose CPU and memory usage on host A is usually highly correlated with the same metrics on host B. Perhaps this correlation occurs because they are running a load-balanced application. If you enable this property, then anomalies will be reported when, for example, CPU usage on host A is high and the value of CPU usage on host B is low. That is to say, you’ll see an anomaly when the CPU of host A is unusual given the CPU of host B.
Note

To use the multivariate_by_fields property, you must also specify by_field_name in your detector.

summary_count_field_name
(string) If not null, the data that is fed to the job is expected to be pre-summarized. This property value is the name of the field that contains the count of raw data points that have been summarized. The same summary_count_field_name applies to all detectors in the job.
Note

The summary_count_field_name property cannot be used with the metric function.

Detector Configuration Objects

Detector configuration objects specify which data fields a job analyzes. They also specify which analytical functions are used. You can specify multiple detectors for a job. Each detector has the following properties:

by_field_name
(string) The field used to split the data. In particular, this property is used for analyzing the splits with respect to their own history. It is used for finding unusual values in the context of the split.
detector_description
(string) A description of the detector. For example, Low event rate.
exclude_frequent
(string) Contains one of the following values: all, none, by, or over. If set, frequent entities are excluded from influencing the anomaly results. Entities can be considered frequent over time or frequent in a population. If you are working with both over and by fields, then you can set exclude_frequent to all for both fields, or to by or over for those specific fields.
field_name
(string) The field that the detector uses in the function. If you use an event rate function such as count or rare, do not specify this field.
Note

The field_name cannot contain double quotes or backslashes.

function
(string) The analysis function that is used. For example, count, rare, mean, min, max, and sum. For more information, see the section called “Analytical Functions”.
over_field_name
(string) The field used to split the data. In particular, this property is used for analyzing the splits with respect to the history of all splits. It is used for finding unusual values in the population of all splits.
partition_field_name
(string) The field used to segment the analysis. When you use this property, you have completely independent baselines for each value of this field.
use_null
(boolean) Defines whether a new series is used as the null series when there is no value for the by or partition fields. The default value is false.
Important

Field names are case sensitive, for example a field named Bytes is different from one named bytes.

Data Description Objects

The data description defines the format of the input data when you send data to the job by using the post data API. Note that when configure a datafeed, these properties are automatically set.

When data is received via the post data API, it is not stored in Elasticsearch. Only the results for anomaly detection are retained.

A data description object has the following properties:

format
(string) Only JSON format is supported at this time.
time_field
(string) The name of the field that contains the timestamp. The default value is time.
time_format
(string) The time format, which can be epoch, epoch_ms, or a custom pattern. The default value is epoch, which refers to UNIX or Epoch time (the number of seconds since 1 Jan 1970). The value epoch_ms indicates that time is measured in milliseconds since the epoch. The epoch and epoch_ms time formats accept either integer or real values.
Note

Custom patterns must conform to the Java DateTimeFormatter class. When you use date-time formatting patterns, it is recommended that you provide the full date, time and time zone. For example: yyyy-MM-dd'T'HH:mm:ssX. If the pattern that you specify is not sufficient to produce a complete timestamp, job creation fails.

Analysis Limits

Limits can be applied for the resources required to hold the mathematical models in memory. These limits are approximate and can be set per job. They do not control the memory used by other processes, for example the Elasticsearch Java processes. If necessary, you can increase the limits after the job is created.

The analysis_limits object has the following properties:

categorization_examples_limit
(long) The maximum number of examples stored per category in memory and in the results data store. The default value is 4. If you increase this value, more examples are available, however it requires that you have more storage available. If you set this value to 0, no examples are stored.
Note

The categorization_examples_limit only applies to analysis that uses categorization.

model_memory_limit
(long) The approximate maximum amount of memory resources that are required for analytical processing, in MiB. Once this limit is approached, data pruning becomes more aggressive. Upon exceeding this limit, new entities are not modeled. The default value is 4096.
Model Plot Config

This advanced configuration option stores model information along with the results. It provides a more detailed view into anomaly detection. If you enable this option, it can add considerable overhead to the performance of the system; it is not feasible for jobs with many entities.

Model plot provides a simplified and indicative view of the model and its bounds. It does not display complex features such as multivariate correlations or multimodal data. As such, anomalies may occasionally be reported which cannot be seen in the model plot.

Model plot config can be configured when the job is created or updated later. It must be disabled if performance issues are experienced.

The model_plot_config object has the following properties:

enabled
(boolean) If true, enables calculation and storage of the model bounds for each entity that is being analyzed. By default, this is not enabled.
terms
(string) Limits data collection to this comma separated list of partition or by field names. If terms are not specified or it is an empty string, no filtering is applied. For example, "CPU,NetworkIn,DiskWrites"

Job Statistics

The get job statistics API provides information about the operational progress of a job.

assignment_explanation
(string) For open jobs only, contains messages relating to the selection of a node to run the job.
data_counts
(object) An object that describes the number of records processed and any related error counts. See data counts objects.
job_id
(string) A unique identifier for the job.
model_size_stats
(object) An object that provides information about the size and contents of the model. See model size stats objects
node
(object) For open jobs only, contains information about the node where the job runs. See node object.
open_time
(string) For open jobs only, the elapsed time for which the job has been open. For example, 28746386s.
state

(string) The status of the job, which can be one of the following values:

open
The job is available to receive and process data.
closed
The job finished successfully with its model state persisted. The job must be opened before it can accept further data.
closing
The job close action is in progress and has not yet completed. A closing job cannot accept further data.
failed
The job did not finish successfully due to an error. This situation can occur due to invalid input data. If the job had irrevocably failed, it must be force closed and then deleted. If the datafeed can be corrected, the job can be closed and then re-opened.
Data Counts Objects

The data_counts object describes the number of records processed and any related error counts.

The data_count values are cumulative for the lifetime of a job. If a model snapshot is reverted or old results are deleted, the job counts are not reset.

bucket_count
(long) The number of bucket results produced by the job.
earliest_record_timestamp
(string) The timestamp of the earliest chronologically ordered record. The datetime string is in ISO 8601 format.
empty_bucket_count
(long) The number of buckets which did not contain any data. If your data contains many empty buckets, consider increasing your bucket_span or using functions that are tolerant to gaps in data such as mean, non_null_sum or non_zero_count.
input_bytes
(long) The number of raw bytes read by the job.
input_field_count
(long) The total number of record fields read by the job. This count includes fields that are not used in the analysis.
input_record_count
(long) The number of data records read by the job.
invalid_date_count
(long) The number of records with either a missing date field or a date that could not be parsed.
job_id
(string) A unique identifier for the job.
last_data_time
(datetime) The timestamp at which data was last analyzed, according to server time.
latest_empty_bucket_timestamp
(date) The timestamp of the last bucket that did not contain any data.
latest_record_timestamp
(date) The timestamp of the last processed record.
latest_sparse_bucket_timestamp
(date) The timestamp of the last bucket that was considered sparse.
missing_field_count
(long) The number of records that are missing a field that the job is configured to analyze. Records with missing fields are still processed because it is possible that not all fields are missing. The value of processed_record_count includes this count.
Note

If you are using datafeeds or posting data to the job in JSON format, a high missing_field_count is often not an indication of data issues. It is not necessarily a cause for concern.

out_of_order_timestamp_count
(long) The number of records that are out of time sequence and outside of the latency window. This information is applicable only when you provide data to the job by using the post data API. These out of order records are discarded, since jobs require time series data to be in ascending chronological order.
processed_field_count
(long) The total number of fields in all the records that have been processed by the job. Only fields that are specified in the detector configuration object contribute to this count. The time stamp is not included in this count.
processed_record_count
(long) The number of records that have been processed by the job. This value includes records with missing fields, since they are nonetheless analyzed. If you use datafeeds and have aggregations in your search query, the processed_record_count will be the number of aggregated records processed, not the number of Elasticsearch documents.
sparse_bucket_count
(long) The number of buckets that contained few data points compared to the expected number of data points. If your data contains many sparse buckets, consider using a longer bucket_span.
Model Size Stats Objects

The model_size_stats object has the following properties:

bucket_allocation_failures_count
(long) The number of buckets for which new entities in incoming data were not processed due to insufficient model memory. This situation is also signified by a hard_limit: memory_status property value.
job_id
(string) A numerical character string that uniquely identifies the job.
log_time
(date) The timestamp of the model_size_stats according to server time.
memory_status

(string) The status of the mathematical models. This property can have one of the following values:

ok
The models stayed below the configured value.
soft_limit
The models used more than 60% of the configured memory limit and older unused models will be pruned to free up space.
hard_limit
The models used more space than the configured memory limit. As a result, not all incoming data was processed.
model_bytes
(long) The number of bytes of memory used by the models. This is the maximum value since the last time the model was persisted. If the job is closed, this value indicates the latest size.
result_type
(string) For internal use. The type of result.
total_by_field_count
(long) The number of by field values that were analyzed by the models.+
Note

The by field values are counted separately for each detector and partition.

total_over_field_count
(long) The number of over field values that were analyzed by the models.+
Note

The over field values are counted separately for each detector and partition.

total_partition_field_count
(long) The number of partition field values that were analyzed by the models.
timestamp
(date) The timestamp of the model_size_stats according to the timestamp of the data.
Node Objects

The node objects contains properties for the node that runs the job. This information is available only for open jobs.

id
(string) The unique identifier of the node.
name
(string) The node name.
ephemeral_id
(string) The ephemeral id of the node.
transport_address
(string) The host and port where transport HTTP connections are accepted.
attributes
(object) For example, {"max_running_jobs": "10"}.

Model Snapshot Resources

Model snapshots are saved to disk periodically. By default, this is occurs approximately every 3 hours to 4 hours and is configurable with the background_persist_interval property.

By default, model snapshots are retained for one day. You can change this behavior by updating the model_snapshot_retention_days for the job. When choosing a new value, consider the following:

  • Persistence enables resilience in the event of a system failure.
  • Persistence enables snapshots to be reverted.
  • The time taken to persist a job is proportional to the size of the model in memory.

A model snapshot resource has the following properties:

description
(string) An optional description of the job.
job_id
(string) A numerical character string that uniquely identifies the job that the snapshot was created for.
latest_record_time_stamp
(date) The timestamp of the latest processed record.
latest_result_time_stamp
(date) The timestamp of the latest bucket result.
model_size_stats
(object) Summary information describing the model. See Model Size Statistics.
retain
(boolean) If true, this snapshot will not be deleted during automatic cleanup of snapshots older than model_snapshot_retention_days. However, this snapshot will be deleted when the job is deleted. The default value is false.
snapshot_id
(string) A numerical character string that uniquely identifies the model snapshot. For example: "1491852978".
snapshot_doc_count
(long) For internal use only.
timestamp
(date) The creation timestamp for the snapshot.
Model Size Statistics

The model_size_stats object has the following properties:

bucket_allocation_failures_count
(long) The number of buckets for which entities were not processed due to memory limit constraints.
job_id
(string) A numerical character string that uniquely identifies the job.
log_time
(date) The timestamp that the model_size_stats were recorded, according to server-time.
memory_status

(string) The status of the memory in relation to its model_memory_limit. Contains one of the following values.

ok
The internal models stayed below the configured value.
soft_limit
The internal models require more than 60% of the configured memory limit and more aggressive pruning will be performed in order to try to reclaim space.
hard_limit
The internal models require more space that the configured memory limit. Some incoming data could not be processed.
model_bytes
(long) An approximation of the memory resources required for this analysis.
result_type
(string) Internal. This value is always set to "model_size_stats".
timestamp
(date) The timestamp that the model_size_stats were recorded, according to the bucket timestamp of the data.
total_by_field_count
(long) The number of by field values analyzed. Note that these are counted separately for each detector and partition.
total_over_field_count
(long) The number of over field values analyzed. Note that these are counted separately for each detector and partition.
total_partition_field_count
(long) The number of partition field values analyzed.

Results Resources

Several different result types are created for each job. You can query anomaly results for buckets, influencers and records by using the results API.

Results are written for each bucket_span. The timestamp for the results is the start of the bucket time interval.

The results include scores, which are calculated for each anomaly result type and each bucket interval. These scores are aggregated in order to reduce noise, and normalized in order to identify and rank the most mathematically significant anomalies.

Bucket results provide the top level, overall view of the job and are ideal for alerts. For example, the bucket results might indicate that at 16:05 the system was unusual. This information is a summary of all the anomalies, pinpointing when they occurred.

Influencer results show which entities were anomalous and when. For example, the influencer results might indicate that at 16:05 user_name: Bob was unusual. This information is a summary of all the anomalies for each entity, so there can be a lot of these results. Once you have identified a notable bucket time, you can look to see which entities were significant.

Record results provide details about what the individual anomaly was, when it occurred and which entity was involved. For example, the record results might indicate that at 16:05 Bob sent 837262434 bytes, when the typical value was 1067 bytes. Once you have identified a bucket time and perhaps a significant entity too, you can drill through to the record results in order to investigate the anomalous behavior.

Categorization results contain the definitions of categories that have been identified. These are only applicable for jobs that are configured to analyze unstructured log data using categorization. These results do not contain a timestamp or any calculated scores.

Buckets

Bucket results provide the top level, overall view of the job and are best for alerting.

Each bucket has an anomaly_score, which is a statistically aggregated and normalized view of the combined anomalousness of all the record results within each bucket.

One bucket result is written for each bucket_span for each job, even if it is not considered to be anomalous. If the bucket is not anomalous, it has an anomaly_score of zero.

When you identify an anomalous bucket, you can investigate further by expanding the bucket resource to show the records as nested objects. Alternatively, you can access the records resource directly and filter by the date range.

A bucket resource has the following properties:

anomaly_score
(number) 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_influencers
(array) An array of bucket influencer objects. For more information, see Bucket Influencers.
bucket_span
(time units) The length of the bucket. This value matches the bucket_span that is specified in the job.
event_count
(number) The number of input data records processed in this bucket.
initial_anomaly_score
(number) 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_interim
(boolean) If true, this is an interim result. In other words, the bucket results are calculated based on partial input data.
job_id
(string) The unique identifier for the job that these results belong to.
processing_time_ms
(number) The amount of time, in milliseconds, that it took to analyze the bucket contents and calculate results.
record_count
(number) The number of anomaly records in this bucket.
result_type
(string) Internal. This value is always set to bucket.
timestamp
(date) The start time of the bucket. This timestamp uniquely identifies the bucket.
Note

Events that occur exactly at the timestamp of the bucket are included in the results for the bucket.

Bucket Influencers

Bucket influencer results are available as nested objects contained within bucket results. These results are an aggregation for each type of influencer. For example, if both client_ip and user_name were specified as influencers, then you would be able to determine when the client_ip or user_name values were collectively anomalous.

There is a built-in bucket influencer called bucket_time which is always available. This bucket influencer is the aggregation of all records in the bucket; it is not just limited to a type of influencer.

Note

A bucket influencer is a type of influencer. For example, client_ip or user_name can be bucket influencers, whereas 192.168.88.2 and Bob are influencers.

An bucket influencer object has the following properties:

anomaly_score
(number) A normalized score between 0-100, which is calculated for each bucket influencer. This score might be updated as newer data is analyzed.
bucket_span
(time units) The length of the bucket. This value matches the bucket_span that is specified in the job.
initial_anomaly_score
(number) 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.
influencer_field_name
(string) The field name of the influencer. For example client_ip or user_name.
influencer_field_value
(string) The field value of the influencer. For example 192.168.88.2 or Bob.
is_interim
(boolean) If true, this is an interim result. In other words, the bucket influencer results are calculated based on partial input data.
job_id
(string) The unique identifier for the job that these results belong to.
probability
(number) The probability that the bucket has this behavior, in the range 0 to 1. For example, 0.0000109783. This value can be held to a high precision of over 300 decimal places, so the anomaly_score is provided as a human-readable and friendly interpretation of this.
raw_anomaly_score
(number) Internal.
result_type
(string) Internal. This value is always set to bucket_influencer.
sequence_num
(number) Internal.
timestamp
(date) The start time of the bucket for which these results were calculated.
Influencers

Influencers are the entities that have contributed to, or are to blame for, the anomalies. Influencer results are available only if an influencer_field_name is specified in the job configuration.

Influencers are given an influencer_score, which is calculated based on the anomalies that have occurred in each bucket interval. For jobs with more than one detector, this gives a powerful view of the most anomalous entities.

For example, if you are analyzing unusual bytes sent and unusual domains visited and you specified user_name as the influencer, then an influencer_score for each anomalous user name is written per bucket. For example, if user_name: Bob had an influencer_score greater than 75, then Bob would be considered very anomalous during this time interval in one or both of those areas (unusual bytes sent or unusual domains visited).

One influencer result is written per bucket for each influencer that is considered anomalous.

When you identify an influencer with a high score, you can investigate further by accessing the records resource for that bucket and enumerating the anomaly records that contain the influencer.

An influencer object has the following properties:

bucket_span
(time units) The length of the bucket. This value matches the bucket_span that is specified in the job.
influencer_score
(number) A normalized score between 0-100, which is based on the probability of the influencer in this bucket aggregated across detectors. Unlike initial_influencer_score, this value will be updated by a re-normalization process as new data is analyzed.
initial_influencer_score
(number) A normalized score between 0-100, which is based on the probability of the influencer aggregated across detectors. This is the initial value that was calculated at the time the bucket was processed.
influencer_field_name
(string) The field name of the influencer.
influencer_field_value
(string) The entity that influenced, contributed to, or was to blame for the anomaly.
is_interim
(boolean) If true, this is an interim result. In other words, the influencer results are calculated based on partial input data.
job_id
(string) The unique identifier for the job that these results belong to.
probability
(number) The probability that the influencer has this behavior, in the range 0 to 1. For example, 0.0000109783. This value can be held to a high precision of over 300 decimal places, so the influencer_score is provided as a human-readable and friendly interpretation of this.
result_type
(string) Internal. This value is always set to influencer.
sequence_num
(number) Internal.
timestamp
(date) The start time of the bucket for which these results were calculated.
Note

Additional influencer properties are added, depending on the fields being analyzed. For example, if it’s analyzing user_name as an influencer, then a field user_name is added to the result document. This information enables you to filter the anomaly results more easily.

Records

Records contain the detailed analytical results. They describe the anomalous activity that has been identified in the input data based on the detector configuration.

For example, if you are looking for unusually large data transfers, an anomaly record can identify the source IP address, the destination, the time window during which it occurred, the expected and actual size of the transfer, and the probability of this occurrence.

There can be many anomaly records depending on the characteristics and size of the input data. In practice, there are often too many to be able to manually process them. The X-Pack machine learning features therefore perform a sophisticated aggregation of the anomaly records into buckets.

The number of record results depends on the number of anomalies found in each bucket, which relates to the number of time series being modeled and the number of detectors.

A record object has the following properties:

actual
(array) The actual value for the bucket.
bucket_span
(time units) The length of the bucket. This value matches the bucket_span that is specified in the job.
by_field_name
(string) The name of the analyzed field. This value is present only if it is specified in the detector. For example, client_ip.
by_field_value
(string) The value of by_field_name. This value is present only if it is specified in the detector. For example, 192.168.66.2.
causes
(array) For population analysis, an over field must be specified in the detector. This property contains an array of anomaly records that are the causes for the anomaly that has been identified for the over field. If no over fields exist, this field is not present. This sub-resource contains the most anomalous records for the over_field_name. For scalability reasons, a maximum of the 10 most significant causes of the anomaly are returned. As part of the core analytical modeling, these low-level anomaly records are aggregated for their parent over field record. The causes resource contains similar elements to the record resource, namely actual, typical, *_field_name and *_field_value. Probability and scores are not applicable to causes.
detector_index
(number) A unique identifier for the detector.
field_name
(string) Certain functions require a field to operate on, for example, sum(). For those functions, this value is the name of the field to be analyzed.
function
(string) The function in which the anomaly occurs, as specified in the detector configuration. For example, max.
function_description
(string) The description of the function in which the anomaly occurs, as specified in the detector configuration.
influencers
(array) If influencers was specified in the detector configuration, then this array contains influencers that contributed to or were to blame for an anomaly.
initial_record_score
(number) A normalized score between 0-100, which is based on the probability of the anomalousness of this record. This is the initial value that was calculated at the time the bucket was processed.
is_interim
(boolean) If true, this is an interim result. In other words, the anomaly record is calculated based on partial input data.
job_id
(string) The unique identifier for the job that these results belong to.
over_field_name
(string) The name of the over field that was used in the analysis. This value is present only if it was specified in the detector. Over fields are used in population analysis. For example, user.
over_field_value
(string) The value of over_field_name. This value is present only if it was specified in the detector. For example, Bob.
partition_field_name
(string) The name of the partition field that was used in the analysis. This value is present only if it was specified in the detector. For example, region.
partition_field_value
(string) The value of partition_field_name. This value is present only if it was specified in the detector. For example, us-east-1.
probability
(number) The probability of the individual anomaly occurring, in the range 0 to 1. For example, 0.0000772031. This value can be held to a high precision of over 300 decimal places, so the record_score is provided as a human-readable and friendly interpretation of this.
record_score
(number) A normalized score between 0-100, which is based on the probability of the anomalousness of this record. Unlike initial_record_score, this value will be updated by a re-normalization process as new data is analyzed.
result_type
(string) Internal. This is always set to record.
sequence_num
(number) Internal.
timestamp
(date) The start time of the bucket for which these results were calculated.
typical
(array) The typical value for the bucket, according to analytical modeling.
Note

Additional record properties are added, depending on the fields being analyzed. For example, if it’s analyzing hostname as a by field, then a field hostname is added to the result document. This information enables you to filter the anomaly results more easily.

Categories

When categorization_field_name is specified in the job configuration, it is possible to view the definitions of the resulting categories. A category definition describes the common terms matched and contains examples of matched values.

The anomaly results from a categorization analysis are available as bucket, influencer, and record results. For example, the results might indicate that at 16:45 there was an unusual count of log message category 11. You can then examine the description and examples of that category.

A category resource has the following properties:

category_id
(unsigned integer) A unique identifier for the category.
examples
(array) A list of examples of actual values that matched the category.
job_id
(string) The unique identifier for the job that these results belong to.
max_matching_length
(unsigned integer) The maximum length of the fields that matched the category. The value is increased by 10% to enable matching for similar fields that have not been analyzed.
regex
(string) A regular expression that is used to search for values that match the category.
terms
(string) A space separated list of the common tokens that are matched in values of the category.