Class AnalysisConfig.Builder
- All Implemented Interfaces:
WithJson<AnalysisConfig.Builder>,ObjectBuilder<AnalysisConfig>
- Enclosing class:
- AnalysisConfig
AnalysisConfig.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal AnalysisConfig.BuilderbucketSpan(Time value) The size of the interval that the analysis is aggregated into, typically between5mand1h.final AnalysisConfig.BuilderThe size of the interval that the analysis is aggregated into, typically between5mand1h.build()Builds aAnalysisConfig.final AnalysisConfig.BuilderIfcategorization_field_nameis specified, you can also define the analyzer that is used to interpret the categorization field.final AnalysisConfig.BuildercategorizationAnalyzer(Function<CategorizationAnalyzer.Builder, ObjectBuilder<CategorizationAnalyzer>> fn) Ifcategorization_field_nameis specified, you can also define the analyzer that is used to interpret the categorization field.final AnalysisConfig.BuildercategorizationFieldName(String value) If this property is specified, the values of the specified field will be categorized.final AnalysisConfig.BuildercategorizationFilters(String value, String... values) Ifcategorization_field_nameis specified, you can also define optional filters.final AnalysisConfig.BuildercategorizationFilters(List<String> list) Ifcategorization_field_nameis specified, you can also define optional filters.final AnalysisConfig.BuilderRequired - Detector configuration objects specify which data fields a job analyzes.final AnalysisConfig.BuilderRequired - Detector configuration objects specify which data fields a job analyzes.final AnalysisConfig.BuilderRequired - Detector configuration objects specify which data fields a job analyzes.final AnalysisConfig.Builderinfluencers(String value, String... values) A comma separated list of influencer field names.final AnalysisConfig.Builderinfluencers(List<String> list) A comma separated list of influencer field names.final AnalysisConfig.BuilderThe size of the window in which to expect data that is out of time order.final AnalysisConfig.BuilderThe size of the window in which to expect data that is out of time order.final AnalysisConfig.BuildermodelPruneWindow(Time value) Advanced configuration option.final AnalysisConfig.BuilderAdvanced configuration option.final AnalysisConfig.BuildermultivariateByFields(Boolean value) This functionality is reserved for internal use.final AnalysisConfig.BuilderSettings related to how categorization interacts with partition fields.final AnalysisConfig.BuilderperPartitionCategorization(Function<PerPartitionCategorization.Builder, ObjectBuilder<PerPartitionCategorization>> fn) Settings related to how categorization interacts with partition fields.protected AnalysisConfig.Builderself()final AnalysisConfig.BuildersummaryCountFieldName(String value) If this property is specified, the data that is fed to the job is expected to be pre-summarized.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
bucketSpan
The size of the interval that the analysis is aggregated into, typically between5mand1h. This value should be either a whole number of days or equate to a whole number of buckets in one day. If the anomaly detection job uses a datafeed with aggregations, this value must also be divisible by the interval of the date histogram aggregation.API name:
bucket_span -
bucketSpan
The size of the interval that the analysis is aggregated into, typically between5mand1h. This value should be either a whole number of days or equate to a whole number of buckets in one day. If the anomaly detection job uses a datafeed with aggregations, this value must also be divisible by the interval of the date histogram aggregation.API name:
bucket_span -
categorizationAnalyzer
Ifcategorization_field_nameis specified, you can also define the analyzer that is used to interpret the categorization field. This property cannot be used at the same time ascategorization_filters. The categorization analyzer specifies how thecategorization_fieldis interpreted by the categorization process. Thecategorization_analyzerfield can be specified either as a string or as an object. If it is a string, it must refer to a built-in analyzer or one added by another plugin.API name:
categorization_analyzer -
categorizationAnalyzer
public final AnalysisConfig.Builder categorizationAnalyzer(Function<CategorizationAnalyzer.Builder, ObjectBuilder<CategorizationAnalyzer>> fn) Ifcategorization_field_nameis specified, you can also define the analyzer that is used to interpret the categorization field. This property cannot be used at the same time ascategorization_filters. The categorization analyzer specifies how thecategorization_fieldis interpreted by the categorization process. Thecategorization_analyzerfield can be specified either as a string or as an object. If it is a string, it must refer to a built-in analyzer or one added by another plugin.API name:
categorization_analyzer -
categorizationFieldName
If this property is specified, the values of the specified field will be categorized. The resulting categories must be used in a detector by settingby_field_name,over_field_name, orpartition_field_nameto the keywordmlcategory.API name:
categorization_field_name -
categorizationFilters
Ifcategorization_field_nameis specified, you can also define optional filters. This property expects an array of regular expressions. The expressions are used to filter out matching sequences from the categorization field values. You can use this functionality to fine tune the categorization by excluding sequences from consideration when categories are defined. For example, you can exclude SQL statements that appear in your log files. This property cannot be used at the same time ascategorization_analyzer. If you only want to define simple regular expression filters that are applied prior to tokenization, setting this property is the easiest method. If you also want to customize the tokenizer or post-tokenization filtering, use thecategorization_analyzerproperty instead and include the filters as pattern_replace character filters. The effect is exactly the same.API name:
categorization_filtersAdds all elements of
listtocategorizationFilters. -
categorizationFilters
Ifcategorization_field_nameis specified, you can also define optional filters. This property expects an array of regular expressions. The expressions are used to filter out matching sequences from the categorization field values. You can use this functionality to fine tune the categorization by excluding sequences from consideration when categories are defined. For example, you can exclude SQL statements that appear in your log files. This property cannot be used at the same time ascategorization_analyzer. If you only want to define simple regular expression filters that are applied prior to tokenization, setting this property is the easiest method. If you also want to customize the tokenizer or post-tokenization filtering, use thecategorization_analyzerproperty instead and include the filters as pattern_replace character filters. The effect is exactly the same.API name:
categorization_filtersAdds one or more values to
categorizationFilters. -
detectors
Required - 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. If the detectors array does not contain at least one detector, no analysis can occur and an error is returned.API name:
detectorsAdds all elements of
listtodetectors. -
detectors
Required - 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. If the detectors array does not contain at least one detector, no analysis can occur and an error is returned.API name:
detectorsAdds one or more values to
detectors. -
detectors
public final AnalysisConfig.Builder detectors(Function<Detector.Builder, ObjectBuilder<Detector>> fn) Required - 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. If the detectors array does not contain at least one detector, no analysis can occur and an error is returned.API name:
detectorsAdds a value to
detectorsusing a builder lambda. -
influencers
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.API name:
influencersAdds all elements of
listtoinfluencers. -
influencers
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.API name:
influencersAdds one or more values to
influencers. -
latency
The size of the window in which to expect data that is out of time order. If you specify a non-zero value, it must be greater than or equal to one second. NOTE: Latency is applicable only when you send data by using the post data API.API name:
latency -
latency
The size of the window in which to expect data that is out of time order. If you specify a non-zero value, it must be greater than or equal to one second. NOTE: Latency is applicable only when you send data by using the post data API.API name:
latency -
modelPruneWindow
Advanced configuration option. Affects the pruning of models that have not been updated for the given time duration. The value must be set to a multiple of thebucket_span. If set too low, important information may be removed from the model. For jobs created in 8.1 and later, the default value is the greater of30dor 20 timesbucket_span.API name:
model_prune_window -
modelPruneWindow
Advanced configuration option. Affects the pruning of models that have not been updated for the given time duration. The value must be set to a multiple of thebucket_span. If set too low, important information may be removed from the model. For jobs created in 8.1 and later, the default value is the greater of30dor 20 timesbucket_span.API name:
model_prune_window -
multivariateByFields
This functionality is reserved for internal use. It is not supported for use in customer environments and is not subject to the support SLA of official GA features. If set totrue, 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, 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. To use themultivariate_by_fieldsproperty, you must also specifyby_field_namein your detector.API name:
multivariate_by_fields -
perPartitionCategorization
public final AnalysisConfig.Builder perPartitionCategorization(@Nullable PerPartitionCategorization value) Settings related to how categorization interacts with partition fields.API name:
per_partition_categorization -
perPartitionCategorization
public final AnalysisConfig.Builder perPartitionCategorization(Function<PerPartitionCategorization.Builder, ObjectBuilder<PerPartitionCategorization>> fn) Settings related to how categorization interacts with partition fields.API name:
per_partition_categorization -
summaryCountFieldName
If this property is specified, 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 samesummary_count_field_nameapplies to all detectors in the job. NOTE: Thesummary_count_field_nameproperty cannot be used with themetricfunction.API name:
summary_count_field_name -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<AnalysisConfig.Builder>
-
build
Builds aAnalysisConfig.- Specified by:
buildin interfaceObjectBuilder<AnalysisConfig>- Throws:
NullPointerException- if some of the required fields are null.
-