metrics

package
v4.5.2003+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultKeycodeEnabled       = true
	DefaultKeycodeSpecs         = "0 0 * * * *"
	DefaultKeycodeEventInterval = "90,60,30,15,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7"
	DefaultKeycodeEventLevel    = "90:Info,15:Warn,0:Error"
)

Variables

View Source
var (
	Notifiers = make([]AlertInterface, 0)
)

Functions

This section is empty.

Types

type AlertInterface

type AlertInterface interface {
	GetName() string
	GetSpecs() string
	GetEnabled() bool
	Validate()
	GenerateCriteria()
	MeetCriteria() bool
}

type AlertMetrics

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

func (*AlertMetrics) GenerateCriteria

func (c *AlertMetrics) GenerateCriteria()

func (*AlertMetrics) GetEnabled

func (c *AlertMetrics) GetEnabled() bool

func (*AlertMetrics) GetName

func (c *AlertMetrics) GetName() string

func (*AlertMetrics) GetSpecs

func (c *AlertMetrics) GetSpecs() string

func (*AlertMetrics) MeetCriteria

func (c *AlertMetrics) MeetCriteria() bool

func (*AlertMetrics) Validate

func (c *AlertMetrics) Validate()

type KeycodeMetrics

type KeycodeMetrics struct {
	AlertMetrics
	// contains filtered or unexported fields
}

func NewKeycodeMetrics

func NewKeycodeMetrics(notifier *Notifier, influxCfg *InternalInflux.Config) *KeycodeMetrics

func (*KeycodeMetrics) GenerateCriteria

func (c *KeycodeMetrics) GenerateCriteria()

func (*KeycodeMetrics) MeetCriteria

func (c *KeycodeMetrics) MeetCriteria() bool

func (*KeycodeMetrics) PostEvent

func (c *KeycodeMetrics) PostEvent() error

func (*KeycodeMetrics) Validate

func (c *KeycodeMetrics) Validate()

type Notifier

type Notifier struct {
	Enabled       bool   `mapstructure:"enabled"`
	Specs         string `mapstructure:"specs"`
	EventInterval string `mapstructure:"eventInterval"`
	EventLevel    string `mapstructure:"eventLevel"`
}

Jump to

Keyboard shortcuts

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