alertmanager

package
v0.0.0-...-fbfa20b Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2022 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleTelegramWebhook

func HandleTelegramWebhook(logger log.Logger, counter prometheus.Counter, webhooks chan<- TelegramWebhook) http.HandlerFunc

HandleTelegramWebhook returns a HandlerFunc that forwards webhooks to all bots via a channel.

func Resolved

func Resolved(s *types.Silence) bool

Resolved returns if a silence is resolved by EndsAt.

func SilenceMessage

func SilenceMessage(s *types.Silence) string

SilenceMessage converts a silences to a message string.

Types

type Client

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

func NewClient

func NewClient(url *url.URL) (*Client, error)

func (*Client) ListAlerts

func (c *Client) ListAlerts(ctx context.Context, receiver string, silenced bool) ([]*types.Alert, error)

func (*Client) ListSilences

func (c *Client) ListSilences(ctx context.Context) ([]*types.Silence, error)

func (Client) Status

type TelegramWebhook

type TelegramWebhook struct {
	ChatID  int64
	Message webhook.Message
}

Jump to

Keyboard shortcuts

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