Documentation ¶
Index ¶
- Variables
- func AcknowledgeAlert(alert *client.ExtendedAlert, acknowledgedBy string) *client.ExtendedAlert
- func AcknowledgeAlerts(alertList []*client.ExtendedAlert, acknowledgedBy string) []*client.ExtendedAlert
- func ClientLabelSetToString(labelSet client.LabelSet) string
- func CountAcknowledgedAlerts(alertList []*client.ExtendedAlert) int
- func GetAlertnameFromExtendedAlert(alert *client.ExtendedAlert) (string, error)
- func GetRegionFromExtendedAlert(alert *client.ExtendedAlert) (string, error)
- func GetSeverityFromExtendedAlert(alert *client.ExtendedAlert) (string, error)
- func IsNoCriticalOrWarningAlerts(alertsBySeverity map[string][]*client.ExtendedAlert) bool
- func MapExtendedAlertsBySeverity(alertList []*client.ExtendedAlert) (map[string][]*client.ExtendedAlert, error)
- func MergeAnnotations(srcAlert, trgtAlert *client.ExtendedAlert) client.LabelSet
- func PrintableAlertDetails(alertsBySeverity map[string][]*client.ExtendedAlert) string
- func PrintableAlertSummary(alertsBySeverity map[string][]*client.ExtendedAlert) string
Constants ¶
This section is empty.
Variables ¶
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 ¶
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.