extalert

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 16 Imported by: 0

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
	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