alert

package
v2.8.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	Alert() (Alert, error)
	IsIgnorable() bool
}

func NewSSHAdapter

func NewSSHAdapter(
	message boshsyslog.Msg,
	settingsService boshsettings.Service,
	uuidGenerator boshuuid.Generator,
	timeService clock.Clock,
	logger boshlog.Logger,
) Adapter

type Alert

type Alert struct {
	ID        string        `json:"id"`
	Severity  SeverityLevel `json:"severity"`
	Title     string        `json:"title"`
	Summary   string        `json:"summary"`
	CreatedAt int64         `json:"created_at"`
}

type MonitAdapter

type MonitAdapter interface {
	IsIgnorable() bool
	Alert() (Alert, error)
	Severity() (severity SeverityLevel, found bool)
}

func NewMonitAdapter

func NewMonitAdapter(monitAlert MonitAlert, settingsService boshsettings.Service, timeService clock.Clock) MonitAdapter

type MonitAlert

type MonitAlert struct {
	ID          string
	Service     string
	Event       string
	Action      string
	Date        string // RFC1123Z formatted date string
	Description string
}

type SeverityLevel

type SeverityLevel int
const (
	SeverityAlert    SeverityLevel = 1
	SeverityCritical SeverityLevel = 2
	SeverityError    SeverityLevel = 3
	SeverityWarning  SeverityLevel = 4
	SeverityIgnored  SeverityLevel = -1
	SeverityDefault  SeverityLevel = SeverityCritical
)

Jump to

Keyboard shortcuts

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