alert

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	Id                 string                `json:"id"`
	Fingerprint        string                `json:"fingerprint"`
	RuleId             string                `json:"rule_id"`
	RuleName           string                `json:"rule_name"`
	ProjectId          string                `json:"project_id"`
	ApplicationId      model.ApplicationId   `json:"application_id"`
	Severity           model.Status          `json:"severity"`
	Summary            string                `json:"summary"`
	Details            []model.AlertDetail   `json:"details,omitempty"`
	OpenedAt           timeseries.Time       `json:"opened_at"`
	ResolvedAt         timeseries.Time       `json:"resolved_at"`
	ManuallyResolvedAt timeseries.Time       `json:"manually_resolved_at"`
	UpdatedAt          timeseries.Time       `json:"updated_at"`
	Suppressed         bool                  `json:"suppressed"`
	ResolvedBy         string                `json:"resolved_by,omitempty"`
	Report             model.AuditReportName `json:"report,omitempty"`
	Duration           timeseries.Duration   `json:"duration"`
	Notifications      []AlertNotification   `json:"notifications,omitempty"`
	Widgets            []*model.Widget       `json:"widgets,omitempty"`
	LogPatternHash     string                `json:"log_pattern_hash,omitempty"`
}

func Render

func Render(w *model.World, a *model.Alert, app *model.Application, rules []*model.AlertingRule, notifications []db.AlertNotification) Alert

type AlertNotification

type AlertNotification struct {
	Type    string `json:"type"`
	Channel string `json:"channel,omitempty"`
}

type AlertsListView

type AlertsListView struct {
	Alerts   []Alert `json:"alerts"`
	Total    int     `json:"total"`
	Firing   int     `json:"firing"`
	Resolved int     `json:"resolved"`
}

func RenderList

func RenderList(w *model.World, result *db.AlertsResult, rules []*model.AlertingRule, notifications map[string][]db.AlertNotification) *AlertsListView

Jump to

Keyboard shortcuts

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