notifier

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: May 19, 2017 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier

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

Notifier is responsible for dispatching alert notifications to an alert manager service.

func New

func New(o *Options) *Notifier

New constructs a new Notifier.

func (*Notifier) Alertmanagers added in v1.4.0

func (n *Notifier) Alertmanagers() []string

Alertmanagers returns a list Alertmanager URLs.

func (*Notifier) ApplyConfig

func (n *Notifier) ApplyConfig(conf *config.Config) error

ApplyConfig updates the status state as the new config requires.

func (*Notifier) Run

func (n *Notifier) Run()

Run dispatches notifications continuously.

func (*Notifier) Send

func (n *Notifier) Send(alerts ...*model.Alert)

Send queues the given notification requests for processing. Panics if called on a handler that is not running.

func (*Notifier) Stop

func (n *Notifier) Stop()

Stop shuts down the notification handler.

type Options

type Options struct {
	QueueCapacity  int
	ExternalLabels model.LabelSet
	RelabelConfigs []*config.RelabelConfig
	// Used for sending HTTP requests to the Alertmanager.
	Do func(ctx context.Context, client *http.Client, req *http.Request) (*http.Response, error)

	Registerer prometheus.Registerer
}

Options are the configurable parameters of a Handler.

Jump to

Keyboard shortcuts

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