Documentation ¶
Index ¶
- func DeleteAlertEventsCommand() *cobra.Command
- func GetConsumerAlertSettings(client Client) (api.ConsumerAlertSettings, error)
- func GetProducerAlertSettings(client Client) (api.ProducerAlertSettings, error)
- func NewAlertGroupCommand() *cobra.Command
- func NewAlertSettingConditionGroupCommand() *cobra.Command
- func NewAlertSettingGroupCommand() *cobra.Command
- func NewCreateAlertChannelCommand() *cobra.Command
- func NewDeleteAlertChannelCommand() *cobra.Command
- func NewDeleteAlertSettingConditionCommand() *cobra.Command
- func NewGetAlertChannelTemplatesCommand() *cobra.Command
- func NewGetAlertChannelsCommand() *cobra.Command
- func NewGetAlertSettingConditionsCommand() *cobra.Command
- func NewGetAlertSettingsCommand() *cobra.Command
- func NewGetAlertsCommand() *cobra.Command
- func NewSetAlertSettingConditionCommand() *cobra.Command
- func NewUpdateAlertChannelCommand() *cobra.Command
- func NewUpdateAlertSettingsCommand() *cobra.Command
- type Client
- type SettingConditionPayload
- type SettingConditionPayloads
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteAlertEventsCommand ¶
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 ¶
NewAlertGroupCommand creates the `alert` command
func NewAlertSettingConditionGroupCommand ¶
NewAlertSettingConditionGroupCommand creates `alert setting condition`
func NewAlertSettingGroupCommand ¶
NewAlertSettingGroupCommand creates the `alert setting` command
func NewCreateAlertChannelCommand ¶
NewCreateAlertChannelCommand creates `alertchannels create` command
func NewDeleteAlertChannelCommand ¶
NewDeleteAlertChannelCommand creates `alertchannels delete` command
func NewDeleteAlertSettingConditionCommand ¶
NewDeleteAlertSettingConditionCommand creates `alert condition delete` command
func NewGetAlertChannelTemplatesCommand ¶
NewGetAlertChannelTemplatesCommand creates the `alertchannel-templates` sub-command
func NewGetAlertChannelsCommand ¶
NewGetAlertChannelsCommand creates the `alertchannels` command
func NewGetAlertSettingConditionsCommand ¶
NewGetAlertSettingConditionsCommand creates `alert setting conditions`
func NewGetAlertSettingsCommand ¶
NewGetAlertSettingsCommand creates the `alert settings` command
func NewGetAlertsCommand ¶
NewGetAlertsCommand creates the `alerts` command
func NewSetAlertSettingConditionCommand ¶
NewSetAlertSettingConditionCommand creates `alert condition set` command
func NewUpdateAlertChannelCommand ¶
NewUpdateAlertChannelCommand creates `alertchannels create` command
func NewUpdateAlertSettingsCommand ¶
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