From 8a01a0fbeda8637c3499906c9a4c4725112ccb85 Mon Sep 17 00:00:00 2001 From: zemek Date: Wed, 24 Jan 2018 04:14:32 -0800 Subject: [PATCH] Set consul server default to localhost:8500 (#3703) --- discovery/consul/consul.go | 3 ++- docs/configuration/configuration.md | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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: ]