mirror of
https://github.com/prometheus/alertmanager
synced 2025-04-11 03:31:55 +00:00
Merge pull request #199 from prometheus/sendres
Correctly parse send_resolved config field
This commit is contained in:
commit
9c33650920
@ -89,7 +89,7 @@ func (nc *NotifierConfig) SendResolved() bool {
|
|||||||
|
|
||||||
// EmailConfig configures notifications via mail.
|
// EmailConfig configures notifications via mail.
|
||||||
type EmailConfig struct {
|
type EmailConfig struct {
|
||||||
NotifierConfig
|
NotifierConfig `yaml:",inline"`
|
||||||
|
|
||||||
// Email address to notify.
|
// Email address to notify.
|
||||||
To string `yaml:"to"`
|
To string `yaml:"to"`
|
||||||
@ -128,7 +128,7 @@ func (c *EmailConfig) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
|||||||
|
|
||||||
// PagerdutyConfig configures notifications via PagerDuty.
|
// PagerdutyConfig configures notifications via PagerDuty.
|
||||||
type PagerdutyConfig struct {
|
type PagerdutyConfig struct {
|
||||||
NotifierConfig
|
NotifierConfig `yaml:",inline"`
|
||||||
|
|
||||||
ServiceKey Secret `yaml:"service_key"`
|
ServiceKey Secret `yaml:"service_key"`
|
||||||
URL string `yaml:"url"`
|
URL string `yaml:"url"`
|
||||||
@ -156,7 +156,7 @@ func (c *PagerdutyConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
|
|||||||
|
|
||||||
// SlackConfig configures notifications via Slack.
|
// SlackConfig configures notifications via Slack.
|
||||||
type SlackConfig struct {
|
type SlackConfig struct {
|
||||||
NotifierConfig
|
NotifierConfig `yaml:",inline"`
|
||||||
|
|
||||||
APIURL Secret `yaml:"api_url"`
|
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.
|
// WebhookConfig configures notifications via a generic webhook.
|
||||||
type WebhookConfig struct {
|
type WebhookConfig struct {
|
||||||
NotifierConfig
|
NotifierConfig `yaml:",inline"`
|
||||||
|
|
||||||
// URL to send POST request to.
|
// URL to send POST request to.
|
||||||
URL string `yaml:"url"`
|
URL string `yaml:"url"`
|
||||||
@ -214,7 +214,7 @@ func (c *WebhookConfig) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
|||||||
|
|
||||||
// OpsGenieConfig configures notifications via OpsGenie.
|
// OpsGenieConfig configures notifications via OpsGenie.
|
||||||
type OpsGenieConfig struct {
|
type OpsGenieConfig struct {
|
||||||
NotifierConfig
|
NotifierConfig `yaml:",inline"`
|
||||||
|
|
||||||
APIKey Secret `yaml:"api_key"`
|
APIKey Secret `yaml:"api_key"`
|
||||||
APIHost string `yaml:"api_host"`
|
APIHost string `yaml:"api_host"`
|
||||||
|
@ -42,6 +42,7 @@ receivers:
|
|||||||
- name: "default"
|
- name: "default"
|
||||||
webhook_configs:
|
webhook_configs:
|
||||||
- url: 'http://%s'
|
- url: 'http://%s'
|
||||||
|
send_resolved: true
|
||||||
`
|
`
|
||||||
|
|
||||||
at := NewAcceptanceTest(t, &AcceptanceOpts{
|
at := NewAcceptanceTest(t, &AcceptanceOpts{
|
||||||
|
Loading…
Reference in New Issue
Block a user