alert

package
v5.5.4 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteAlertEventsCommand

func DeleteAlertEventsCommand() *cobra.Command

DeleteAlertEventsCommand creates the `alerts delete` command

func GetConsumerAlertSettings added in v5.4.2

func GetConsumerAlertSettings(client Client) (api.ConsumerAlertSettings, error)

GetConsumerAlertSettings returns ConsumerAlertSettings. It uses the v1 or v2 endpoint depending on its availability.

func GetProducerAlertSettings added in v5.4.2

func GetProducerAlertSettings(client Client) (api.ProducerAlertSettings, error)

GetProducerAlertSettings returns ConsumerAlertSettings. It uses the v1 or v2 endpoint depending on its availability.

func NewAlertGroupCommand

func NewAlertGroupCommand() *cobra.Command

NewAlertGroupCommand creates the `alert` command

func NewAlertSettingConditionGroupCommand

func NewAlertSettingConditionGroupCommand() *cobra.Command

NewAlertSettingConditionGroupCommand creates `alert setting condition`

func NewAlertSettingGroupCommand

func NewAlertSettingGroupCommand() *cobra.Command

NewAlertSettingGroupCommand creates the `alert setting` command

func NewCreateAlertChannelCommand

func NewCreateAlertChannelCommand() *cobra.Command

NewCreateAlertChannelCommand creates `alertchannels create` command

func NewDeleteAlertChannelCommand

func NewDeleteAlertChannelCommand() *cobra.Command

NewDeleteAlertChannelCommand creates `alertchannels delete` command

func NewDeleteAlertSettingConditionCommand

func NewDeleteAlertSettingConditionCommand() *cobra.Command

NewDeleteAlertSettingConditionCommand creates `alert condition delete` command

func NewGetAlertChannelTemplatesCommand

func NewGetAlertChannelTemplatesCommand() *cobra.Command

NewGetAlertChannelTemplatesCommand creates the `alertchannel-templates` sub-command

func NewGetAlertChannelsCommand

func NewGetAlertChannelsCommand() *cobra.Command

NewGetAlertChannelsCommand creates the `alertchannels` command

func NewGetAlertSettingConditionsCommand

func NewGetAlertSettingConditionsCommand() *cobra.Command

NewGetAlertSettingConditionsCommand creates `alert setting conditions`

func NewGetAlertSettingsCommand

func NewGetAlertSettingsCommand() *cobra.Command

NewGetAlertSettingsCommand creates the `alert settings` command

func NewGetAlertsCommand

func NewGetAlertsCommand() *cobra.Command

NewGetAlertsCommand creates the `alerts` command

func NewSetAlertSettingConditionCommand

func NewSetAlertSettingConditionCommand() *cobra.Command

NewSetAlertSettingConditionCommand creates `alert condition set` command

func NewUpdateAlertChannelCommand

func NewUpdateAlertChannelCommand() *cobra.Command

NewUpdateAlertChannelCommand creates `alertchannels create` command

func NewUpdateAlertSettingsCommand

func NewUpdateAlertSettingsCommand() *cobra.Command

NewUpdateAlertSettingsCommand updates an alert's settings, e.g. channels, etc.

Types

type Client added in v5.4.2

type Client interface {
	HasAlertSettingsV2Endpoints() (bool, error)
	GetAlertSettingV1(id int) (api.AlertSettingV1, error)
	GetAlertSettingV2(id int) (api.AlertRuleV2, error)
}

type SettingConditionPayload

type SettingConditionPayload struct {
	AlertID     int      `json:"alert" yaml:"alert"`
	ConditionID string   `json:"conditionID,omitempty" yaml:"conditionID"`
	Channels    []string `json:"channels" yaml:"channels"`
	Topic       string   `yaml:"topic,omitempty"`
	Group       string   `yaml:"group,omitempty"`
	Threshold   int      `yaml:"threshold,omitempty"`
	Mode        string   `yaml:"mode,omitempty"`
	MoreThan    int      `yaml:"more-than,omitempty"`
	LessThan    int      `yaml:"less-than,omitempty"`
	Duration    string   `yaml:"duration,omitempty"`
}

SettingConditionPayload is the payload for creating alert setttings

type SettingConditionPayloads

type SettingConditionPayloads struct {
	AlertID    int      `json:"alert" yaml:"alert"`
	Conditions []string `json:"conditions" yaml:"conditions"`
}

SettingConditionPayloads is the payload for creating alert setttings

Jump to

Keyboard shortcuts

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