extalertrules

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TargetType = "com.steadybit.extension_grafana.alert-rule"
)

Variables

View Source
var RestyClient *resty.Client

Functions

func AlertRuleCheckStatus

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

func NewAlertDiscovery

func NewAlertDiscovery() discovery_kit_sdk.TargetDiscovery

func NewAlertRuleStateCheckAction

func NewAlertRuleStateCheckAction() action_kit_sdk.Action[AlertRuleCheckState]

Types

type AlertGroup

type AlertGroup struct {
	Name        string      `json:"name"`
	AlertsRules []AlertRule `json:"rules,omitempty"`
}

type AlertRule

type AlertRule struct {
	State  string `json:"state"`
	Name   string `json:"name"`
	Health string `json:"health"`
	Type   string `json:"type"`
}

type AlertRuleCheckState

type AlertRuleCheckState struct {
	AlertRuleId         string
	AlertRuleDatasource string
	AlertRuleName       string
	End                 time.Time
	ExpectedState       []string
	StateCheckMode      string
	StateCheckSuccess   bool
}

type AlertRuleStateCheckAction

type AlertRuleStateCheckAction struct{}

func (*AlertRuleStateCheckAction) Describe

func (*AlertRuleStateCheckAction) NewEmptyState

func (*AlertRuleStateCheckAction) Start

func (*AlertRuleStateCheckAction) Status

type AlertsData

type AlertsData struct {
	AlertsGroups []AlertGroup `json:"groups,omitempty"`
}

type AlertsStates

type AlertsStates struct {
	AlertsData AlertsData `json:"data"`
	Status     string     `json:"status"`
}

type DataSource

type DataSource struct {
	ID          int    `json:"id"`
	UID         string `json:"uid"`
	OrgID       int    `json:"orgId"`
	Name        string `json:"name"`
	Type        string `json:"type"`
	TypeName    string `json:"typeName"`
	TypeLogoUrl string `json:"typeLogoUrl"`
	Access      string `json:"access"`
	URL         string `json:"url"`
	User        string `json:"user"`
	Database    string `json:"database"`
	BasicAuth   bool   `json:"basicAuth"`
	IsDefault   bool   `json:"isDefault"`
	JsonData    any    `json:"jsonData"`
	ReadOnly    bool   `json:"readOnly"`
}

Jump to

Keyboard shortcuts

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