alertmanager

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2017 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DedupAlerts

func DedupAlerts() []models.AlertGroup

DedupAlerts will collect alert groups from all defined Alertmanager upstreams and deduplicate them, so we only return unique alerts

func DedupAutocomplete

func DedupAutocomplete() []models.Autocomplete

DedupAutocomplete returns a list of autocomplete hints merged from all Alertmanager upstreams

func DedupColors

func DedupColors() models.LabelsColorMap

DedupColors returns a color map merged from all Alertmanager upstream color maps

func GetVersion

func GetVersion(uri string, timeout time.Duration) string

GetVersion returns version information of the remote Alertmanager endpoint

func NewAlertmanager

func NewAlertmanager(name, uri string, timeout time.Duration) error

NewAlertmanager creates a new Alertmanager instance

Types

type Alertmanager

type Alertmanager struct {
	URI     string        `json:"uri"`
	Timeout time.Duration `json:"timeout"`
	Name    string        `json:"name"`
	// contains filtered or unexported fields
}

Alertmanager represents Alertmanager upstream instance

func GetAlertmanagerByName

func GetAlertmanagerByName(name string) *Alertmanager

GetAlertmanagerByName returns an instance of Alertmanager by name or nil if not found

func GetAlertmanagers

func GetAlertmanagers() []*Alertmanager

GetAlertmanagers returns a list of all defined Alertmanager instances

func (*Alertmanager) Alerts

func (am *Alertmanager) Alerts() []models.AlertGroup

Alerts returns a copy of all alert groups

func (*Alertmanager) Autocomplete

func (am *Alertmanager) Autocomplete() []models.Autocomplete

Autocomplete returns a copy of all autocomplete data

func (*Alertmanager) Colors

func (am *Alertmanager) Colors() models.LabelsColorMap

Colors returns a copy of all color maps

func (*Alertmanager) Error

func (am *Alertmanager) Error() string

func (*Alertmanager) Pull

func (am *Alertmanager) Pull() error

Pull data from upstream Alertmanager instance

func (*Alertmanager) SilenceByID

func (am *Alertmanager) SilenceByID(id string) (models.Silence, error)

SilenceByID allows to query for a silence by it's ID, returns error if not found

Jump to

Keyboard shortcuts

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