monitoring

package
v3.2.4 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2019 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Package monitoring is responsible for handling node monitoring (tcp and http checks) especially for tosca.nodes.Compute and tosca.nodes.SoftwareComponent node templates Present limitation : only one monitoring check by node instance is allowed

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(cfg config.Configuration, cc *api.Client)

Start allows to instantiate a default Monitoring Manager and to start monitoring checks

func Stop

func Stop()

Stop allows to stop managing monitoring checks

Types

type Check

type Check struct {
	ID           string
	TimeInterval time.Duration
	Report       CheckReport
	CheckType    CheckType
	// contains filtered or unexported fields
}

Check represents a registered check

func NewCheck

func NewCheck(deploymentID, nodeName, instance string) *Check

NewCheck allows to instantiate a Check

func NewCheckFromID

func NewCheckFromID(checkID string) (*Check, error)

NewCheckFromID allows to instantiate a new Check from an pre-existing ID

func (*Check) Start

func (c *Check) Start()

Start allows to start running a TCP check

func (*Check) Stop

func (c *Check) Stop()

Stop allows to stop a TCP check

type CheckFilterFunc

type CheckFilterFunc func(CheckReport) bool

CheckFilterFunc defines a filter function for CheckReport

type CheckReport

type CheckReport struct {
	DeploymentID string
	NodeName     string
	Instance     string
	Status       CheckStatus
}

CheckReport represents a node check report including its status

type CheckStatus

type CheckStatus int

CheckStatus x ENUM( INITIAL, PASSING, CRITICAL WARNING )

const (
	// CheckStatusINITIAL is a CheckStatus of type INITIAL
	CheckStatusINITIAL CheckStatus = iota
	// CheckStatusPASSING is a CheckStatus of type PASSING
	CheckStatusPASSING
	// CheckStatusCRITICAL is a CheckStatus of type CRITICAL
	CheckStatusCRITICAL
	// CheckStatusWARNING is a CheckStatus of type WARNING
	CheckStatusWARNING
)

func ParseCheckStatus

func ParseCheckStatus(name string) (CheckStatus, error)

ParseCheckStatus attempts to convert a string to a CheckStatus

func (CheckStatus) String

func (i CheckStatus) String() string

type CheckType

type CheckType int

CheckType x ENUM( TCP, HTTP )

const (
	// CheckTypeTCP is a CheckType of type TCP
	CheckTypeTCP CheckType = iota
	// CheckTypeHTTP is a CheckType of type HTTP
	CheckTypeHTTP
)

func ParseCheckType

func ParseCheckType(name string) (CheckType, error)

ParseCheckType attempts to convert a string to a CheckType

func (CheckType) String

func (i CheckType) String() string

Jump to

Keyboard shortcuts

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