strategy

package
v1.44.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AlertConditions = struct {
	Above AlertCondition
	Below AlertCondition
}{
	"ABOVE",
	"BELOW",
}

AlertConditions offers the known enum values

View Source
var Types = struct {
	AutoAdaptiveBaseline Type
	StaticThreshold      Type
}{
	"AUTO_ADAPTIVE_BASELINE",
	"STATIC_THRESHOLD",
}

Types offers the known enum values

View Source
var Units = struct {
	Bit                  Unit
	BitPerHour           Unit
	BitPerMinute         Unit
	BitPerSecond         Unit
	Byte                 Unit
	BytePerHour          Unit
	BytePerMinute        Unit
	BytePerSecond        Unit
	Cores                Unit
	Count                Unit
	Day                  Unit
	DecibelMilliWatt     Unit
	GibiByte             Unit
	Giga                 Unit
	GigaByte             Unit
	Hour                 Unit
	KibiByte             Unit
	KibiBytePerHour      Unit
	KibiBytePerMinute    Unit
	KibiBytePerSecond    Unit
	Kilo                 Unit
	KiloByte             Unit
	KiloBytePerHour      Unit
	KiloBytePerMinute    Unit
	KiloBytePerSecond    Unit
	MebiByte             Unit
	MebiBytePerHour      Unit
	MebiBytePerMinute    Unit
	MebiBytePerSecond    Unit
	Mega                 Unit
	MegaByte             Unit
	MegaBytePerHour      Unit
	MegaBytePerMinute    Unit
	MegaBytePerSecond    Unit
	MicroSecond          Unit
	MilliCores           Unit
	MilliSecond          Unit
	MilliSecondPerMinute Unit
	Minute               Unit
	Month                Unit
	Msu                  Unit
	NanoSecond           Unit
	NanoSecondPerMinute  Unit
	NotApplicable        Unit
	Percent              Unit
	PerHour              Unit
	PerMinute            Unit
	PerSecond            Unit
	Pixel                Unit
	Promille             Unit
	Ratio                Unit
	Second               Unit
	State                Unit
	Unspecified          Unit
	Week                 Unit
	Year                 Unit
}{
	"BIT",
	"BIT_PER_HOUR",
	"BIT_PER_MINUTE",
	"BIT_PER_SECOND",
	"BYTE",
	"BYTE_PER_HOUR",
	"BYTE_PER_MINUTE",
	"BYTE_PER_SECOND",
	"CORES",
	"COUNT",
	"DAY",
	"DECIBEL_MILLI_WATT",
	"GIBI_BYTE",
	"GIGA",
	"GIGA_BYTE",
	"HOUR",
	"KIBI_BYTE",
	"KIBI_BYTE_PER_HOUR",
	"KIBI_BYTE_PER_MINUTE",
	"KIBI_BYTE_PER_SECOND",
	"KILO",
	"KILO_BYTE",
	"KILO_BYTE_PER_HOUR",
	"KILO_BYTE_PER_MINUTE",
	"KILO_BYTE_PER_SECOND",
	"MEBI_BYTE",
	"MEBI_BYTE_PER_HOUR",
	"MEBI_BYTE_PER_MINUTE",
	"MEBI_BYTE_PER_SECOND",
	"MEGA",
	"MEGA_BYTE",
	"MEGA_BYTE_PER_HOUR",
	"MEGA_BYTE_PER_MINUTE",
	"MEGA_BYTE_PER_SECOND",
	"MICRO_SECOND",
	"MILLI_CORES",
	"MILLI_SECOND",
	"MILLI_SECOND_PER_MINUTE",
	"MINUTE",
	"MONTH",
	"MSU",
	"NANO_SECOND",
	"NANO_SECOND_PER_MINUTE",
	"NOT_APPLICABLE",
	"PERCENT",
	"PER_HOUR",
	"PER_MINUTE",
	"PER_SECOND",
	"PIXEL",
	"PROMILLE",
	"RATIO",
	"SECOND",
	"STATE",
	"UNSPECIFIED",
	"WEEK",
	"YEAR",
}

Units offers the known enum values

Functions

This section is empty.

Types

type AlertCondition

type AlertCondition string

AlertCondition The condition for the **threshold** value check: above or below.

type Auto

type Auto struct {
	BaseMonitoringStrategy
	AlertCondition             AlertCondition `json:"alertCondition"`                  // The condition for the **threshold** value check: above or below.
	AlertingOnMissingData      *bool          `json:"alertingOnMissingData,omitempty"` // If true, also one-minute samples without data are counted as violating samples.
	DealertingSamples          int32          `json:"dealertingSamples"`               // The number of one-minute samples within the evaluation window that must go back to normal to close the event.
	NumberOfSignalFluctuations float64        `json:"numberOfSignalFluctuations"`      // Defines the factor of how many signal fluctuations are valid. Values above the baseline plus the signal fluctuation times the number of tolerated signal fluctuations are alerted.
	Samples                    int32          `json:"samples"`                         // The number of one-minute samples that form the sliding evaluation window.
	ViolatingSamples           int32          `json:"violatingSamples"`                // The number of one-minute samples within the evaluation window that must violate the threshold to trigger an event.
}

Auto An auto-adaptive baseline strategy to detect anomalies within metrics that show a regular change over time, as the baseline is also updated automatically. An example is to detect an anomaly in the number of received network packets or within the number of user actions over time.

func (*Auto) GetType

func (me *Auto) GetType() Type

func (*Auto) MarshalHCL

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

func (*Auto) MarshalJSON

func (me *Auto) MarshalJSON() ([]byte, error)

func (*Auto) Schema

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

func (*Auto) UnmarshalHCL

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

func (*Auto) UnmarshalJSON

func (me *Auto) UnmarshalJSON(data []byte) error

type BaseMonitoringStrategy

type BaseMonitoringStrategy struct {
	Type     Type                       `json:"type"` // Defines the actual set of fields depending on the value. See one of the following objects:  * `STATIC_THRESHOLD` -> MetricEventStaticThresholdMonitoringStrategy  * `AUTO_ADAPTIVE_BASELINE` -> MetricEventAutoAdaptiveBaselineMonitoringStrategy
	Unknowns map[string]json.RawMessage `json:"-"`
}

BaseMetricEventMonitoringStrategy A monitoring strategy for a metric event config. This is the base version of the monitoring strategy, depending on the type, the actual JSON may contain additional fields.

func (*BaseMonitoringStrategy) GetType

func (me *BaseMonitoringStrategy) GetType() Type

func (*BaseMonitoringStrategy) MarshalHCL

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

func (*BaseMonitoringStrategy) MarshalJSON

func (me *BaseMonitoringStrategy) MarshalJSON() ([]byte, error)

func (*BaseMonitoringStrategy) Schema

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

func (*BaseMonitoringStrategy) UnmarshalHCL

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

func (*BaseMonitoringStrategy) UnmarshalJSON

func (me *BaseMonitoringStrategy) UnmarshalJSON(data []byte) error

type MonitoringStrategy

type MonitoringStrategy interface {
	GetType() Type
}

MonitoringStrategy A monitoring strategy for a metric event config. This is the base version of the monitoring strategy, depending on the type, the actual JSON may contain additional fields.

type Static

type Static struct {
	BaseMonitoringStrategy
	AlertCondition        AlertCondition `json:"alertCondition"`                  // The condition for the **threshold** value check: above or below.
	AlertingOnMissingData *bool          `json:"alertingOnMissingData,omitempty"` // If true, also one-minute samples without data are counted as violating samples.
	DealertingSamples     int32          `json:"dealertingSamples"`               // The number of one-minute samples within the evaluation window that must go back to normal to close the event.
	Samples               int32          `json:"samples"`                         // The number of one-minute samples that form the sliding evaluation window.
	Threshold             float64        `json:"threshold"`                       // The value of the static threshold based on the specified unit.
	Unit                  Unit           `json:"unit"`                            // The unit of the threshold, matching the metric definition.
	ViolatingSamples      int32          `json:"violatingSamples"`                // The number of one-minute samples within the evaluation window that must violate the threshold to trigger an event.
}

MetricEventStaticMonitoringStrategy A static threshold monitoring strategy to alert on hard limits within a given metric. An example is the violation of a critical memory limit.

func (*Static) GetType

func (me *Static) GetType() Type

func (*Static) MarshalHCL

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

func (*Static) MarshalJSON

func (me *Static) MarshalJSON() ([]byte, error)

func (*Static) Schema

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

func (*Static) UnmarshalHCL

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

func (*Static) UnmarshalJSON

func (me *Static) UnmarshalJSON(data []byte) error

type Type

type Type string

Type Defines the actual set of fields depending on the value. See one of the following objects: * `STATIC_THRESHOLD` -> MetricEventStaticThresholdMonitoringStrategy * `AUTO_ADAPTIVE_BASELINE` -> MetricEventAutoAdaptiveBaselineMonitoringStrategy

type Unit

type Unit string

Unit The unit of the threshold, matching the metric definition.

type Wrapper

type Wrapper struct {
	Strategy MonitoringStrategy
}

func (*Wrapper) MarshalHCL

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

func (*Wrapper) Schema

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

func (*Wrapper) UnmarshalHCL

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

func (*Wrapper) UnmarshalJSON

func (me *Wrapper) UnmarshalJSON(data []byte) error

Jump to

Keyboard shortcuts

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