Documentation ¶
Index ¶
- func HandleWebhook(logger log.Logger, counter prometheus.Counter, ...) http.HandlerFunc
- func ListAlerts(logger log.Logger, alertmanagerURL string) ([]*types.Alert, error)
- func ListSilences(logger log.Logger, alertmanagerURL string) ([]types.Silence, error)
- func Resolved(s types.Silence) bool
- func SilenceMessage(s types.Silence) string
- func TestHandleWebhook(t *testing.T)
- func TestResolved(t *testing.T)
- type StatusResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleWebhook ¶
func HandleWebhook(logger log.Logger, counter prometheus.Counter, webhooks chan<- notify.WebhookMessage) http.HandlerFunc
HandleWebhook returns a HandlerFunc that forwards webhooks to all bots via a channel
func ListAlerts ¶
ListAlerts returns a slice of Alert and an error.
func ListSilences ¶
ListSilences returns a slice of Silence and an error.
func SilenceMessage ¶
SilenceMessage converts a silences to a message string
func TestHandleWebhook ¶
func TestResolved ¶
Types ¶
type StatusResponse ¶
type StatusResponse struct { Status string `json:"status"` Data 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"` } `json:"data"` }
StatusResponse is the data returned by Alertmanager about its current status.
Click to show internal directories.
Click to hide internal directories.