mirror of https://github.com/status-im/consul.git
Merge branch 'master' of github.com:hashicorp/consul
This commit is contained in:
commit
f523469529
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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 + `"`
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
source "https://rubygems.org"
|
||||
|
||||
gem "middleman-hashicorp", "0.3.41"
|
||||
gem "middleman-hashicorp", "0.3.43"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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'."
|
||||
|
||||
* <a name="acl"></a><a href="#acl">`acl`</a> - 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
|
||||
|
|
Loading…
Reference in New Issue