alertmanager

package
v0.0.0-...-54ca42f Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2017 License: Apache-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alertmanager

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

An Alertmanager manages the alerts for one user.

func New

func New(cfg *Config) (*Alertmanager, error)

New creates a new Alertmanager.

func (*Alertmanager) ApplyConfig

func (am *Alertmanager) ApplyConfig(conf *config.Config) error

ApplyConfig applies a new configuration to an Alertmanager.

func (*Alertmanager) ServeHTTP

func (am *Alertmanager) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP serves the Alertmanager's web UI and API.

func (*Alertmanager) Stop

func (am *Alertmanager) Stop()

Stop stops the Alertmanager.

type Config

type Config struct {
	UserID string
	// Used to persist notification logs and silences on disk.
	DataDir     string
	Logger      log.Logger
	MeshRouter  *mesh.Router
	Retention   time.Duration
	ExternalURL *url.URL
}

Config configures an Alertmanager.

type MultitenantAlertmanager

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

A MultitenantAlertmanager manages Alertmanager instances for multiple organizations.

func NewMultitenantAlertmanager

func NewMultitenantAlertmanager(cfg *MultitenantAlertmanagerConfig) (*MultitenantAlertmanager, error)

NewMultitenantAlertmanager creates a new MultitenantAlertmanager.

func (*MultitenantAlertmanager) Run

func (am *MultitenantAlertmanager) Run()

Run the MultitenantAlertmanager.

func (*MultitenantAlertmanager) ServeHTTP

func (am *MultitenantAlertmanager) ServeHTTP(w http.ResponseWriter, req *http.Request)

ServeHTTP serves the Alertmanager's web UI and API.

func (*MultitenantAlertmanager) Stop

func (am *MultitenantAlertmanager) Stop()

Stop stops the MultitenantAlertmanager.

type MultitenantAlertmanagerConfig

type MultitenantAlertmanagerConfig struct {
	DataDir       string
	Retention     time.Duration
	ExternalURL   util.URLValue
	ConfigsAPIURL util.URLValue
	PollInterval  time.Duration
	ClientTimeout time.Duration

	MeshListenAddr string
	MeshHWAddr     string
	MeshNickname   string
	MeshPassword   string
	MeshPeers      stringset
}

MultitenantAlertmanagerConfig is the configuration for a multitenant Alertmanager.

func (*MultitenantAlertmanagerConfig) RegisterFlags

func (cfg *MultitenantAlertmanagerConfig) RegisterFlags(f *flag.FlagSet)

RegisterFlags adds the flags required to config this to the given FlagSet.

Jump to

Keyboard shortcuts

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