Set consul server default to localhost:8500 (#3703)

This commit is contained in:
zemek 2018-01-24 04:14:32 -08:00 committed by Brian Brazil
parent 09e460a647
commit 8a01a0fbed
2 changed files with 4 additions and 3 deletions

View file

@ -82,12 +82,13 @@ var (
DefaultSDConfig = SDConfig{ DefaultSDConfig = SDConfig{
TagSeparator: ",", TagSeparator: ",",
Scheme: "http", Scheme: "http",
Server: "localhost:8500",
} }
) )
// SDConfig is the configuration for Consul service discovery. // SDConfig is the configuration for Consul service discovery.
type SDConfig struct { type SDConfig struct {
Server string `yaml:"server"` Server string `yaml:"server,omitempty"`
Token config_util.Secret `yaml:"token,omitempty"` Token config_util.Secret `yaml:"token,omitempty"`
Datacenter string `yaml:"datacenter,omitempty"` Datacenter string `yaml:"datacenter,omitempty"`
TagSeparator string `yaml:"tag_separator,omitempty"` TagSeparator string `yaml:"tag_separator,omitempty"`

View file

@ -305,10 +305,10 @@ The following meta labels are available on targets during [relabeling](#relabel_
```yaml ```yaml
# The information to access the Consul API. It is to be defined # The information to access the Consul API. It is to be defined
# as the Consul documentation requires. # as the Consul documentation requires.
server: <host> [ server: <host> | default = "localhost:8500" ]
[ token: <secret> ] [ token: <secret> ]
[ datacenter: <string> ] [ datacenter: <string> ]
[ scheme: <string> | default = "http"] [ scheme: <string> | default = "http" ]
[ username: <string> ] [ username: <string> ]
[ password: <secret> ] [ password: <secret> ]