extalert

package
v1.0.27 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2026 License: MIT Imports: 16 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	TargetType = "com.steadybit.extension_splunk_platform.alert"
)

Variables

This section is empty.

Functions

func NewAlertDiscovery

func NewAlertDiscovery(client AlertClient) discovery_kit_sdk.TargetDiscovery

Types

type AlertCheckAction

type AlertCheckAction struct {
	Client FiredAlertsClient
}

func (*AlertCheckAction) Describe

func (*AlertCheckAction) NewEmptyState

func (a *AlertCheckAction) NewEmptyState() AlertCheckState

func (*AlertCheckAction) Start

func (*AlertCheckAction) Status

type AlertCheckState

type AlertCheckState struct {
	Id                 string
	Name               string
	Url                string
	Start              time.Time
	End                time.Time
	CheckNewAlertsOnly bool
	ExpectedState      string
	StateCheckMode     string
	StateCheckSuccess  bool
	FailEarly          bool
	// DeviationTitle remembers the first observed deviation in 'All the time' + fail-at-end mode
	// (FailEarly = false) so it can be reported once the step ends.
	DeviationTitle string
	TriggerTime    int64
}

type AlertClient

type AlertClient interface {
	Alerts(ctx context.Context) ([]Entry, error)
}

type Content

type Content struct {
	Severity    Severity `json:"alert.severity"`
	TriggerTime int64    `json:"trigger_time"`
}

type Entry

type Entry struct {
	Id      string  `json:"id"`
	Name    string  `json:"name"`
	Author  string  `json:"author"`
	Content Content `json:"content"`
	Links   Links   `json:"links"`
}

type FiredAlertsClient

type FiredAlertsClient interface {
	FiredAlerts(ctx context.Context, alertUrl string) ([]Entry, error)
}
type Links struct {
	Alerts string `json:"alerts"`
}

type Paging

type Paging struct {
	Total   int `json:"total"`
	PerPage int `json:"perPage"`
	Offset  int `json:"offset"`
}

type Response

type Response struct {
	Paging  Paging  `json:"paging"`
	Entries []Entry `json:"entry"`
}

type Severity

type Severity int
const (
	SeverityDebug  Severity = 1
	SeverityInfo   Severity = 2
	SeverityWarn   Severity = 3
	SeverityError  Severity = 4
	SeveritySevere Severity = 5
	SeverityFatal  Severity = 6
)

func (Severity) String

func (s Severity) String() string

type SplunkClient

type SplunkClient struct {
	// contains filtered or unexported fields
}

func NewSplunkClient

func NewSplunkClient() *SplunkClient

func (*SplunkClient) Alerts

func (c *SplunkClient) Alerts(ctx context.Context) ([]Entry, error)

func (*SplunkClient) FiredAlerts

func (c *SplunkClient) FiredAlerts(ctx context.Context, alertUrl string) ([]Entry, error)

Jump to

Keyboard shortcuts

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