Skip to content

Commit

Permalink
Merge pull request #199 from prometheus/sendres
Browse files Browse the repository at this point in the history
Correctly parse send_resolved config field
  • Loading branch information
fabxc committed Dec 23, 2015
2 parents e0f67db + d21d29e commit 9c33650
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
10 changes: 5 additions & 5 deletions config/notifiers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down Expand Up @@ -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"`
Expand Down Expand Up @@ -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"`

Expand Down Expand Up @@ -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"`
Expand All @@ -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"`
Expand Down
1 change: 1 addition & 0 deletions test/acceptance/send_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ receivers:
- name: "default"
webhook_configs:
- url: 'http://%s'
send_resolved: true
`

at := NewAcceptanceTest(t, &AcceptanceOpts{
Expand Down

0 comments on commit 9c33650

Please sign in to comment.