diff --git a/discovery/consul/consul.go b/discovery/consul/consul.go index af13efa550..de6e4ba6dc 100644 --- a/discovery/consul/consul.go +++ b/discovery/consul/consul.go @@ -82,12 +82,13 @@ var ( DefaultSDConfig = SDConfig{ TagSeparator: ",", Scheme: "http", + Server: "localhost:8500", } ) // SDConfig is the configuration for Consul service discovery. type SDConfig struct { - Server string `yaml:"server"` + Server string `yaml:"server,omitempty"` Token config_util.Secret `yaml:"token,omitempty"` Datacenter string `yaml:"datacenter,omitempty"` TagSeparator string `yaml:"tag_separator,omitempty"` diff --git a/docs/configuration/configuration.md b/docs/configuration/configuration.md index cd03f19d83..6258f238bb 100644 --- a/docs/configuration/configuration.md +++ b/docs/configuration/configuration.md @@ -305,10 +305,10 @@ The following meta labels are available on targets during [relabeling](#relabel_ ```yaml # The information to access the Consul API. It is to be defined # as the Consul documentation requires. -server: +[ server: | default = "localhost:8500" ] [ token: ] [ datacenter: ] -[ scheme: | default = "http"] +[ scheme: | default = "http" ] [ username: ] [ password: ]