validatedetector

package
v8.14.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Validates an anomaly detection detector.

Index

Constants

This section is empty.

Variables

View Source
var ErrBuildPath = errors.New("cannot build path, check for missing path parameters")

ErrBuildPath is returned in case of missing parameters within the build of the request.

Functions

This section is empty.

Types

type NewValidateDetector

type NewValidateDetector func() *ValidateDetector

NewValidateDetector type alias for index.

func NewValidateDetectorFunc

func NewValidateDetectorFunc(tp elastictransport.Interface) NewValidateDetector

NewValidateDetectorFunc returns a new instance of ValidateDetector with the provided transport. Used in the index of the library this allows to retrieve every apis in once place.

type Response

type Response struct {

	// Acknowledged For a successful response, this value is always true. On failure, an
	// exception is returned instead.
	Acknowledged bool `json:"acknowledged"`
}

Response holds the response body struct for the package validatedetector

https://github.com/elastic/elasticsearch-specification/blob/5fb8f1ce9c4605abcaa44aa0f17dbfc60497a757/specification/ml/validate_detector/MlValidateDetectorResponse.ts#L22-L24

func NewResponse

func NewResponse() *Response

NewResponse returns a Response

type ValidateDetector

type ValidateDetector struct {
	// contains filtered or unexported fields
}

func (*ValidateDetector) ByFieldName

func (r *ValidateDetector) ByFieldName(field string) *ValidateDetector

ByFieldName 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. API name: by_field_name

func (*ValidateDetector) CustomRules

func (r *ValidateDetector) CustomRules(customrules ...types.DetectionRule) *ValidateDetector

CustomRules Custom rules enable you to customize the way detectors operate. For example, a rule may dictate conditions under which results should be skipped. Kibana refers to custom rules as job rules. API name: custom_rules

func (*ValidateDetector) DetectorDescription

func (r *ValidateDetector) DetectorDescription(detectordescription string) *ValidateDetector

DetectorDescription A description of the detector. API name: detector_description

func (*ValidateDetector) DetectorIndex

func (r *ValidateDetector) DetectorIndex(detectorindex int) *ValidateDetector

DetectorIndex A unique identifier for the detector. This identifier is based on the order of the detectors in the `analysis_config`, starting at zero. If you specify a value for this property, it is ignored. API name: detector_index

func (ValidateDetector) Do

func (r ValidateDetector) Do(providedCtx context.Context) (*Response, error)

Do runs the request through the transport, handle the response and returns a validatedetector.Response

func (*ValidateDetector) ExcludeFrequent

func (r *ValidateDetector) ExcludeFrequent(excludefrequent excludefrequent.ExcludeFrequent) *ValidateDetector

ExcludeFrequent 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, you can set `exclude_frequent` to `all` for both fields, or to `by` or `over` for those specific fields. API name: exclude_frequent

func (*ValidateDetector) FieldName

func (r *ValidateDetector) FieldName(field string) *ValidateDetector

FieldName 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. The `field_name` cannot contain double quotes or backslashes. API name: field_name

func (*ValidateDetector) Function

func (r *ValidateDetector) Function(function string) *ValidateDetector

Function The analysis function that is used. For example, `count`, `rare`, `mean`, `min`, `max`, or `sum`. API name: function

func (*ValidateDetector) Header

func (r *ValidateDetector) Header(key, value string) *ValidateDetector

Header set a key, value pair in the ValidateDetector headers map.

func (*ValidateDetector) HttpRequest

func (r *ValidateDetector) HttpRequest(ctx context.Context) (*http.Request, error)

HttpRequest returns the http.Request object built from the given parameters.

func (*ValidateDetector) OverFieldName

func (r *ValidateDetector) OverFieldName(field string) *ValidateDetector

OverFieldName 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. API name: over_field_name

func (*ValidateDetector) PartitionFieldName

func (r *ValidateDetector) PartitionFieldName(field string) *ValidateDetector

PartitionFieldName The field used to segment the analysis. When you use this property, you have completely independent baselines for each value of this field. API name: partition_field_name

func (ValidateDetector) Perform

func (r ValidateDetector) Perform(providedCtx context.Context) (*http.Response, error)

Perform runs the http.Request through the provided transport and returns an http.Response.

func (*ValidateDetector) Raw

Raw takes a json payload as input which is then passed to the http.Request If specified Raw takes precedence on Request method.

func (*ValidateDetector) Request

func (r *ValidateDetector) Request(req *Request) *ValidateDetector

Request allows to set the request property with the appropriate payload.

func (*ValidateDetector) UseNull

func (r *ValidateDetector) UseNull(usenull bool) *ValidateDetector

UseNull Defines whether a new series is used as the null series when there is no value for the by or partition fields. API name: use_null

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL