Documentation ¶
Overview ¶
Validates an anomaly detection detector.
Index ¶
- Variables
- type NewValidateDetector
- type Request
- type Response
- type ValidateDetector
- func (r *ValidateDetector) ByFieldName(field string) *ValidateDetector
- func (r *ValidateDetector) CustomRules(customrules ...types.DetectionRule) *ValidateDetector
- func (r *ValidateDetector) DetectorDescription(detectordescription string) *ValidateDetector
- func (r *ValidateDetector) DetectorIndex(detectorindex int) *ValidateDetector
- func (r ValidateDetector) Do(ctx context.Context) (*Response, error)
- func (r *ValidateDetector) ExcludeFrequent(excludefrequent excludefrequent.ExcludeFrequent) *ValidateDetector
- func (r *ValidateDetector) FieldName(field string) *ValidateDetector
- func (r *ValidateDetector) Function(function string) *ValidateDetector
- func (r *ValidateDetector) Header(key, value string) *ValidateDetector
- func (r *ValidateDetector) HttpRequest(ctx context.Context) (*http.Request, error)
- func (r *ValidateDetector) OverFieldName(field string) *ValidateDetector
- func (r *ValidateDetector) PartitionFieldName(field string) *ValidateDetector
- func (r ValidateDetector) Perform(ctx context.Context) (*http.Response, error)
- func (r *ValidateDetector) Raw(raw io.Reader) *ValidateDetector
- func (r *ValidateDetector) Request(req *Request) *ValidateDetector
- func (r *ValidateDetector) UseNull(usenull bool) *ValidateDetector
Constants ¶
This section is empty.
Variables ¶
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 Request ¶ added in v8.11.0
Request holds the request body struct for the package validatedetector
type Response ¶ added in v8.7.0
type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an // exception is returned instead. Acknowledged bool `json:"acknowledged"` }
type ValidateDetector ¶
type ValidateDetector struct {
// contains filtered or unexported fields
}
func New ¶
func New(tp elastictransport.Interface) *ValidateDetector
Validates an anomaly detection detector.
https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html
func (*ValidateDetector) ByFieldName ¶ added in v8.11.0
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 ¶ added in v8.11.0
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 ¶ added in v8.11.0
func (r *ValidateDetector) DetectorDescription(detectordescription string) *ValidateDetector
DetectorDescription A description of the detector. API name: detector_description
func (*ValidateDetector) DetectorIndex ¶ added in v8.11.0
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(ctx context.Context) (*Response, error)
Do runs the request through the transport, handle the response and returns a validatedetector.Response
func (*ValidateDetector) ExcludeFrequent ¶ added in v8.11.0
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 ¶ added in v8.11.0
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 ¶ added in v8.11.0
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 ¶
HttpRequest returns the http.Request object built from the given parameters.
func (*ValidateDetector) OverFieldName ¶ added in v8.11.0
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 ¶ added in v8.11.0
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 ¶ added in v8.7.0
Perform runs the http.Request through the provided transport and returns an http.Response.
func (*ValidateDetector) Raw ¶
func (r *ValidateDetector) Raw(raw io.Reader) *ValidateDetector
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 ¶ added in v8.11.0
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