mirror of
https://github.com/prometheus/prometheus.git
synced 2025-01-14 07:17:52 -08:00
Merge pull request #838 from prometheus/fabxc/consulcfg
config: add omitempty for consul SD config.
This commit is contained in:
commit
3fcd26b328
|
@ -389,12 +389,12 @@ func (c *FileSDConfig) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||||
// ConsulSDConfig is the configuration for Consul service discovery.
|
// ConsulSDConfig is the configuration for Consul service discovery.
|
||||||
type ConsulSDConfig struct {
|
type ConsulSDConfig struct {
|
||||||
Server string `yaml:"server"`
|
Server string `yaml:"server"`
|
||||||
Token string `yaml:"token"`
|
Token string `yaml:"token,omitempty"`
|
||||||
Datacenter string `yaml:"datacenter"`
|
Datacenter string `yaml:"datacenter,omitempty"`
|
||||||
TagSeparator string `yaml:"tag_separator"`
|
TagSeparator string `yaml:"tag_separator,omitempty"`
|
||||||
Scheme string `yaml:"scheme"`
|
Scheme string `yaml:"scheme,omitempty"`
|
||||||
Username string `yaml:"username"`
|
Username string `yaml:"username,omitempty"`
|
||||||
Password string `yaml:"password"`
|
Password string `yaml:"password,omitempty"`
|
||||||
// The list of services for which targets are discovered.
|
// The list of services for which targets are discovered.
|
||||||
Services []string `yaml:"services"`
|
Services []string `yaml:"services"`
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue