condition

package
v0.6.2-rc1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OpniDisconnect *alertingv1.AlertCondition = &alertingv1.AlertCondition{
	Name:        "Disconnected Opni Agent {{ .agentId }} ",
	Description: "Opni agent {{ .agentId }} has been disconnected for more than {{ .timeout }}",
	Labels:      []string{"opni", "agent", "system"},
	Severity:    alertingv1.Severity_CRITICAL,
	AlertType:   &alertingv1.AlertTypeDetails{Type: &alertingv1.AlertTypeDetails_System{}},
}
View Source
var RequiredCortexWebhookAnnotationIdentifiers = []string{"conditionId"}

Functions

func ParseAlertManagerWebhookPayload

func ParseAlertManagerWebhookPayload(annotations []gjson.Result) ([]*alertingv1.TriggerAlertsRequest, []error)

func ParseCortexPayloadBytes

func ParseCortexPayloadBytes(inputPayload []byte) ([]gjson.Result, error)

Types

type MockCortexPayload

type MockCortexPayload struct {
	webhook.Message
}

func NewSimpleMockAlertManagerPayloadFromAnnotations

func NewSimpleMockAlertManagerPayloadFromAnnotations(ann map[string]string) *MockCortexPayload

Jump to

Keyboard shortcuts

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