diff --git a/config/notifiers.go b/config/notifiers.go index 48a8c6323e..fa238521a4 100644 --- a/config/notifiers.go +++ b/config/notifiers.go @@ -89,7 +89,7 @@ func (nc *NotifierConfig) SendResolved() bool { // EmailConfig configures notifications via mail. type EmailConfig struct { - NotifierConfig + NotifierConfig `yaml:",inline"` // Email address to notify. To string `yaml:"to"` @@ -128,7 +128,7 @@ func (c *EmailConfig) UnmarshalYAML(unmarshal func(interface{}) error) error { // PagerdutyConfig configures notifications via PagerDuty. type PagerdutyConfig struct { - NotifierConfig + NotifierConfig `yaml:",inline"` ServiceKey Secret `yaml:"service_key"` URL string `yaml:"url"` @@ -156,7 +156,7 @@ func (c *PagerdutyConfig) UnmarshalYAML(unmarshal func(interface{}) error) error // SlackConfig configures notifications via Slack. type SlackConfig struct { - NotifierConfig + NotifierConfig `yaml:",inline"` APIURL Secret `yaml:"api_url"` @@ -190,7 +190,7 @@ func (c *SlackConfig) UnmarshalYAML(unmarshal func(interface{}) error) error { // WebhookConfig configures notifications via a generic webhook. type WebhookConfig struct { - NotifierConfig + NotifierConfig `yaml:",inline"` // URL to send POST request to. URL string `yaml:"url"` @@ -214,7 +214,7 @@ func (c *WebhookConfig) UnmarshalYAML(unmarshal func(interface{}) error) error { // OpsGenieConfig configures notifications via OpsGenie. type OpsGenieConfig struct { - NotifierConfig + NotifierConfig `yaml:",inline"` APIKey Secret `yaml:"api_key"` APIHost string `yaml:"api_host"` diff --git a/test/acceptance/send_test.go b/test/acceptance/send_test.go index 8da7287fc0..3523c604de 100644 --- a/test/acceptance/send_test.go +++ b/test/acceptance/send_test.go @@ -42,6 +42,7 @@ receivers: - name: "default" webhook_configs: - url: 'http://%s' + send_resolved: true ` at := NewAcceptanceTest(t, &AcceptanceOpts{