notifiers

package
v4.6.5 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const AlertStateCritical = "CRITICAL"

AlertStateCritical - Victorops uses "CRITICAL" string to indicate "Alerting" state

View Source
const AlertStateRecovery = "RECOVERY"
View Source
const PUSHOVER_ENDPOINT = "https://api.pushover.net/1/messages.json"

Variables

This section is empty.

Functions

func GenerateSlackBody added in v4.6.0

func GenerateSlackBody(file string, token string, recipient string) (map[string]string, bytes.Buffer, error)

func NewDingDingNotifier added in v4.4.0

func NewDingDingNotifier(model *m.AlertNotification) (alerting.Notifier, error)

func NewEmailNotifier

func NewEmailNotifier(model *m.AlertNotification) (alerting.Notifier, error)

func NewHipChatNotifier added in v4.2.0

func NewHipChatNotifier(model *models.AlertNotification) (alerting.Notifier, error)

func NewKafkaNotifier added in v4.6.0

func NewKafkaNotifier(model *m.AlertNotification) (alerting.Notifier, error)

func NewLINENotifier added in v4.2.0

func NewLINENotifier(model *m.AlertNotification) (alerting.Notifier, error)

func NewOpsGenieNotifier added in v4.1.0

func NewOpsGenieNotifier(model *m.AlertNotification) (alerting.Notifier, error)

func NewPagerdutyNotifier

func NewPagerdutyNotifier(model *m.AlertNotification) (alerting.Notifier, error)

func NewPushoverNotifier added in v4.2.0

func NewPushoverNotifier(model *m.AlertNotification) (alerting.Notifier, error)

func NewSensuNotifier added in v4.2.0

func NewSensuNotifier(model *m.AlertNotification) (alerting.Notifier, error)

func NewSlackNotifier

func NewSlackNotifier(model *m.AlertNotification) (alerting.Notifier, error)

func NewTelegramNotifier added in v4.2.0

func NewTelegramNotifier(model *m.AlertNotification) (alerting.Notifier, error)

func NewThreemaNotifier added in v4.2.0

func NewThreemaNotifier(model *m.AlertNotification) (alerting.Notifier, error)

func NewVictoropsNotifier added in v4.1.0

func NewVictoropsNotifier(model *models.AlertNotification) (alerting.Notifier, error)

NewVictoropsNotifier creates an instance of VictoropsNotifier that handles posting notifications to Victorops REST API

func NewWebHookNotifier

func NewWebHookNotifier(model *m.AlertNotification) (alerting.Notifier, error)

func SlackFileUpload added in v4.6.0

func SlackFileUpload(evalContext *alerting.EvalContext, log log.Logger, url string, recipient string, token string) error

Types

type DingDingNotifier added in v4.4.0

type DingDingNotifier struct {
	NotifierBase
	Url string
	// contains filtered or unexported fields
}

func (*DingDingNotifier) Notify added in v4.4.0

func (this *DingDingNotifier) Notify(evalContext *alerting.EvalContext) error

type EmailNotifier

type EmailNotifier struct {
	NotifierBase
	Addresses []string
	// contains filtered or unexported fields
}

func (*EmailNotifier) Notify

func (this *EmailNotifier) Notify(evalContext *alerting.EvalContext) error

type HipChatNotifier added in v4.2.0

type HipChatNotifier struct {
	NotifierBase
	Url    string
	ApiKey string
	RoomId string
	// contains filtered or unexported fields
}

func (*HipChatNotifier) Notify added in v4.2.0

func (this *HipChatNotifier) Notify(evalContext *alerting.EvalContext) error

type KafkaNotifier added in v4.6.0

type KafkaNotifier struct {
	NotifierBase
	Endpoint string
	Topic    string
	// contains filtered or unexported fields
}

func (*KafkaNotifier) Notify added in v4.6.0

func (this *KafkaNotifier) Notify(evalContext *alerting.EvalContext) error

type LineNotifier added in v4.2.0

type LineNotifier struct {
	NotifierBase
	Token string
	// contains filtered or unexported fields
}

func (*LineNotifier) Notify added in v4.2.0

func (this *LineNotifier) Notify(evalContext *alerting.EvalContext) error

type NotifierBase

type NotifierBase struct {
	Name        string
	Type        string
	Id          int64
	IsDeault    bool
	UploadImage bool
}

func NewNotifierBase

func NewNotifierBase(id int64, isDefault bool, name, notifierType string, model *simplejson.Json) NotifierBase

func (*NotifierBase) GetIsDefault

func (n *NotifierBase) GetIsDefault() bool

func (*NotifierBase) GetNotifierId

func (n *NotifierBase) GetNotifierId() int64

func (*NotifierBase) GetType

func (n *NotifierBase) GetType() string

func (*NotifierBase) NeedsImage

func (n *NotifierBase) NeedsImage() bool

func (*NotifierBase) PassesFilter

func (n *NotifierBase) PassesFilter(rule *alerting.Rule) bool

type OpsGenieNotifier added in v4.1.0

type OpsGenieNotifier struct {
	NotifierBase
	ApiKey    string
	AutoClose bool
	// contains filtered or unexported fields
}

func (*OpsGenieNotifier) Notify added in v4.1.0

func (this *OpsGenieNotifier) Notify(evalContext *alerting.EvalContext) error

type PagerdutyNotifier

type PagerdutyNotifier struct {
	NotifierBase
	Key         string
	AutoResolve bool
	// contains filtered or unexported fields
}

func (*PagerdutyNotifier) Notify

func (this *PagerdutyNotifier) Notify(evalContext *alerting.EvalContext) error

type PushoverNotifier added in v4.2.0

type PushoverNotifier struct {
	NotifierBase
	UserKey  string
	ApiToken string
	Priority int
	Retry    int
	Expire   int
	Device   string
	Sound    string
	// contains filtered or unexported fields
}

func (*PushoverNotifier) Notify added in v4.2.0

func (this *PushoverNotifier) Notify(evalContext *alerting.EvalContext) error

type SensuNotifier added in v4.2.0

type SensuNotifier struct {
	NotifierBase
	Url      string
	Source   string
	User     string
	Password string
	Handler  string
	// contains filtered or unexported fields
}

func (*SensuNotifier) Notify added in v4.2.0

func (this *SensuNotifier) Notify(evalContext *alerting.EvalContext) error

type SlackNotifier

type SlackNotifier struct {
	NotifierBase
	Url       string
	Recipient string
	Mention   string
	Token     string
	Upload    bool
	// contains filtered or unexported fields
}

func (*SlackNotifier) Notify

func (this *SlackNotifier) Notify(evalContext *alerting.EvalContext) error

type TelegramNotifier added in v4.2.0

type TelegramNotifier struct {
	NotifierBase
	BotToken string
	ChatID   string
	// contains filtered or unexported fields
}

func (*TelegramNotifier) Notify added in v4.2.0

func (this *TelegramNotifier) Notify(evalContext *alerting.EvalContext) error

type ThreemaNotifier added in v4.2.0

type ThreemaNotifier struct {
	NotifierBase
	GatewayID   string
	RecipientID string
	APISecret   string
	// contains filtered or unexported fields
}

func (*ThreemaNotifier) Notify added in v4.2.0

func (notifier *ThreemaNotifier) Notify(evalContext *alerting.EvalContext) error

type VictoropsNotifier added in v4.1.0

type VictoropsNotifier struct {
	NotifierBase
	URL         string
	AutoResolve bool
	// contains filtered or unexported fields
}

VictoropsNotifier defines URL property for Victorops REST API and handles notification process by formatting POST body according to Victorops specifications (http://victorops.force.com/knowledgebase/articles/Integration/Alert-Ingestion-API-Documentation/)

func (*VictoropsNotifier) Notify added in v4.1.0

func (this *VictoropsNotifier) Notify(evalContext *alerting.EvalContext) error

Notify sends notification to Victorops via POST to URL endpoint

type WebhookNotifier

type WebhookNotifier struct {
	NotifierBase
	Url        string
	User       string
	Password   string
	HttpMethod string
	// contains filtered or unexported fields
}

func (*WebhookNotifier) Notify

func (this *WebhookNotifier) Notify(evalContext *alerting.EvalContext) error

Jump to

Keyboard shortcuts

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