Documentation
¶
Index ¶
- func DedupAlerts() []models.AlertGroup
- func DedupAutocomplete() []models.Autocomplete
- func DedupColors() models.LabelsColorMap
- func GetVersion(uri string, timeout time.Duration) string
- func NewAlertmanager(name, uri string, timeout time.Duration) error
- type Alertmanager
- func (am *Alertmanager) Alerts() []models.AlertGroup
- func (am *Alertmanager) Autocomplete() []models.Autocomplete
- func (am *Alertmanager) Colors() models.LabelsColorMap
- func (am *Alertmanager) Error() string
- func (am *Alertmanager) Pull() error
- func (am *Alertmanager) SilenceByID(id string) (models.Silence, error)
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 ¶
GetVersion returns version information of the remote Alertmanager endpoint
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