config: fix naming and typo

This commit is contained in:
Fabian Reinartz 2016-11-25 11:04:33 +01:00
parent fd51ab46e5
commit cc35104504

View file

@ -87,8 +87,8 @@ var (
HonorLabels: false, HonorLabels: false,
} }
// DefaultAlertmanagersConfig is the default alertmanager configuration. // DefaultAlertmanagerConfig is the default alertmanager configuration.
DefaultAlertmanagersConfig = AlertmanagerConfig{ DefaultAlertmanagerConfig = AlertmanagerConfig{
Scheme: "http", Scheme: "http",
Timeout: 10 * time.Second, Timeout: 10 * time.Second,
} }
@ -548,7 +548,7 @@ func (c *ScrapeConfig) UnmarshalYAML(unmarshal func(interface{}) error) error {
return nil return nil
} }
// AlertingConfig configures alerting and alertmanager related configs // AlertingConfig configures alerting and alertmanager related configs.
type AlertingConfig struct { type AlertingConfig struct {
AlertRelabelConfigs []*RelabelConfig `yaml:"alert_relabel_configs,omitempty"` AlertRelabelConfigs []*RelabelConfig `yaml:"alert_relabel_configs,omitempty"`
AlertmanagerConfigs []*AlertmanagerConfig `yaml:"alertmanagers,omitempty"` AlertmanagerConfigs []*AlertmanagerConfig `yaml:"alertmanagers,omitempty"`
@ -596,7 +596,7 @@ type AlertmanagerConfig struct {
// UnmarshalYAML implements the yaml.Unmarshaler interface. // UnmarshalYAML implements the yaml.Unmarshaler interface.
func (c *AlertmanagerConfig) UnmarshalYAML(unmarshal func(interface{}) error) error { func (c *AlertmanagerConfig) UnmarshalYAML(unmarshal func(interface{}) error) error {
*c = DefaultAlertmanagersConfig *c = DefaultAlertmanagerConfig
type plain AlertmanagerConfig type plain AlertmanagerConfig
if err := unmarshal((*plain)(c)); err != nil { if err := unmarshal((*plain)(c)); err != nil {
return err return err