models

package
v0.0.0-...-d49e2e0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: AGPL-3.0 Imports: 1 Imported by: 6

Documentation

Index

Constants

View Source
const (
	RuleUIDLabel      = "__alert_rule_uid__"
	NamespaceUIDLabel = "__alert_rule_namespace_uid__"

	// Annotations are actually a set of labels, so technically this is the label name of an annotation.
	DashboardUIDAnnotation = "__dashboardUid__"
	PanelIDAnnotation      = "__panelId__"
	OrgIDAnnotation        = "__orgId__"

	// This isn't a hard-coded secret token, hence the nolint.
	//nolint:gosec
	ImageTokenAnnotation = "__alertImageToken__"

	// GrafanaReservedLabelPrefix contains the prefix for Grafana reserved labels. These differ from "__<label>__" labels
	// in that they are not meant for internal-use only and will be passed-through to AMs and available to users in the same
	// way as manually configured labels.
	GrafanaReservedLabelPrefix = "grafana_"

	// FolderTitleLabel is the label that will contain the title of an alert's folder/namespace.
	FolderTitleLabel = GrafanaReservedLabelPrefix + "folder"

	// StateReasonAnnotation is the name of the annotation that explains the difference between evaluation state and alert state (i.e. changing state when NoData or Error).
	StateReasonAnnotation = GrafanaReservedLabelPrefix + "state_reason"

	ValuesAnnotation      = "__values__"
	ValueStringAnnotation = "__value_string__"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Integration

type Integration struct {
	// A timestamp indicating the last attempt to deliver a notification regardless of the outcome.
	// Format: date-time
	LastNotifyAttempt strfmt.DateTime `json:"lastNotifyAttempt,omitempty"`

	// Duration of the last attempt to deliver a notification in humanized format (`1s` or `15ms`, etc).
	LastNotifyAttemptDuration string `json:"lastNotifyAttemptDuration,omitempty"`

	// Error string for the last attempt to deliver a notification. Empty if the last attempt was successful.
	LastNotifyAttemptError string `json:"lastNotifyAttemptError,omitempty"`

	// Name of the integration.
	Name string `json:"name"`

	// Whether the integration is configured to send resolved notifications.
	SendResolved bool `json:"sendResolved"`
}

type Receiver

type Receiver struct {
	// Whether the receiver is used in a route or not.
	Active bool `json:"active"`

	// Integrations configured for this receiver.
	Integrations []Integration `json:"integrations"`

	// Name of the receiver.
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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