anomalydetectors

package
v1.64.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EoperatingSystems = struct {
	Aix     EoperatingSystem
	Linux   EoperatingSystem
	Windows EoperatingSystem
}{
	"AIX",
	"LINUX",
	"WINDOWS",
}
View Source
var Triggers = struct {
	AvailableDiskSpaceMebibytesBelow Trigger
	AvailableDiskSpacePercentBelow   Trigger
	AvailableInodesNumberBelow       Trigger
	AvailableInodesPercentBelow      Trigger
	ReadOnlyFileSystem               Trigger
	ReadTimeExceeding                Trigger
	WriteTimeExceeding               Trigger
}{
	"AVAILABLE_DISK_SPACE_MEBIBYTES_BELOW",
	"AVAILABLE_DISK_SPACE_PERCENT_BELOW",
	"AVAILABLE_INODES_NUMBER_BELOW",
	"AVAILABLE_INODES_PERCENT_BELOW",
	"READ_ONLY_FILE_SYSTEM",
	"READ_TIME_EXCEEDING",
	"WRITE_TIME_EXCEEDING",
}

Functions

This section is empty.

Types

type Alert

type Alert struct {
	SampleCountThresholds            *SampleCountThresholds            `json:"sampleCountThresholds,omitempty"`
	SampleCountThresholdsImmediately *SampleCountThresholdsImmediately `json:"sampleCountThresholdsImmediately,omitempty"`
	ThresholdMebibytes               *float64                          `json:"thresholdMebibytes,omitempty"`
	ThresholdMilliseconds            *float64                          `json:"thresholdMilliseconds,omitempty"`
	ThresholdNumber                  *float64                          `json:"thresholdNumber,omitempty"`
	ThresholdPercent                 *float64                          `json:"thresholdPercent,omitempty"`
	Trigger                          Trigger                           `json:"trigger"` // Possible Values: `AVAILABLE_DISK_SPACE_MEBIBYTES_BELOW`, `AVAILABLE_DISK_SPACE_PERCENT_BELOW`, `AVAILABLE_INODES_NUMBER_BELOW`, `AVAILABLE_INODES_PERCENT_BELOW`, `READ_ONLY_FILE_SYSTEM`, `READ_TIME_EXCEEDING`, `WRITE_TIME_EXCEEDING`
}

func (*Alert) HandlePreconditions

func (me *Alert) HandlePreconditions() error

func (*Alert) MarshalHCL

func (me *Alert) MarshalHCL(properties hcl.Properties) error

func (*Alert) Schema

func (me *Alert) Schema() map[string]*schema.Schema

func (*Alert) UnmarshalHCL

func (me *Alert) UnmarshalHCL(decoder hcl.Decoder) error

type Alerts

type Alerts []*Alert

func (Alerts) MarshalHCL

func (me Alerts) MarshalHCL(properties hcl.Properties) error

func (*Alerts) Schema

func (me *Alerts) Schema() map[string]*schema.Schema

func (*Alerts) UnmarshalHCL

func (me *Alerts) UnmarshalHCL(decoder hcl.Decoder) error

type EoperatingSystem

type EoperatingSystem string

type HostMetadataCondition

type HostMetadataCondition struct {
	KeyMustExist      bool   `json:"keyMustExist"`      // When enabled, the condition requires a metadata key to exist and match the constraints; when disabled, the key is optional but must still match the constrains if it is present.
	MetadataCondition string `json:"metadataCondition"` // This string has to match a required format.\n\n- `$contains(production)` – Matches if `production` appears anywhere in the host metadata value.\n- `$eq(production)` – Matches if `production` matches the host metadata value exactly.\n- `$prefix(production)` – Matches if `production` matches the prefix of the host metadata value.\n- `$suffix(production)` – Matches if `production` matches the suffix of the host metadata value.\n\nAvailable logic operations:\n- `$not($eq(production))` – Matches if the host metadata value is different from `production`.\n- `$and($prefix(production),$suffix(main))` – Matches if host metadata value starts with `production` and ends with `main`.\n- `$or($prefix(production),$suffix(main))` – Matches if host metadata value starts with `production` or ends with `main`.\n\nBrackets **(** and **)** that are part of the matched property **must be escaped with a tilde (~)**
	MetadataKey       string `json:"metadataKey"`       // Key
}

func (*HostMetadataCondition) MarshalHCL

func (me *HostMetadataCondition) MarshalHCL(properties hcl.Properties) error

func (*HostMetadataCondition) Schema

func (me *HostMetadataCondition) Schema() map[string]*schema.Schema

func (*HostMetadataCondition) UnmarshalHCL

func (me *HostMetadataCondition) UnmarshalHCL(decoder hcl.Decoder) error

type HostMetadataConditionType

type HostMetadataConditionType struct {
	HostMetadataCondition *HostMetadataCondition `json:"hostMetadataCondition"`
}

func (*HostMetadataConditionType) MarshalHCL

func (me *HostMetadataConditionType) MarshalHCL(properties hcl.Properties) error

func (*HostMetadataConditionType) Schema

func (me *HostMetadataConditionType) Schema() map[string]*schema.Schema

func (*HostMetadataConditionType) UnmarshalHCL

func (me *HostMetadataConditionType) UnmarshalHCL(decoder hcl.Decoder) error

type HostMetadataConditionTypes

type HostMetadataConditionTypes []*HostMetadataConditionType

func (HostMetadataConditionTypes) MarshalHCL

func (me HostMetadataConditionTypes) MarshalHCL(properties hcl.Properties) error

func (*HostMetadataConditionTypes) Schema

func (me *HostMetadataConditionTypes) Schema() map[string]*schema.Schema

func (*HostMetadataConditionTypes) UnmarshalHCL

func (me *HostMetadataConditionTypes) UnmarshalHCL(decoder hcl.Decoder) error

type MetadataItem

type MetadataItem struct {
	MetadataKey   string `json:"metadataKey"` // Type 'dt.' for key hints.
	MetadataValue string `json:"metadataValue"`
}

func (*MetadataItem) MarshalHCL

func (me *MetadataItem) MarshalHCL(properties hcl.Properties) error

func (*MetadataItem) Schema

func (me *MetadataItem) Schema() map[string]*schema.Schema

func (*MetadataItem) UnmarshalHCL

func (me *MetadataItem) UnmarshalHCL(decoder hcl.Decoder) error

type MetadataItems

type MetadataItems []*MetadataItem

func (MetadataItems) MarshalHCL

func (me MetadataItems) MarshalHCL(properties hcl.Properties) error

func (*MetadataItems) Schema

func (me *MetadataItems) Schema() map[string]*schema.Schema

func (*MetadataItems) UnmarshalHCL

func (me *MetadataItems) UnmarshalHCL(decoder hcl.Decoder) error

type SampleCountThresholds

type SampleCountThresholds struct {
	DealertingEvaluationWindow int `json:"dealertingEvaluationWindow"` // The number of **10-second samples** that form the sliding evaluation window for dealerting.
	DealertingSamples          int `json:"dealertingSamples"`          // The number of **10-second samples** within the evaluation window that must be lower than the threshold to close an event
	ViolatingEvaluationWindow  int `json:"violatingEvaluationWindow"`  // The number of **10-second samples** that form the sliding evaluation window to detect violating samples.
	ViolatingSamples           int `json:"violatingSamples"`           // The number of **10-second samples** within the evaluation window that must exceed the threshold to trigger an event
}

func (*SampleCountThresholds) MarshalHCL

func (me *SampleCountThresholds) MarshalHCL(properties hcl.Properties) error

func (*SampleCountThresholds) Schema

func (me *SampleCountThresholds) Schema() map[string]*schema.Schema

func (*SampleCountThresholds) UnmarshalHCL

func (me *SampleCountThresholds) UnmarshalHCL(decoder hcl.Decoder) error

type SampleCountThresholdsImmediately

type SampleCountThresholdsImmediately struct {
	DealertingEvaluationWindow int `json:"dealertingEvaluationWindow"` // The number of **10-second samples** that form the sliding evaluation window for dealerting.
	DealertingSamples          int `json:"dealertingSamples"`          // The number of **10-second samples** within the evaluation window that must be lower than the threshold to close an event
	ViolatingEvaluationWindow  int `json:"violatingEvaluationWindow"`  // The number of **10-second samples** that form the sliding evaluation window to detect violating samples.
	ViolatingSamples           int `json:"violatingSamples"`           // The number of **10-second samples** within the evaluation window that must exceed the threshold to trigger an event
}

func (*SampleCountThresholdsImmediately) MarshalHCL

func (me *SampleCountThresholdsImmediately) MarshalHCL(properties hcl.Properties) error

func (*SampleCountThresholdsImmediately) Schema

func (*SampleCountThresholdsImmediately) UnmarshalHCL

func (me *SampleCountThresholdsImmediately) UnmarshalHCL(decoder hcl.Decoder) error

type Settings

type Settings struct {
	Alerts                 Alerts                     `json:"alerts,omitempty"`                 // Alerts
	DiskNameFilters        []string                   `json:"diskNameFilters,omitempty"`        // Disk will be included in this policy if **any** of the filters match
	Enabled                bool                       `json:"enabled"`                          // This setting is enabled (`true`) or disabled (`false`)
	EventProperties        MetadataItems              `json:"eventProperties,omitempty"`        // Set of additional key-value properties to be attached to the triggered event.
	HostMetadataConditions HostMetadataConditionTypes `json:"hostMetadataConditions,omitempty"` // The policy will be enabled if **all** conditions are met
	OperatingSystem        []EoperatingSystem         `json:"operatingSystem,omitempty"`        // Select the operating systems on which policy should be applied
	PolicyName             string                     `json:"policyName"`                       // Policy name
	Scope                  *string                    `json:"-" scope:"scope"`                  // The scope of this setting (HOST, HOST_GROUP). Omit this property if you want to cover the whole environment.
	InsertAfter            string                     `json:"-"`
}

func (*Settings) MarshalHCL

func (me *Settings) MarshalHCL(properties hcl.Properties) error

func (*Settings) Name

func (me *Settings) Name() string

func (*Settings) Schema

func (me *Settings) Schema() map[string]*schema.Schema

func (*Settings) UnmarshalHCL

func (me *Settings) UnmarshalHCL(decoder hcl.Decoder) error

type Trigger

type Trigger string

Jump to

Keyboard shortcuts

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