Documentation
¶
Index ¶
- Constants
- Variables
- type Config
- type Coordinator
- type EmailConfig
- type GlobalConfig
- type HostPort
- type MSTeamsV2Config
- type MuteTimeInterval
- type OpsGenieConfig
- type OpsGenieConfigResponder
- type PagerdutyConfig
- type PagerdutyImage
- type PagerdutyLink
- type PushoverConfig
- type Receiver
- type RocketchatAttachmentAction
- type RocketchatAttachmentField
- type RocketchatConfig
- type Route
- type SNSConfig
- type SecretTemplateURL
- type SlackAction
- type SlackConfig
- type SlackConfirmationField
- type SlackField
- type TelegramConfig
- type ThreadingConfig
- type TimeInterval
- type VictorOpsConfig
- type WebexConfig
- type WechatConfig
Constants ¶
const ( ProcessingTypeSendMessage = "sendMessage" ProcessingTypeRespondWithMessage = "respondWithMessage" )
Variables ¶
var ( // DefaultWebexConfig defines default values for Webex configurations. DefaultWebexConfig = WebexConfig{ NotifierConfig: amcommoncfg.NotifierConfig{ VSendResolved: true, }, Message: `{{ template "webex.default.message" . }}`, } // DefaultEmailConfig defines default values for Email configurations. DefaultEmailConfig = EmailConfig{ NotifierConfig: amcommoncfg.NotifierConfig{ VSendResolved: false, }, HTML: `{{ template "email.default.html" . }}`, Text: ``, } // DefaultEmailSubject defines the default Subject header of an Email. DefaultEmailSubject = `{{ template "email.default.subject" . }}` // DefaultPagerdutyDetails defines the default values for PagerDuty details. DefaultPagerdutyDetails = map[string]any{ "firing": `{{ .Alerts.Firing | toJson }}`, "resolved": `{{ .Alerts.Resolved | toJson }}`, "num_firing": `{{ .Alerts.Firing | len }}`, "num_resolved": `{{ .Alerts.Resolved | len }}`, } // DefaultPagerdutyConfig defines default values for PagerDuty configurations. DefaultPagerdutyConfig = PagerdutyConfig{ NotifierConfig: amcommoncfg.NotifierConfig{ VSendResolved: true, }, Description: `{{ template "pagerduty.default.description" .}}`, Client: `{{ template "pagerduty.default.client" . }}`, ClientURL: `{{ template "pagerduty.default.clientURL" . }}`, } // DefaultSlackConfig defines default values for Slack configurations. DefaultSlackConfig = SlackConfig{ NotifierConfig: amcommoncfg.NotifierConfig{ VSendResolved: false, }, Color: `{{ template "slack.default.color" . }}`, Username: `{{ template "slack.default.username" . }}`, Title: `{{ template "slack.default.title" . }}`, TitleLink: `{{ template "slack.default.titlelink" . }}`, IconEmoji: `{{ template "slack.default.iconemoji" . }}`, IconURL: `{{ template "slack.default.iconurl" . }}`, Pretext: `{{ template "slack.default.pretext" . }}`, Text: `{{ template "slack.default.text" . }}`, Fallback: `{{ template "slack.default.fallback" . }}`, CallbackID: `{{ template "slack.default.callbackid" . }}`, Footer: `{{ template "slack.default.footer" . }}`, } // DefaultRocketchatConfig defines default values for Rocketchat configurations. DefaultRocketchatConfig = RocketchatConfig{ NotifierConfig: amcommoncfg.NotifierConfig{ VSendResolved: false, }, Color: `{{ if eq .Status "firing" }}red{{ else }}green{{ end }}`, Emoji: `{{ template "rocketchat.default.emoji" . }}`, IconURL: `{{ template "rocketchat.default.iconurl" . }}`, Text: `{{ template "rocketchat.default.text" . }}`, Title: `{{ template "rocketchat.default.title" . }}`, TitleLink: `{{ template "rocketchat.default.titlelink" . }}`, } // DefaultOpsGenieConfig defines default values for OpsGenie configurations. DefaultOpsGenieConfig = OpsGenieConfig{ NotifierConfig: amcommoncfg.NotifierConfig{ VSendResolved: true, }, Message: `{{ template "opsgenie.default.message" . }}`, Description: `{{ template "opsgenie.default.description" . }}`, Source: `{{ template "opsgenie.default.source" . }}`, } // DefaultWechatConfig defines default values for wechat configurations. DefaultWechatConfig = WechatConfig{ NotifierConfig: amcommoncfg.NotifierConfig{ VSendResolved: false, }, Message: `{{ template "wechat.default.message" . }}`, ToUser: `{{ template "wechat.default.to_user" . }}`, ToParty: `{{ template "wechat.default.to_party" . }}`, ToTag: `{{ template "wechat.default.to_tag" . }}`, AgentID: `{{ template "wechat.default.agent_id" . }}`, } // DefaultVictorOpsConfig defines default values for VictorOps configurations. DefaultVictorOpsConfig = VictorOpsConfig{ NotifierConfig: amcommoncfg.NotifierConfig{ VSendResolved: true, }, MessageType: `CRITICAL`, StateMessage: `{{ template "victorops.default.state_message" . }}`, EntityDisplayName: `{{ template "victorops.default.entity_display_name" . }}`, MonitoringTool: `{{ template "victorops.default.monitoring_tool" . }}`, } // DefaultPushoverConfig defines default values for Pushover configurations. DefaultPushoverConfig = PushoverConfig{ NotifierConfig: amcommoncfg.NotifierConfig{ VSendResolved: true, }, Title: `{{ template "pushover.default.title" . }}`, Message: `{{ template "pushover.default.message" . }}`, URL: `{{ template "pushover.default.url" . }}`, Priority: `{{ if eq .Status "firing" }}2{{ else }}0{{ end }}`, Retry: duration(1 * time.Minute), Expire: duration(1 * time.Hour), HTML: false, } // DefaultSNSConfig defines default values for SNS configurations. DefaultSNSConfig = SNSConfig{ NotifierConfig: amcommoncfg.NotifierConfig{ VSendResolved: true, }, Subject: `{{ template "sns.default.subject" . }}`, Message: `{{ template "sns.default.message" . }}`, } DefaultTelegramConfig = TelegramConfig{ NotifierConfig: amcommoncfg.NotifierConfig{ VSendResolved: true, }, DisableNotifications: false, Message: `{{ template "telegram.default.message" . }}`, ParseMode: "HTML", } DefaultMSTeamsV2Config = MSTeamsV2Config{ NotifierConfig: amcommoncfg.NotifierConfig{ VSendResolved: true, }, Title: `{{ template "msteamsv2.default.title" . }}`, Text: `{{ template "msteamsv2.default.text" . }}`, } )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Global *GlobalConfig `yaml:"global,omitempty" json:"global,omitempty"`
Route *Route `yaml:"route,omitempty" json:"route,omitempty"`
InhibitRules []amcommoncfg.InhibitRule `yaml:"inhibit_rules,omitempty" json:"inhibit_rules,omitempty"`
Receivers []Receiver `yaml:"receivers,omitempty" json:"receivers,omitempty"`
Templates []string `yaml:"templates" json:"templates"`
// Deprecated. Remove before v1.0 release.
MuteTimeIntervals []MuteTimeInterval `yaml:"mute_time_intervals,omitempty" json:"mute_time_intervals,omitempty"`
TimeIntervals []TimeInterval `yaml:"time_intervals,omitempty" json:"time_intervals,omitempty"`
TracingConfig tracing.TracingConfig `yaml:"tracing,omitempty" json:"tracing,omitempty"`
EventRecorder eventrecorder.Config `yaml:"event_recorder,omitempty" json:"event_recorder,omitempty"`
// contains filtered or unexported fields
}
Config is the top-level configuration for Alertmanager's config files.
type Coordinator ¶ added in v0.17.0
type Coordinator struct {
// contains filtered or unexported fields
}
Coordinator coordinates Alertmanager configurations beyond the lifetime of a single configuration.
func NewCoordinator ¶ added in v0.17.0
func NewCoordinator(configFilePath string, r prometheus.Registerer, l *slog.Logger) *Coordinator
NewCoordinator returns a new coordinator with the given configuration file path. It does not yet load the configuration from file. This is done in `Reload()`.
func (*Coordinator) ApplyConfig ¶ added in v0.33.0
func (c *Coordinator) ApplyConfig(conf *Config) error
ApplyConfig accepts an already-loaded configuration, stores it, and notifies all subscribers. Use this for the initial load so the file is only read once.
func (*Coordinator) Reload ¶ added in v0.17.0
func (c *Coordinator) Reload() error
Reload triggers a configuration reload from file and notifies all configuration change subscribers.
func (*Coordinator) Subscribe ¶ added in v0.17.0
func (c *Coordinator) Subscribe(ss ...func(*Config) error)
Subscribe subscribes the given Subscribers to configuration changes.
type EmailConfig ¶
type EmailConfig struct {
amcommoncfg.NotifierConfig `yaml:",inline" json:",inline"`
// Email address to notify.
To string `yaml:"to,omitempty" json:"to,omitempty"`
From string `yaml:"from,omitempty" json:"from,omitempty"`
Hello string `yaml:"hello,omitempty" json:"hello,omitempty"`
Smarthost HostPort `yaml:"smarthost,omitempty" json:"smarthost,omitempty"`
AuthUsername string `yaml:"auth_username,omitempty" json:"auth_username,omitempty"`
AuthPassword commoncfg.Secret `yaml:"auth_password,omitempty" json:"auth_password,omitempty"`
AuthPasswordFile string `yaml:"auth_password_file,omitempty" json:"auth_password_file,omitempty"`
AuthSecret commoncfg.Secret `yaml:"auth_secret,omitempty" json:"auth_secret,omitempty"`
AuthSecretFile string `yaml:"auth_secret_file,omitempty" json:"auth_secret_file,omitempty"`
AuthIdentity string `yaml:"auth_identity,omitempty" json:"auth_identity,omitempty"`
Headers map[string]string `yaml:"headers,omitempty" json:"headers,omitempty"`
HTML string `yaml:"html,omitempty" json:"html,omitempty"`
Text string `yaml:"text,omitempty" json:"text,omitempty"`
RequireTLS *bool `yaml:"require_tls,omitempty" json:"require_tls,omitempty"`
TLSConfig *commoncfg.TLSConfig `yaml:"tls_config,omitempty" json:"tls_config,omitempty"`
// ForceImplicitTLS controls whether to use implicit TLS (direct TLS connection).
// true: force use of implicit TLS (direct TLS connection)
// false: force disable implicit TLS (use explicit TLS/STARTTLS if required)
// nil (default): auto-detect based on port (465=implicit, other=explicit) for backward compatibility
ForceImplicitTLS *bool `yaml:"force_implicit_tls,omitempty" json:"force_implicit_tls,omitempty"`
Threading ThreadingConfig `yaml:"threading,omitempty" json:"threading,omitempty"`
}
EmailConfig configures notifications via mail.
func (*EmailConfig) UnmarshalYAML ¶
func (c *EmailConfig) UnmarshalYAML(unmarshal func(any) error) error
UnmarshalYAML implements the yaml.Unmarshaler interface.
type GlobalConfig ¶
type GlobalConfig struct {
// ResolveTimeout is the time after which an alert is declared resolved
// if it has not been updated.
ResolveTimeout model.Duration `yaml:"resolve_timeout" json:"resolve_timeout"`
HTTPConfig *commoncfg.HTTPClientConfig `yaml:"http_config,omitempty" json:"http_config,omitempty"`
JiraAPIURL *amcommoncfg.URL `yaml:"jira_api_url,omitempty" json:"jira_api_url,omitempty"`
SMTPFrom string `yaml:"smtp_from,omitempty" json:"smtp_from,omitempty"`
SMTPHello string `yaml:"smtp_hello,omitempty" json:"smtp_hello,omitempty"`
SMTPSmarthost HostPort `yaml:"smtp_smarthost,omitempty" json:"smtp_smarthost,omitempty"`
SMTPAuthUsername string `yaml:"smtp_auth_username,omitempty" json:"smtp_auth_username,omitempty"`
SMTPAuthPassword commoncfg.Secret `yaml:"smtp_auth_password,omitempty" json:"smtp_auth_password,omitempty"`
SMTPAuthPasswordFile string `yaml:"smtp_auth_password_file,omitempty" json:"smtp_auth_password_file,omitempty"`
SMTPAuthSecret commoncfg.Secret `yaml:"smtp_auth_secret,omitempty" json:"smtp_auth_secret,omitempty"`
SMTPAuthSecretFile string `yaml:"smtp_auth_secret_file,omitempty" json:"smtp_auth_secret_file,omitempty"`
SMTPAuthIdentity string `yaml:"smtp_auth_identity,omitempty" json:"smtp_auth_identity,omitempty"`
SMTPRequireTLS bool `yaml:"smtp_require_tls" json:"smtp_require_tls,omitempty"`
SMTPTLSConfig *commoncfg.TLSConfig `yaml:"smtp_tls_config,omitempty" json:"smtp_tls_config,omitempty"`
SMTPForceImplicitTLS *bool `yaml:"smtp_force_implicit_tls,omitempty" json:"smtp_force_implicit_tls,omitempty"`
SlackAPIURL *amcommoncfg.SecretURL `yaml:"slack_api_url,omitempty" json:"slack_api_url,omitempty"`
SlackAPIURLFile string `yaml:"slack_api_url_file,omitempty" json:"slack_api_url_file,omitempty"`
SlackAppToken commoncfg.Secret `yaml:"slack_app_token,omitempty" json:"slack_app_token,omitempty"`
SlackAppTokenFile string `yaml:"slack_app_token_file,omitempty" json:"slack_app_token_file,omitempty"`
SlackAppURL *amcommoncfg.URL `yaml:"slack_app_url,omitempty" json:"slack_app_url,omitempty"`
PagerdutyURL *amcommoncfg.URL `yaml:"pagerduty_url,omitempty" json:"pagerduty_url,omitempty"`
OpsGenieAPIURL *amcommoncfg.URL `yaml:"opsgenie_api_url,omitempty" json:"opsgenie_api_url,omitempty"`
OpsGenieAPIKey commoncfg.Secret `yaml:"opsgenie_api_key,omitempty" json:"opsgenie_api_key,omitempty"`
OpsGenieAPIKeyFile string `yaml:"opsgenie_api_key_file,omitempty" json:"opsgenie_api_key_file,omitempty"`
WeChatAPIURL *amcommoncfg.URL `yaml:"wechat_api_url,omitempty" json:"wechat_api_url,omitempty"`
WeChatAPISecret commoncfg.Secret `yaml:"wechat_api_secret,omitempty" json:"wechat_api_secret,omitempty"`
WeChatAPISecretFile string `yaml:"wechat_api_secret_file,omitempty" json:"wechat_api_secret_file,omitempty"`
WeChatAPICorpID string `yaml:"wechat_api_corp_id,omitempty" json:"wechat_api_corp_id,omitempty"`
VictorOpsAPIURL *amcommoncfg.URL `yaml:"victorops_api_url,omitempty" json:"victorops_api_url,omitempty"`
VictorOpsAPIKey commoncfg.Secret `yaml:"victorops_api_key,omitempty" json:"victorops_api_key,omitempty"`
VictorOpsAPIKeyFile string `yaml:"victorops_api_key_file,omitempty" json:"victorops_api_key_file,omitempty"`
TelegramAPIUrl *amcommoncfg.URL `yaml:"telegram_api_url,omitempty" json:"telegram_api_url,omitempty"`
TelegramBotToken commoncfg.Secret `yaml:"telegram_bot_token,omitempty" json:"telegram_bot_token,omitempty"`
TelegramBotTokenFile string `yaml:"telegram_bot_token_file,omitempty" json:"telegram_bot_token_file,omitempty"`
WebexAPIURL *amcommoncfg.URL `yaml:"webex_api_url,omitempty" json:"webex_api_url,omitempty"`
RocketchatAPIURL *amcommoncfg.URL `yaml:"rocketchat_api_url,omitempty" json:"rocketchat_api_url,omitempty"`
RocketchatToken *commoncfg.Secret `yaml:"rocketchat_token,omitempty" json:"rocketchat_token,omitempty"`
RocketchatTokenFile string `yaml:"rocketchat_token_file,omitempty" json:"rocketchat_token_file,omitempty"`
RocketchatTokenID *commoncfg.Secret `yaml:"rocketchat_token_id,omitempty" json:"rocketchat_token_id,omitempty"`
RocketchatTokenIDFile string `yaml:"rocketchat_token_id_file,omitempty" json:"rocketchat_token_id_file,omitempty"`
MattermostWebhookURL *amcommoncfg.SecretURL `yaml:"mattermost_webhook_url,omitempty" json:"mattermost_webhook_url,omitempty"`
MattermostWebhookURLFile string `yaml:"mattermost_webhook_url_file,omitempty" json:"mattermost_webhook_url_file,omitempty"`
}
GlobalConfig defines configuration parameters that are valid globally unless overwritten.
func DefaultGlobalConfig ¶
func DefaultGlobalConfig() GlobalConfig
DefaultGlobalConfig returns GlobalConfig with default values.
func (*GlobalConfig) UnmarshalYAML ¶
func (c *GlobalConfig) UnmarshalYAML(unmarshal func(any) error) error
UnmarshalYAML implements the yaml.Unmarshaler interface for GlobalConfig.
type HostPort ¶ added in v0.19.0
HostPort represents a "host:port" network address.
func (HostPort) MarshalJSON ¶ added in v0.19.0
MarshalJSON implements the json.Marshaler interface for HostPort.
func (HostPort) MarshalYAML ¶ added in v0.19.0
MarshalYAML implements the yaml.Marshaler interface for HostPort.
func (*HostPort) UnmarshalJSON ¶ added in v0.20.0
UnmarshalJSON implements the json.Unmarshaler interface for HostPort.
type MSTeamsV2Config ¶ added in v0.28.0
type MSTeamsV2Config struct {
amcommoncfg.NotifierConfig `yaml:",inline" json:",inline"`
HTTPConfig *commoncfg.HTTPClientConfig `yaml:"http_config,omitempty" json:"http_config,omitempty"`
WebhookURL *amcommoncfg.SecretURL `yaml:"webhook_url,omitempty" json:"webhook_url,omitempty"`
WebhookURLFile string `yaml:"webhook_url_file,omitempty" json:"webhook_url_file,omitempty"`
Title string `yaml:"title,omitempty" json:"title,omitempty"`
Text string `yaml:"text,omitempty" json:"text,omitempty"`
}
func (*MSTeamsV2Config) UnmarshalYAML ¶ added in v0.28.0
func (c *MSTeamsV2Config) UnmarshalYAML(unmarshal func(any) error) error
type MuteTimeInterval ¶ added in v0.22.0
type MuteTimeInterval struct {
Name string `yaml:"name" json:"name"`
TimeIntervals []timeinterval.TimeInterval `yaml:"time_intervals" json:"time_intervals"`
}
MuteTimeInterval represents a named set of time intervals for which a route should be muted.
func (*MuteTimeInterval) UnmarshalYAML ¶ added in v0.22.0
func (mt *MuteTimeInterval) UnmarshalYAML(unmarshal func(any) error) error
UnmarshalYAML implements the yaml.Unmarshaler interface for MuteTimeInterval.
type OpsGenieConfig ¶
type OpsGenieConfig struct {
amcommoncfg.NotifierConfig `yaml:",inline" json:",inline"`
HTTPConfig *commoncfg.HTTPClientConfig `yaml:"http_config,omitempty" json:"http_config,omitempty"`
APIKey commoncfg.Secret `yaml:"api_key,omitempty" json:"api_key,omitempty"`
APIKeyFile string `yaml:"api_key_file,omitempty" json:"api_key_file,omitempty"`
APIURL *amcommoncfg.URL `yaml:"api_url,omitempty" json:"api_url,omitempty"`
Message string `yaml:"message,omitempty" json:"message,omitempty"`
Description string `yaml:"description,omitempty" json:"description,omitempty"`
Source string `yaml:"source,omitempty" json:"source,omitempty"`
Details map[string]string `yaml:"details,omitempty" json:"details,omitempty"`
Entity string `yaml:"entity,omitempty" json:"entity,omitempty"`
Responders []OpsGenieConfigResponder `yaml:"responders,omitempty" json:"responders,omitempty"`
Actions string `yaml:"actions,omitempty" json:"actions,omitempty"`
Tags string `yaml:"tags,omitempty" json:"tags,omitempty"`
Note string `yaml:"note,omitempty" json:"note,omitempty"`
Priority string `yaml:"priority,omitempty" json:"priority,omitempty"`
UpdateAlerts bool `yaml:"update_alerts,omitempty" json:"update_alerts,omitempty"`
}
OpsGenieConfig configures notifications via OpsGenie.
func (*OpsGenieConfig) UnmarshalYAML ¶
func (c *OpsGenieConfig) UnmarshalYAML(unmarshal func(any) error) error
UnmarshalYAML implements the yaml.Unmarshaler interface.
type OpsGenieConfigResponder ¶ added in v0.18.0
type OpsGenieConfigResponder struct {
// One of those 3 should be filled.
ID string `yaml:"id,omitempty" json:"id,omitempty"`
Name string `yaml:"name,omitempty" json:"name,omitempty"`
Username string `yaml:"username,omitempty" json:"username,omitempty"`
// team, user, escalation, schedule etc.
Type string `yaml:"type,omitempty" json:"type,omitempty"`
}
type PagerdutyConfig ¶
type PagerdutyConfig struct {
amcommoncfg.NotifierConfig `yaml:",inline" json:",inline"`
HTTPConfig *commoncfg.HTTPClientConfig `yaml:"http_config,omitempty" json:"http_config,omitempty"`
ServiceKey commoncfg.Secret `yaml:"service_key,omitempty" json:"service_key,omitempty"`
ServiceKeyFile string `yaml:"service_key_file,omitempty" json:"service_key_file,omitempty"`
RoutingKey commoncfg.Secret `yaml:"routing_key,omitempty" json:"routing_key,omitempty"`
RoutingKeyFile string `yaml:"routing_key_file,omitempty" json:"routing_key_file,omitempty"`
URL *amcommoncfg.URL `yaml:"url,omitempty" json:"url,omitempty"`
Client string `yaml:"client,omitempty" json:"client,omitempty"`
ClientURL string `yaml:"client_url,omitempty" json:"client_url,omitempty"`
Description string `yaml:"description,omitempty" json:"description,omitempty"`
Details map[string]any `yaml:"details,omitempty" json:"details,omitempty"`
Images []PagerdutyImage `yaml:"images,omitempty" json:"images,omitempty"`
Links []PagerdutyLink `yaml:"links,omitempty" json:"links,omitempty"`
Source string `yaml:"source,omitempty" json:"source,omitempty"`
Severity string `yaml:"severity,omitempty" json:"severity,omitempty"`
Class string `yaml:"class,omitempty" json:"class,omitempty"`
Component string `yaml:"component,omitempty" json:"component,omitempty"`
Group string `yaml:"group,omitempty" json:"group,omitempty"`
// Timeout is the maximum time allowed to invoke the pagerduty. Setting this to 0
// does not impose a timeout.
Timeout time.Duration `yaml:"timeout" json:"timeout"`
}
PagerdutyConfig configures notifications via PagerDuty.
func (*PagerdutyConfig) UnmarshalYAML ¶
func (c *PagerdutyConfig) UnmarshalYAML(unmarshal func(any) error) error
UnmarshalYAML implements the yaml.Unmarshaler interface.
type PagerdutyImage ¶ added in v0.16.0
type PagerdutyImage struct {
Src string `yaml:"src,omitempty" json:"src,omitempty"`
Alt string `yaml:"alt,omitempty" json:"alt,omitempty"`
Href string `yaml:"href,omitempty" json:"href,omitempty"`
}
PagerdutyImage is an image.
type PagerdutyLink ¶ added in v0.16.0
type PagerdutyLink struct {
Href string `yaml:"href,omitempty" json:"href,omitempty"`
Text string `yaml:"text,omitempty" json:"text,omitempty"`
}
PagerdutyLink is a link.
type PushoverConfig ¶
type PushoverConfig struct {
amcommoncfg.NotifierConfig `yaml:",inline" json:",inline"`
HTTPConfig *commoncfg.HTTPClientConfig `yaml:"http_config,omitempty" json:"http_config,omitempty"`
UserKey commoncfg.Secret `yaml:"user_key,omitempty" json:"user_key,omitempty"`
UserKeyFile string `yaml:"user_key_file,omitempty" json:"user_key_file,omitempty"`
Token commoncfg.Secret `yaml:"token,omitempty" json:"token,omitempty"`
TokenFile string `yaml:"token_file,omitempty" json:"token_file,omitempty"`
Title string `yaml:"title,omitempty" json:"title,omitempty"`
Message string `yaml:"message,omitempty" json:"message,omitempty"`
URL string `yaml:"url,omitempty" json:"url,omitempty"`
URLTitle string `yaml:"url_title,omitempty" json:"url_title,omitempty"`
Device string `yaml:"device,omitempty" json:"device,omitempty"`
Sound string `yaml:"sound,omitempty" json:"sound,omitempty"`
Priority string `yaml:"priority,omitempty" json:"priority,omitempty"`
Retry duration `yaml:"retry,omitempty" json:"retry,omitempty"`
Expire duration `yaml:"expire,omitempty" json:"expire,omitempty"`
TTL duration `yaml:"ttl,omitempty" json:"ttl,omitempty"`
HTML bool `yaml:"html,omitempty" json:"html,omitempty"`
Monospace bool `yaml:"monospace,omitempty" json:"monospace,omitempty"`
}
func (*PushoverConfig) UnmarshalYAML ¶
func (c *PushoverConfig) UnmarshalYAML(unmarshal func(any) error) error
UnmarshalYAML implements the yaml.Unmarshaler interface.
type Receiver ¶
type Receiver struct {
// A unique identifier for this receiver.
Name string `yaml:"name" json:"name"`
// Labels attached to this receiver for querying and filtering.
Labels map[string]string `yaml:"labels,omitempty" json:"labels,omitempty"`
DiscordConfigs []*discord.DiscordConfig `yaml:"discord_configs,omitempty" json:"discord_configs,omitempty"`
EmailConfigs []*EmailConfig `yaml:"email_configs,omitempty" json:"email_configs,omitempty"`
IncidentioConfigs []*incidentio.IncidentioConfig `yaml:"incidentio_configs,omitempty" json:"incidentio_configs,omitempty"`
PagerdutyConfigs []*PagerdutyConfig `yaml:"pagerduty_configs,omitempty" json:"pagerduty_configs,omitempty"`
SlackConfigs []*SlackConfig `yaml:"slack_configs,omitempty" json:"slack_configs,omitempty"`
WebhookConfigs []*webhook.WebhookConfig `yaml:"webhook_configs,omitempty" json:"webhook_configs,omitempty"`
OpsGenieConfigs []*OpsGenieConfig `yaml:"opsgenie_configs,omitempty" json:"opsgenie_configs,omitempty"`
WechatConfigs []*WechatConfig `yaml:"wechat_configs,omitempty" json:"wechat_configs,omitempty"`
PushoverConfigs []*PushoverConfig `yaml:"pushover_configs,omitempty" json:"pushover_configs,omitempty"`
VictorOpsConfigs []*VictorOpsConfig `yaml:"victorops_configs,omitempty" json:"victorops_configs,omitempty"`
SNSConfigs []*SNSConfig `yaml:"sns_configs,omitempty" json:"sns_configs,omitempty"`
TelegramConfigs []*TelegramConfig `yaml:"telegram_configs,omitempty" json:"telegram_configs,omitempty"`
WebexConfigs []*WebexConfig `yaml:"webex_configs,omitempty" json:"webex_configs,omitempty"`
MSTeamsConfigs []*msteams.MSTeamsConfig `yaml:"msteams_configs,omitempty" json:"msteams_configs,omitempty"`
MSTeamsV2Configs []*MSTeamsV2Config `yaml:"msteamsv2_configs,omitempty" json:"msteamsv2_configs,omitempty"`
JiraConfigs []*jira.JiraConfig `yaml:"jira_configs,omitempty" json:"jira_configs,omitempty"`
RocketchatConfigs []*RocketchatConfig `yaml:"rocketchat_configs,omitempty" json:"rocketchat_configs,omitempty"`
MattermostConfigs []*mattermost.MattermostConfig `yaml:"mattermost_configs,omitempty" json:"mattermost_configs,omitempty"`
}
Receiver configuration provides configuration on how to contact a receiver.
type RocketchatAttachmentAction ¶ added in v0.28.0
type RocketchatAttachmentAction struct {
Type string `json:"type,omitempty"`
Text string `json:"text,omitempty"`
URL string `json:"url,omitempty"`
ImageURL string `json:"image_url,omitempty"`
IsWebView bool `json:"is_webview"`
WebviewHeightRatio string `json:"webview_height_ratio,omitempty"`
Msg string `json:"msg,omitempty"`
MsgInChatWindow bool `json:"msg_in_chat_window"`
MsgProcessingType