alertmanager

package
v0.0.0-...-bb4f4f4 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: AGPL-3.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

View Source
const FullValidConfigForTesting = `{
	"url": "https://alertmanager-01.com",
	"basicAuthUser": "grafana",
	"basicAuthPassword": "admin"
}`

FullValidConfigForTesting is a string representation of a JSON object that contains all fields supported by the notifier Config. It can be used without secrets.

View Source
const FullValidSecretsForTesting = `{
	"basicAuthPassword": "grafana-admin"
}`

FullValidSecretsForTesting is a string representation of JSON object that contains all fields that can be overridden from secrets

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	URLs     []*url.URL
	User     string
	Password string
}

func NewConfig

func NewConfig(jsonData json.RawMessage, decryptFn receivers.DecryptFunc) (Config, error)

type Notifier

type Notifier struct {
	*receivers.Base
	// contains filtered or unexported fields
}

Notifier sends alert notifications to the alert manager

func New

func New(cfg Config, meta receivers.Metadata, images images.Provider, logger logging.Logger) *Notifier

func (*Notifier) Notify

func (n *Notifier) Notify(ctx context.Context, as ...*types.Alert) (bool, error)

Notify sends alert notifications to Alertmanager.

func (*Notifier) SendResolved

func (n *Notifier) SendResolved() bool

Jump to

Keyboard shortcuts

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