alert

package
v0.0.0-...-df093e9 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AlertSeverity = struct {
	Critical,
	Warning,
	Info string
}{
	"critical",
	"warning",
	"info",
}

AlertSeverity ...

Functions

func AcknowledgeAlert

func AcknowledgeAlert(alert *client.ExtendedAlert, acknowledgedBy string) *client.ExtendedAlert

AcknowledgeAlert sets the acknowledgedBy annotation for an alert

func AcknowledgeAlerts

func AcknowledgeAlerts(alertList []*client.ExtendedAlert, acknowledgedBy string) []*client.ExtendedAlert

AcknowledgeAlerts acknowledges multiple alerts

func ClientLabelSetToString

func ClientLabelSetToString(labelSet client.LabelSet) string

ClientLabelSetToString converts a client.LabelSet to a string

func CountAcknowledgedAlerts

func CountAcknowledgedAlerts(alertList []*client.ExtendedAlert) int

CountAcknowledgedAlerts returns the number of acknowledged alerts in a list

func GetAlertnameFromExtendedAlert

func GetAlertnameFromExtendedAlert(alert *client.ExtendedAlert) (string, error)

GetAlertnameFromExtendedAlert extracts the alertname label from an alert.

func GetRegionFromExtendedAlert

func GetRegionFromExtendedAlert(alert *client.ExtendedAlert) (string, error)

GetRegionFromExtendedAlert extracts the region label from an alert.

func GetSeverityFromExtendedAlert

func GetSeverityFromExtendedAlert(alert *client.ExtendedAlert) (string, error)

GetSeverityFromExtendedAlert extract the severity label from an alert.

func IsNoCriticalOrWarningAlerts

func IsNoCriticalOrWarningAlerts(alertsBySeverity map[string][]*client.ExtendedAlert) bool

IsNoCriticalOrWarningAlerts checks whether critical or warning alerts exist

func MapExtendedAlertsBySeverity

func MapExtendedAlertsBySeverity(alertList []*client.ExtendedAlert) (map[string][]*client.ExtendedAlert, error)

MapExtendedAlertsBySeverity maps alerts to their severity for easier lookup.

func MergeAnnotations

func MergeAnnotations(srcAlert, trgtAlert *client.ExtendedAlert) client.LabelSet

MergeAnnotations merges annotations for mult. alerts.

func PrintableAlertDetails

func PrintableAlertDetails(alertsBySeverity map[string][]*client.ExtendedAlert) string

PrintableAlertDetails ...

func PrintableAlertSummary

func PrintableAlertSummary(alertsBySeverity map[string][]*client.ExtendedAlert) string

PrintableAlertSummary ...

Types

This section is empty.

Jump to

Keyboard shortcuts

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