databases

package
v1.56.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DetectionModes = struct {
	Auto  DetectionMode
	Fixed DetectionMode
}{
	DetectionMode("Auto"),
	DetectionMode("Fixed"),
}
View Source
var Sensitivities = struct {
	High   Sensitivity
	Low    Sensitivity
	Medium Sensitivity
}{
	Sensitivity("High"),
	Sensitivity("Low"),
	Sensitivity("Medium"),
}

Functions

This section is empty.

Types

type DatabaseConnections

type DatabaseConnections struct {
	Enabled           bool `json:"enabled"`                     // Detect failed database connects
	MaxFailedConnects *int `json:"maxFailedConnects,omitempty"` // Threshold
	TimePeriod        *int `json:"timePeriod,omitempty"`        // Time span
}

func (*DatabaseConnections) MarshalHCL

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

func (*DatabaseConnections) Schema

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

func (*DatabaseConnections) UnmarshalHCL

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

type DetectionMode

type DetectionMode string

type FailureRate

type FailureRate struct {
	AutoDetection  *FailureRateAuto  `json:"autoDetection,omitempty"`  // Alert if the percentage of failing service calls increases by **both** the absolute and relative thresholds:
	DetectionMode  *DetectionMode    `json:"detectionMode,omitempty"`  // Detection mode for increases in failure rate
	Enabled        bool              `json:"enabled"`                  // Detect increases in failure rate
	FixedDetection *FailureRateFixed `json:"fixedDetection,omitempty"` // Alert if a given failure rate is exceeded during any 5-minute-period
}

func (*FailureRate) MarshalHCL

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

func (*FailureRate) Schema

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

func (*FailureRate) UnmarshalHCL

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

type FailureRateAuto

type FailureRateAuto struct {
	AbsoluteIncrease       float64                 `json:"absoluteIncrease"`       // Absolute threshold
	OverAlertingProtection *OverAlertingProtection `json:"overAlertingProtection"` // Avoid over-alerting
	RelativeIncrease       float64                 `json:"relativeIncrease"`       // Relative threshold
}

func (*FailureRateAuto) MarshalHCL

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

func (*FailureRateAuto) Schema

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

func (*FailureRateAuto) UnmarshalHCL

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

type FailureRateFixed

type FailureRateFixed struct {
	OverAlertingProtection *OverAlertingProtection `json:"overAlertingProtection"` // Avoid over-alerting
	Sensitivity            Sensitivity             `json:"sensitivity"`
	Threshold              float64                 `json:"threshold"`
}

func (*FailureRateFixed) MarshalHCL

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

func (*FailureRateFixed) Schema

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

func (*FailureRateFixed) UnmarshalHCL

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

type LoadDrops

type LoadDrops struct {
	Enabled              bool     `json:"enabled"`                        // Detect service load drops
	LoadDropPercent      *float64 `json:"loadDropPercent,omitempty"`      // Threshold
	MinutesAbnormalState *int     `json:"minutesAbnormalState,omitempty"` // Time span
}

func (*LoadDrops) MarshalHCL

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

func (*LoadDrops) Schema

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

func (*LoadDrops) UnmarshalHCL

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

type LoadSpikes

type LoadSpikes struct {
	Enabled              bool     `json:"enabled"`                        // Detect service load spikes
	LoadSpikePercent     *float64 `json:"loadSpikePercent,omitempty"`     // Threshold
	MinutesAbnormalState *int     `json:"minutesAbnormalState,omitempty"` // Time span
}

func (*LoadSpikes) MarshalHCL

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

func (*LoadSpikes) Schema

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

func (*LoadSpikes) UnmarshalHCL

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

type OverAlertingProtection

type OverAlertingProtection struct {
	MinutesAbnormalState int     `json:"minutesAbnormalState"` // Only alert if the abnormal state remains for at least
	RequestsPerMinute    float64 `json:"requestsPerMinute"`    // Only alert if there are at least
}

func (*OverAlertingProtection) MarshalHCL

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

func (*OverAlertingProtection) Schema

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

func (*OverAlertingProtection) UnmarshalHCL

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

type ResponseTime

type ResponseTime struct {
	AutoDetection  *ResponseTimeAuto  `json:"autoDetection,omitempty"`
	DetectionMode  *DetectionMode     `json:"detectionMode,omitempty"` // Detection mode for response time degradations
	Enabled        bool               `json:"enabled"`                 // Detect response time degradations
	FixedDetection *ResponseTimeFixed `json:"fixedDetection,omitempty"`
}

func (*ResponseTime) HandlePreconditions added in v1.26.0

func (me *ResponseTime) HandlePreconditions() error

func (*ResponseTime) MarshalHCL

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

func (*ResponseTime) Schema

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

func (*ResponseTime) UnmarshalHCL

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

type ResponseTimeAuto

type ResponseTimeAuto struct {
	OverAlertingProtection *OverAlertingProtection  `json:"overAlertingProtection"` // Avoid over-alerting
	ResponseTimeAll        *ResponseTimeAutoAll     `json:"responseTimeAll"`        // Alert if the median response time of all requests degrades beyond **both** the absolute and relative thresholds:
	ResponseTimeSlowest    *ResponseTimeAutoSlowest `json:"responseTimeSlowest"`    // Alert if the response time of the slowest 10% of requests degrades beyond **both** the absolute and relative thresholds:
}

func (*ResponseTimeAuto) MarshalHCL

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

func (*ResponseTimeAuto) Schema

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

func (*ResponseTimeAuto) UnmarshalHCL

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

type ResponseTimeAutoAll

type ResponseTimeAutoAll struct {
	DegradationMilliseconds float64 `json:"degradationMilliseconds"` // Absolute threshold
	DegradationPercent      float64 `json:"degradationPercent"`      // Relative threshold
}

func (*ResponseTimeAutoAll) MarshalHCL

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

func (*ResponseTimeAutoAll) Schema

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

func (*ResponseTimeAutoAll) UnmarshalHCL

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

type ResponseTimeAutoSlowest

type ResponseTimeAutoSlowest struct {
	SlowestDegradationMilliseconds float64 `json:"slowestDegradationMilliseconds"` // Absolute threshold
	SlowestDegradationPercent      float64 `json:"slowestDegradationPercent"`      // Relative threshold
}

func (*ResponseTimeAutoSlowest) MarshalHCL

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

func (*ResponseTimeAutoSlowest) Schema

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

func (*ResponseTimeAutoSlowest) UnmarshalHCL

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

type ResponseTimeFixed

type ResponseTimeFixed struct {
	OverAlertingProtection *OverAlertingProtection   `json:"overAlertingProtection"` // Avoid over-alerting
	ResponseTimeAll        *ResponseTimeFixedAll     `json:"responseTimeAll"`        // Alert if the median response time of all requests degrades beyond this threshold within an observation period of 5 minutes:
	ResponseTimeSlowest    *ResponseTimeFixedSlowest `json:"responseTimeSlowest"`    // Alert if the response time of the slowest 10% of requests degrades beyond this threshold within an observation period of 5 minutes:
	Sensitivity            Sensitivity               `json:"sensitivity"`
}

func (*ResponseTimeFixed) MarshalHCL

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

func (*ResponseTimeFixed) Schema

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

func (*ResponseTimeFixed) UnmarshalHCL

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

type ResponseTimeFixedAll

type ResponseTimeFixedAll struct {
	DegradationMilliseconds float64 `json:"degradationMilliseconds"` // Threshold
}

func (*ResponseTimeFixedAll) MarshalHCL

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

func (*ResponseTimeFixedAll) Schema

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

func (*ResponseTimeFixedAll) UnmarshalHCL

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

type ResponseTimeFixedSlowest

type ResponseTimeFixedSlowest struct {
	SlowestDegradationMilliseconds float64 `json:"slowestDegradationMilliseconds"` // Threshold
}

func (*ResponseTimeFixedSlowest) MarshalHCL

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

func (*ResponseTimeFixedSlowest) Schema

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

func (*ResponseTimeFixedSlowest) UnmarshalHCL

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

type Sensitivity

type Sensitivity string

type Settings

type Settings struct {
	Scope               string               `json:"-"`
	DatabaseConnections *DatabaseConnections `json:"databaseConnections"` // Alert if the number of failed database connects within the specified time exceeds the specified absolute threshold:
	FailureRate         *FailureRate         `json:"failureRate"`         // Failure rate
	LoadDrops           *LoadDrops           `json:"loadDrops"`           // Alert if the observed load is lower than the expected load by a specified margin for a specified amount of time.
	LoadSpikes          *LoadSpikes          `json:"loadSpikes"`          // Alert if the observed load exceeds the expected load by a specified margin for a specified amount of time.
	ResponseTime        *ResponseTime        `json:"responseTime"`        // Response time
}

func (*Settings) GetScope

func (me *Settings) GetScope() string

func (*Settings) Load

func (me *Settings) Load(data []byte) error

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) SetScope

func (me *Settings) SetScope(scope string)

func (*Settings) Store

func (me *Settings) Store() ([]byte, error)

func (*Settings) UnmarshalHCL

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

Jump to

Keyboard shortcuts

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