alertmanager

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReplayLifeCycle ReplayEventType = "replay-lifecycle"

	InfoSeverity     = "INFO"
	WarningSeverity  = "WARNING"
	CriticalSeverity = "CRITICAL"
	DefaultSeverity  = WarningSeverity
)
View Source
const (
	MetricNotificationQueue         = "notification_received_total"
	MetricNotificationWorkerSendErr = "notification_err_total"
	MetricNotificationSend          = "notification_sent_successfully"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertManager

type AlertManager struct {
	io.Closer
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, logger log.Logger, host, endpoint, dashboard, dataConsole string) *AlertManager

func (*AlertManager) Close

func (a *AlertManager) Close() error

func (*AlertManager) PrepareAndSendEvent added in v0.16.2

func (a *AlertManager) PrepareAndSendEvent(alertPayload *AlertPayload) error

func (*AlertManager) SendJobEvent added in v0.16.2

func (a *AlertManager) SendJobEvent(attr *job.AlertAttrs)

func (*AlertManager) SendJobRunEvent added in v0.16.2

func (a *AlertManager) SendJobRunEvent(e *scheduler.AlertAttrs)

func (*AlertManager) SendReplayEvent added in v0.16.2

func (a *AlertManager) SendReplayEvent(attr *scheduler.ReplayNotificationAttrs)

func (*AlertManager) SendResourceEvent added in v0.16.2

func (a *AlertManager) SendResourceEvent(attr *resource.AlertAttrs)

type AlertPayload

type AlertPayload struct {
	Project  string            `json:"-"`
	LogTag   string            `json:"-"`
	Data     map[string]string `json:"data"`
	Template string            `json:"template"`
	Labels   map[string]string `json:"labels"`
}

type ReplayEventType added in v0.17.0

type ReplayEventType string

func (ReplayEventType) String added in v0.17.0

func (j ReplayEventType) String() string

Jump to

Keyboard shortcuts

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