rules

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STATS_SUM = Aggregator("sum")
	STATS_AVG = Aggregator("avg")
	STATS_MIN = Aggregator("min")
	STATS_MAX = Aggregator("max")
)

Variables

View Source
var (
	OsCpuUtil = estimator{
				// contains filtered or unexported fields
	}

	OsCpuWait = estimator{
				// contains filtered or unexported fields
	}

	OsSwapIn = estimator{
				// contains filtered or unexported fields
	}

	OsSwapOut = estimator{
				// contains filtered or unexported fields
	}

	OsMemoryTotal = estimator{
					// contains filtered or unexported fields
	}

	OsMemoryFree = estimator{
					// contains filtered or unexported fields
	}

	OsMemoryCached = estimator{
					// contains filtered or unexported fields
	}

	OsFileSysTotal = estimator{
					// contains filtered or unexported fields
	}

	OsFileSysUsed = estimator{
					// contains filtered or unexported fields
	}
)

Operating System

View Source
var (
	DbStorageReadIO = estimator{
					// contains filtered or unexported fields
	}

	DbStorageWriteIO = estimator{
						// contains filtered or unexported fields
	}

	DbStorageAwait = estimator{
					// contains filtered or unexported fields
	}

	DbDataBlockCacheHit = estimator{
						// contains filtered or unexported fields
	}

	DbDataBlockReadIO = estimator{
						// contains filtered or unexported fields
	}

	DbDataBlockCacheHitRatio = calculator{
								// contains filtered or unexported fields
	}

	DbDataBlockReadTime = estimator{
						// contains filtered or unexported fields
	}

	DbBuffersCheckpoints = estimator{
							// contains filtered or unexported fields
	}

	DbBuffersCheckpointsTime = estimator{
								// contains filtered or unexported fields
	}

	DbDeadlocks = estimator{
				// contains filtered or unexported fields
	}

	DbBlockedTransactions = estimator{
							// contains filtered or unexported fields
	}

	DbRollbacks = estimator{
				// contains filtered or unexported fields
	}

	DbXactCommit = estimator{
					// contains filtered or unexported fields
	}

	SqlTuplesFetched = estimator{
						// contains filtered or unexported fields
	}

	SqlTuplesReturned = estimator{
						// contains filtered or unexported fields
	}

	SqlEfficiency = calculator{
					// contains filtered or unexported fields
	}

	SqlTuplesInserted = estimator{
						// contains filtered or unexported fields
	}

	SqlTuplesUpdated = estimator{
						// contains filtered or unexported fields
	}

	SqlTuplesDeleted = estimator{
						// contains filtered or unexported fields
	}

	DbTempBytes = estimator{
				// contains filtered or unexported fields
	}
)

Functions

This section is empty.

Types

type Aggregator

type Aggregator string

Aggregator function used by telemetry system

The following statistic aggregators are supported for the metrics:

`.avg` - The average value for the metric over a period of time.

`.min` - The minimum value for the metric over a period of time.

`.max` - The maximum value for the metric over a period of time.

`.sum` - The sum of the metric values over a period of time.

`.sample_count` - The number of times the metric was collected over a period of time. Append to the metric name.

See https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_PerfInsights.API.html

type Check

type Check struct {
	// contains filtered or unexported fields
}

func New

func New(source Source) *Check

func (*Check) Run

func (check *Check) Run(ctx context.Context, dbiResourceId string, dur time.Duration) ([]types.Status, error)

func (*Check) Should

func (check *Check) Should(metrics []Metric, eval Eval) *Check

type Eval

type Eval func(...insight.Samples) types.Status

type Metric

type Metric string

func (Metric) ToAgg

func (m Metric) ToAgg(agg Aggregator) []Metric

func (Metric) ToAvg

func (m Metric) ToAvg() []Metric

func (Metric) ToMax

func (m Metric) ToMax() []Metric

func (Metric) ToMin

func (m Metric) ToMin() []Metric

func (Metric) ToMinMax

func (m Metric) ToMinMax() []Metric

func (Metric) ToSum

func (m Metric) ToSum() []Metric

type Rule

type Rule func() ([]Metric, Eval)

type Source

type Source interface {
	Fetch(context.Context, string, time.Duration, ...string) (map[string]insight.Samples, error)
}

Jump to

Keyboard shortcuts

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