diskrules

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DiskMetrics = struct {
	LowDiskSpace       DiskMetric
	LowInodes          DiskMetric
	ReadTimeExceeding  DiskMetric
	WriteTimeExceeding DiskMetric
}{
	"LOW_DISK_SPACE",
	"LOW_INODES",
	"READ_TIME_EXCEEDING",
	"WRITE_TIME_EXCEEDING",
}
View Source
var DiskNameFilterOperators = struct {
	Contains         DiskNameFilterOperator
	DoesNotContain   DiskNameFilterOperator
	DoesNotEqual     DiskNameFilterOperator
	DoesNotStartWith DiskNameFilterOperator
	Equals           DiskNameFilterOperator
	StartsWith       DiskNameFilterOperator
}{
	"CONTAINS",
	"DOES_NOT_CONTAIN",
	"DOES_NOT_EQUAL",
	"DOES_NOT_START_WITH",
	"EQUALS",
	"STARTS_WITH",
}

Functions

This section is empty.

Types

type DiskMetric

type DiskMetric string

type DiskNameFilter

type DiskNameFilter struct {
	Operator DiskNameFilterOperator `json:"operator"`        // Possible Values: `CONTAINS`, `DOES_NOT_CONTAIN`, `DOES_NOT_EQUAL`, `DOES_NOT_START_WITH`, `EQUALS`, `STARTS_WITH`
	Value    *string                `json:"value,omitempty"` // Matching text
}

func (*DiskNameFilter) MarshalHCL

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

func (*DiskNameFilter) Schema

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

func (*DiskNameFilter) UnmarshalHCL

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

type DiskNameFilterOperator

type DiskNameFilterOperator string

type SampleLimit

type SampleLimit struct {
	Samples          int `json:"samples"`          // .. within the last
	ViolatingSamples int `json:"violatingSamples"` // Minimum number of violating samples
}

func (*SampleLimit) MarshalHCL

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

func (*SampleLimit) Schema

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

func (*SampleLimit) UnmarshalHCL

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

type Settings

type Settings struct {
	DiskNameFilter        *DiskNameFilter `json:"diskNameFilter"`                  // Only apply to disks whose name matches
	Enabled               bool            `json:"enabled"`                         // This setting is enabled (`true`) or disabled (`false`)
	HostGroupID           *string         `json:"-" scope:"hostGroupId"`           // The scope of this settings. If the settings should cover the whole environment, just don't specify any scope.
	Metric                DiskMetric      `json:"metric"`                          // Possible Values: `LOW_DISK_SPACE`, `LOW_INODES`, `READ_TIME_EXCEEDING`, `WRITE_TIME_EXCEEDING`
	Name                  string          `json:"name"`                            // Name
	SampleLimit           *SampleLimit    `json:"sampleLimit"`                     // Only alert if the threshold was violated in at least *n* of the last *m* samples
	TagFilters            []string        `json:"tagFilters,omitempty"`            // Only apply to hosts that have the following tags
	ThresholdMilliseconds *float64        `json:"thresholdMilliseconds,omitempty"` // Alert if higher than
	ThresholdPercent      *float64        `json:"thresholdPercent,omitempty"`      // Alert if lower than
}

func (*Settings) HandlePreconditions

func (me *Settings) HandlePreconditions() error

func (*Settings) MarshalHCL

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

func (*Settings) Schema

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

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