alertmanager

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrCantDeserialize will be used when for some reason the
	// received data can't be deserialized.
	ErrCantDeserialize = errors.New("can't deserialize the received alerts")
)

Functions

func NewHandler

func NewHandler(cfg Config) (http.Handler, error)

NewHandler is an HTTP handler that knows how to handle alertmanager webhook alerts.

Types

type Config

type Config struct {
	MetricsRecorder       metrics.Recorder
	WebhookPath           string
	ChatIDQueryString     string
	ForwardService        forward.Service
	DeadMansSwitchPath    string
	DeadMansSwitchService deadmansswitch.Service
	Debug                 bool
	Logger                log.Logger
}

Config is the configuration of the WebhookHandler.

Jump to

Keyboard shortcuts

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