alertmanagerreceiver

package
v0.9.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AMReceiver

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

AMReceiver represents a channel of type AlertManagerReceiver

func New

New creates new AlertManagerReceiver channel

func (*AMReceiver) Ignore added in v0.8.2

func (a *AMReceiver) Ignore() bool

func (*AMReceiver) Name

func (a *AMReceiver) Name() string

Name returns name of the channel

func (*AMReceiver) Send

func (a *AMReceiver) Send(mes *message.Message) error

Send message to the channel

type Alert added in v0.9.3

type Alert struct {
	Status       string    `json:"status"`
	Labels       KV        `json:"labels"`
	Annotations  KV        `json:"annotations"`
	StartsAt     time.Time `json:"startsAt"`
	EndsAt       time.Time `json:"endsAt"`
	GeneratorURL string    `json:"generatorURL"`
	Fingerprint  string    `json:"fingerprint"`
}

type AlertStatus added in v0.9.3

type AlertStatus string
const (
	AlertFiring   AlertStatus = "firing"
	AlertResolved AlertStatus = "resolved"
)

type Alerts added in v0.9.3

type Alerts []Alert

type Data added in v0.9.3

type Data struct {
	Receiver string `json:"receiver"`
	Status   string `json:"status"`
	Alerts   Alerts `json:"alerts"`

	GroupLabels       KV `json:"groupLabels"`
	CommonLabels      KV `json:"commonLabels"`
	CommonAnnotations KV `json:"commonAnnotations"`

	ExternalURL string `json:"externalURL"`
}

type KV added in v0.9.3

type KV map[string]string

type Message added in v0.9.3

type Message struct {
	*Data

	// The protocol version.
	Version         string `json:"version"`
	GroupKey        string `json:"groupKey"`
	TruncatedAlerts uint64 `json:"truncatedAlerts"`
}

Jump to

Keyboard shortcuts

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