extslos

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TargetType = "com.steadybit.extension_splunk.slo"
)

Variables

View Source
var (
	RestyClient *resty.Client
)

Functions

func NewSLODiscovery

func NewSLODiscovery() discovery_kit_sdk.TargetDiscovery

func NewSloStateCheckAction

func NewSloStateCheckAction() action_kit_sdk.Action[SloCheckState]

func SLOCheckStatus

func SLOCheckStatus(ctx context.Context, state *SloCheckState, client *resty.Client) (*action_kit_api.StatusResult, error)

Types

type CalculatedParameters

type CalculatedParameters struct {
	FireLasting      string  `json:"fireLasting"`
	PercentOfLasting float64 `json:"percentOfLasting"`
}

type Inputs

type Inputs struct {
	GoodEventsLabel  string `json:"goodEventsLabel"`
	ProgramText      string `json:"programText"`
	TotalEventsLabel string `json:"totalEventsLabel"`
}

type Response

type Response struct {
	Count   int   `json:"count"`
	Results []Slo `json:"results"`
}

type Rule

type Rule struct {
	CalculatedParameters CalculatedParameters `json:"calculatedParameters"`
	DetectLabel          string               `json:"detectLabel"`
	Disabled             bool                 `json:"disabled"`
	Notifications        []string             `json:"notifications"`
	ParameterizedBody    string               `json:"parameterizedBody"`
	ParameterizedSubject string               `json:"parameterizedSubject"`
	Severity             string               `json:"severity"`
}

type SLOAlertRule

type SLOAlertRule struct {
	AlertsTriggered bool   `json:"alertsTriggered"`
	Rules           []Rule `json:"rules"`
	Type            string `json:"type"`
}

type SLOSearchConfig

type SLOSearchConfig struct {
	BreachAlertsTriggered          bool     `json:"breachAlertsTriggered"`
	BurnRateAlertsTriggered        bool     `json:"burnRateAlertsTriggered"`
	ErrorBudgetLeftAlertsTriggered bool     `json:"errorBudgetLeftAlertsTriggered"`
	SLOIds                         []string `json:"sloIds"`
}

type Slo

type Slo struct {
	Created       int64    `json:"created"`
	Creator       string   `json:"creator"`
	Description   *string  `json:"description"` // pointer to allow null
	ID            string   `json:"id"`
	Indicator     string   `json:"indicator"`
	Inputs        Inputs   `json:"inputs"`
	LastUpdated   int64    `json:"lastUpdated"`
	LastUpdatedBy string   `json:"lastUpdatedBy"`
	Metadata      []string `json:"metadata"`
	Name          string   `json:"name"`
	Targets       []Target `json:"targets"`
	Type          string   `json:"type"`
}

type SloCheckState

type SloCheckState struct {
	SloID              string
	SloName            string
	CheckNewAlertsOnly bool
	Start              time.Time
	End                time.Time
	ExpectedState      string
	StateCheckMode     string
	StateCheckSuccess  bool
}

type SloStateCheckAction

type SloStateCheckAction struct{}

func (*SloStateCheckAction) Describe

func (*SloStateCheckAction) NewEmptyState

func (m *SloStateCheckAction) NewEmptyState() SloCheckState

func (*SloStateCheckAction) Start

func (*SloStateCheckAction) Status

type Target

type Target struct {
	CompliancePeriod string         `json:"compliancePeriod"`
	SLO              float64        `json:"slo"`
	SLOAlertRules    []SLOAlertRule `json:"sloAlertRules"`
	Type             string         `json:"type"`
}

Jump to

Keyboard shortcuts

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