alert

package
v0.0.0-...-3651c1b Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2017 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

View Source
const (
	TMPL_BODY = `The status for alarm '{{.Alarm.Name}}' has changed from '{{.Previous | ToUpper}}' to '{{.Current | ToUpper}}'
`
	TMPL_SUBJECT = `[LOVEBEAT] {{.Alarm.Name}}-{{.Alarm.IncidentNbr}}`
	TMPL_EMAIL   = `From: {{.From}}
To: {{.To}}
Subject: {{.Subject}}
MIME-version: 1.0
Content-Type: text/html; charset="UTF-8"

{{.Message}}`
)

Variables

This section is empty.

Functions

func New

Types

type AlertInfo

type AlertInfo struct {
	Alarm       model.Alarm
	Previous    string
	Current     string
	AlarmConfig config.ConfigAlarm
}

type AlerterBackend

type AlerterBackend interface {
	Notify(alertCfg config.ConfigAlert, ev AlertInfo)
}

func NewMailAlerter

func NewMailAlerter(cfg config.Config) AlerterBackend

func NewScriptAlerter

func NewScriptAlerter(cfg config.Config) AlerterBackend

func NewSlackAlerter

func NewSlackAlerter(cfg config.Config) AlerterBackend

func NewWebhooksAlerter

func NewWebhooksAlerter(cfg config.Config) AlerterBackend

Jump to

Keyboard shortcuts

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