metrin

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildParams

BuildParams - used for create GetMetricStatisticsInput

func BuildPrintStrings

func BuildPrintStrings(input BuildPrintStringInput) []string

BuildPrintStrings - returns slice of built string

func GetLastDatapoint

func GetLastDatapoint(datapoints []*cloudwatch.Datapoint) *cloudwatch.Datapoint

GetLastDatapoint - get latest datapoint from datapoints by timestamp

func GetMetricStatistics

GetMetricStatistics wrapper

Types

type BuildParamsInput

type BuildParamsInput struct {
	Namespace          string
	MetricName         string
	StartTime          int64
	EndTime            int64
	Period             int64
	Unit               string
	Statistics         []string
	ExtendedStatistics []string
	Dimensions         []string
}

BuildParamsInput - the type for BuildParams function argument

type BuildPrintStringInput

type BuildPrintStringInput struct {
	Params         *cloudwatch.GetMetricStatisticsInput
	Datapoints     []*cloudwatch.Datapoint
	TemplateString string
}

BuildPrintStringInput - includes params and datapoints

type CheckInput

type CheckInput struct {
	Thresholds         CheckThresholds
	Datapoints         []*cloudwatch.Datapoint
	Statistics         []string
	ExtendedStatistics []string
}

CheckInput - the argument of check

type CheckOutput

type CheckOutput struct {
	ExitCode int
	Messages []string
}

CheckOutput - the result of check, includes message and exit code

func Check

func Check(input CheckInput) CheckOutput

Check - performs check

type CheckThresholds

type CheckThresholds struct {
	CriticalGtPresent  bool
	CriticalLtPresent  bool
	CriticalGtePresent bool
	CriticalLtePresent bool
	WarningGtPresent   bool
	WarningLtPresent   bool
	WarningGtePresent  bool
	WarningLtePresent  bool
	CriticalGtValue    float64
	CriticalLtValue    float64
	CriticalGteValue   float64
	CriticalLteValue   float64
	WarningGtValue     float64
	WarningLtValue     float64
	WarningGteValue    float64
	WarningLteValue    float64
}

CheckThresholds - threshold values and its presense

type TemplateInput

type TemplateInput struct {
	Params    *cloudwatch.GetMetricStatisticsInput
	Datapoint *cloudwatch.Datapoint
}

TemplateInput - input type for each template execution

Jump to

Keyboard shortcuts

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