diff --git a/README.md b/README.md index 4d0ba82747..e01187b16c 100644 --- a/README.md +++ b/README.md @@ -41,13 +41,13 @@ contacting us at security@hashicorp.com. A few quick start guides are available on the Consul website: -* **Standalone binary install:** https://www.consul.io/intro/getting-started/install +* **Standalone binary install:** https://learn.hashicorp.com/consul/getting-started/install.html * **Kubernetes install:** https://learn.hashicorp.com/consul/kubernetes/kubernetes-deployment-guide * **Minikube install:** https://learn.hashicorp.com/consul/kubernetes/minikube ## Documentation -Full, comprehensive documentation is viewable on the Consul website: +Full, comprehensive documentation is available on the Consul website: https://www.consul.io/docs diff --git a/agent/consul/server.go b/agent/consul/server.go index 4b592ac944..579eedab45 100644 --- a/agent/consul/server.go +++ b/agent/consul/server.go @@ -543,7 +543,7 @@ func NewServerLogger(config *Config, logger hclog.InterceptLogger, tokens *token } // Start the metrics handlers. - go s.sessionStats() + go s.updateMetrics() return s, nil } diff --git a/agent/consul/session_ttl.go b/agent/consul/session_ttl.go index 94c6409ce9..4afdc0e382 100644 --- a/agent/consul/session_ttl.go +++ b/agent/consul/session_ttl.go @@ -130,14 +130,16 @@ func (s *Server) clearAllSessionTimers() { s.sessionTimers.StopAll() } -// sessionStats is a long running routine used to capture -// the number of active sessions being tracked -func (s *Server) sessionStats() { +// updateMetrics is a long running routine used to uddate a +// number of server periodic metrics +func (s *Server) updateMetrics() { for { select { - case <-time.After(5 * time.Second): + case <-time.After(time.Second): metrics.SetGauge([]string{"session_ttl", "active"}, float32(s.sessionTimers.Len())) + metrics.SetGauge([]string{"raft", "applied_index"}, float32(s.raft.AppliedIndex())) + metrics.SetGauge([]string{"raft", "last_index"}, float32(s.raft.LastIndex())) case <-s.shutdownCh: return } diff --git a/agent/testagent.go b/agent/testagent.go index c02fb6991c..65ba6008fc 100644 --- a/agent/testagent.go +++ b/agent/testagent.go @@ -149,6 +149,10 @@ func (a *TestAgent) Start() (err error) { if err != nil { return fmt.Errorf("Error creating data dir %s: %s", filepath.Join(TempDir, name), err) } + // Convert windows style path to posix style path + // to avoid illegal char escape error when hcl + // parsing. + d = filepath.ToSlash(d) hclDataDir = `data_dir = "` + d + `"` } diff --git a/command/monitor/monitor.go b/command/monitor/monitor.go index 655a7d3ddf..a9aa06e09f 100644 --- a/command/monitor/monitor.go +++ b/command/monitor/monitor.go @@ -64,6 +64,10 @@ func (c *cmd) Run(args []string) int { eventDoneCh := make(chan struct{}) if c.logJSON { logCh, err = client.Agent().MonitorJSON(c.logLevel, eventDoneCh, nil) + if err != nil { + c.UI.Error(fmt.Sprintf("Error starting JSON monitor: %s", err)) + return 1 + } } logCh, err = client.Agent().Monitor(c.logLevel, eventDoneCh, nil) if err != nil { diff --git a/website/Gemfile b/website/Gemfile index 928dcea377..f4cbda7f21 100644 --- a/website/Gemfile +++ b/website/Gemfile @@ -1,3 +1,3 @@ source "https://rubygems.org" -gem "middleman-hashicorp", "0.3.41" +gem "middleman-hashicorp", "0.3.43" diff --git a/website/Gemfile.lock b/website/Gemfile.lock index c45dc4ea6a..f64934d194 100644 --- a/website/Gemfile.lock +++ b/website/Gemfile.lock @@ -6,12 +6,12 @@ GEM minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - autoprefixer-rails (9.6.1) + autoprefixer-rails (9.7.4) execjs bootstrap-sass (3.4.1) autoprefixer-rails (>= 5.2.1) sassc (>= 2.0.0) - builder (3.2.3) + builder (3.2.4) capybara (2.4.4) mime-types (>= 1.16) nokogiri (>= 1.3.3) @@ -41,7 +41,7 @@ GEM erubis (2.7.0) eventmachine (1.2.7) execjs (2.7.0) - ffi (1.11.1) + ffi (1.12.2) haml (5.1.2) temple (>= 0.8.0) tilt @@ -50,7 +50,7 @@ GEM uber (~> 0.0.14) http_parser.rb (0.6.0) i18n (0.7.0) - json (2.1.0) + json (2.3.0) kramdown (1.17.0) listen (3.0.8) rb-fsevent (~> 0.9, >= 0.9.4) @@ -78,7 +78,7 @@ GEM rack (>= 1.4.5, < 2.0) thor (>= 0.15.2, < 2.0) tilt (~> 1.4.1, < 2.0) - middleman-hashicorp (0.3.41) + middleman-hashicorp (0.3.43) bootstrap-sass (~> 3.3) builder (~> 3.2) middleman (~> 3.4) @@ -98,13 +98,13 @@ GEM middleman-syntax (3.2.0) middleman-core (>= 3.2) rouge (~> 3.2) - mime-types (3.2.2) + mime-types (3.3.1) mime-types-data (~> 3.2015) - mime-types-data (3.2019.0331) + mime-types-data (3.2019.1009) mini_portile2 (2.4.0) - minitest (5.11.3) - multi_json (1.13.1) - nokogiri (1.10.4) + minitest (5.14.0) + multi_json (1.14.1) + nokogiri (1.10.7) mini_portile2 (~> 2.4.0) padrino-helpers (0.12.9) i18n (~> 0.6, >= 0.6.7) @@ -112,18 +112,18 @@ GEM tilt (>= 1.4.1, < 3) padrino-support (0.12.9) activesupport (>= 3.1) - rack (1.6.11) + rack (1.6.12) rack-livereload (0.3.17) rack rack-test (1.1.0) rack (>= 1.0, < 3) rb-fsevent (0.10.3) - rb-inotify (0.10.0) + rb-inotify (0.10.1) ffi (~> 1.0) redcarpet (3.5.0) - rouge (3.9.0) + rouge (3.15.0) sass (3.4.25) - sassc (2.1.0-x86_64-linux) + sassc (2.2.1) ffi (~> 1.9) sprockets (2.12.5) hike (~> 1.2) @@ -135,14 +135,14 @@ GEM sprockets-sass (1.3.1) sprockets (~> 2.0) tilt (~> 1.1) - temple (0.8.1) - thor (0.20.3) + temple (0.8.2) + thor (1.0.1) thread_safe (0.3.6) tilt (1.4.1) - turbolinks (5.2.0) + turbolinks (5.2.1) turbolinks-source (~> 5.2) turbolinks-source (5.2.0) - tzinfo (1.2.5) + tzinfo (1.2.6) thread_safe (~> 0.1) uber (0.0.15) uglifier (2.7.2) @@ -155,7 +155,7 @@ PLATFORMS ruby DEPENDENCIES - middleman-hashicorp (= 0.3.41) + middleman-hashicorp (= 0.3.43) BUNDLED WITH 1.17.3 diff --git a/website/Makefile b/website/Makefile index 9eb38205d5..f9f6310cd8 100644 --- a/website/Makefile +++ b/website/Makefile @@ -1,4 +1,4 @@ -VERSION?="0.3.41" +VERSION?="0.3.43" # The volume mounting steps are a way to exclude all the consul docs from being built # in the Consul site build process while still including the index.html page that points diff --git a/website/source/api/session.html.md b/website/source/api/session.html.md index a8ae034eaf..47ca8f95e6 100644 --- a/website/source/api/session.html.md +++ b/website/source/api/session.html.md @@ -209,7 +209,7 @@ $ curl \ ] ``` -If the session does not exist, `null` is returned instead of a JSON list. +If the session does not exist, an empty JSON list `[]` is returned. ## List Sessions for Node diff --git a/website/source/docs/acl/acl-rules.html.md.erb b/website/source/docs/acl/acl-rules.html.md.erb index bf73392703..b941ab1765 100644 --- a/website/source/docs/acl/acl-rules.html.md.erb +++ b/website/source/docs/acl/acl-rules.html.md.erb @@ -539,6 +539,7 @@ In addition to ACLs, in Consul 0.9.0 and later, the agent must be configured wit [`enable_local_script_checks`](/docs/agent/options.html#_enable_local_script_checks) set to `true` in order to enable script checks. +-> Note: [Intention privileges](/docs/connect/intentions.html#intention-management-permissions) are managed with service rules. #### Session Rules diff --git a/website/source/docs/agent/options.html.md b/website/source/docs/agent/options.html.md index 74c90b94e0..61859bebec 100644 --- a/website/source/docs/agent/options.html.md +++ b/website/source/docs/agent/options.html.md @@ -565,6 +565,12 @@ default will automatically work with some tooling. #### Configuration Key Reference +-> **Note:** All the TTL values described below are parsed by Go's `time` package, and have the following +[formatting specification](https://golang.org/pkg/time/#ParseDuration): "A +duration string is a possibly signed sequence of decimal numbers, each with +optional fraction and a unit suffix, such as '300ms', '-1.5h' or '2h45m'. +Valid time units are 'ns', 'us' (or 'µs'), 'ms', 's', 'm', 'h'." + * `acl` - This object allows a number of sub-keys to be set which controls the ACL system. Configuring the ACL system within the ACL stanza was added in Consul 1.4.0