alerts

package
v0.73.3 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	Status       string     `json:"status"`
	Labels       Label      `json:"labels"`
	Annotations  Annotation `json:"annotations"`
	StartsAt     time.Time  `json:"startsAt"`
	EndsAt       time.Time  `json:"endsAt"`
	GeneratorURL string     `json:"generatorURL"`
}

Alert describes an alert

type Annotation

type Annotation struct {
	Description string `json:"description"`
	Summary     string `json:"summary"`
}

Annotation describes an alert

type GroupLabel

type GroupLabel struct {
	AlertName   string `json:"alertname"`
	Application string `json:"application"`
}

GroupLabel describes a group label

type Label

type Label struct {
	AlertName      string `json:"alertname"`
	Application    string `json:"application"`
	ApplicationID  string `json:"application_id"`
	BrokerID       string `json:"broker_id"`
	Deployment     string `json:"deployment"`
	Instance       string `json:"instance"`
	Job            string `json:"job"`
	Organization   string `json:"organization"`
	OrganizationID string `json:"organization_id"`
	Region         string `json:"region"`
	Severity       string `json:"severity"`
	Space          string `json:"space"`
	SpaceID        string `json:"space_id"`
}

Label describes a label

type Payload

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

Payload is the JSON format of HSDP Metrics webhook alerts

Jump to

Keyboard shortcuts

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