alertmanager

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

This package contains types and functions useful for working with alert manager objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	Status       AlertStatus       `json:"status,omitempty"`
	Labels       map[string]string `json:"labels,omitempty"`
	Annotations  map[string]string `json:"annotations,omitempty"`
	StartsAt     time.Time         `json:"startsAt,omitempty"`
	EndsAt       time.Time         `json:"endsAt,omitempty"`
	GeneratorURL time.Time         `json:"generatorURL,omitempty"`
}

Alert represents each of the alerts sent by the alert manager to a receiver.

func (*Alert) Hash

func (a *Alert) Hash() string

Hash calculates the hash for the alert.

func (*Alert) Name

func (a *Alert) Name() string

Name returns the name of the alert.

func (*Alert) Namespace

func (a *Alert) Namespace() string

Namespace returns the namespace of the alert.

type AlertStatus

type AlertStatus string

AlertStatus represents the status of a alert.

const (
	AlertStatusFiring   AlertStatus = "firing"
	AlertStatusResolved AlertStatus = "resolved"
)

type Message

type Message struct {
	Receiver          string            `json:"receiver,omitempty"`
	Status            AlertStatus       `json:"status,omitempty"`
	Alerts            []*Alert          `json:"alerts,omitempty"`
	GroupLabels       map[string]string `json:"groupLabels,omitempty"`
	CommonLabels      map[string]string `json:"commonLabels,omitempty"`
	CommonAnnotations map[string]string `json:"commonAnnotations,omitempty"`
	ExternalURL       string            `json:"exterlalURL,omitempty"`
}

Data represents each message sent by the alert manager to a receiver.

Jump to

Keyboard shortcuts

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