alertmanager

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpireSilence

func ExpireSilence(silenceID, alertmanagerURL string) error

DeleteSilence delete a silence by ID.

func ListAlerts

func ListAlerts(alertmanagerURL string) ([]*types.Alert, error)

ListAlerts returns a slice of Alert and an error.

func ListSilences

func ListSilences(alertmanagerURL string) ([]types.Silence, error)

ListSilences returns a slice of Silence and an error.

func Resolved

func Resolved(s types.Silence) bool

Resolved returns if a silence is reolved by EndsAt

Types

type StatusResponse

type StatusResponse struct {
	Uptime      time.Time `json:"uptime"`
	VersionInfo struct {
		Branch    string `json:"branch"`
		BuildDate string `json:"buildDate"`
		BuildUser string `json:"buildUser"`
		GoVersion string `json:"goVersion"`
		Revision  string `json:"revision"`
		Version   string `json:"version"`
	} `json:"versionInfo"`
}

StatusResponse is the data returned by Alertmanager about its current status.

func Status

func Status(alertmanagerURL string) (StatusResponse, error)

Status returns a StatusResponse or an error.

Jump to

Keyboard shortcuts

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