webhook

package
v1.6.6 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// AlertStatusFiring alert status when it is firing
	AlertStatusFiring string = "firing"

	// AlertStatusResolved alert status when it is resolved
	AlertStatusResolved string = "resolved"
)
View Source
const (
	// DeadMansSwitchAlertName is the name of the DMS alert
	DeadMansSwitchAlertName = "CRCDeadMansSwitch"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	Receiver          string            `json:"receiver"`
	Status            string            `json:"status"`
	Alerts            []AlertItem       `json:"alerts"`
	GroupLabels       GroupLabels       `json:"groupLabels"`
	CommonLabels      CommonLabels      `json:"commonLabels"`
	CommonAnnotations CommonAnnotations `json:"commonAnnotations"`
	ExternalURL       string            `json:"externalURL"`
	Version           string            `json:"version"`
	GroupKey          string            `json:"groupKey"`
}

Alert represents an Alertmanager alert

type AlertItem

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

AlertItem ...

type AlertLabels

type AlertLabels struct {
	Alertname string `json:"alertname"`
	Service   string `json:"service"`
	Severity  string `json:"severity"`
}

AlertLabels ...

type CommonAnnotations

type CommonAnnotations struct {
	Summary string `json:"summary"`
}

CommonAnnotations ...

type CommonLabels

type CommonLabels struct {
	Alertname string `json:"alertname"`
	Service   string `json:"service"`
	Severity  string `json:"severity"`
}

CommonLabels ...

type GroupLabels

type GroupLabels struct {
	Alertname string `json:"alertname"`
}

GroupLabels ...

type Server

type Server struct {
	Client      client.Client
	Namespace   string
	Log         logr.Logger
	BindAddress string
	Metrics     monitoring.MetricsI
	AlertMap    []configv1.AlertRule
}

Server ...

func (*Server) Start

func (s *Server) Start() error

Start starts the webhook server

Jump to

Keyboard shortcuts

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