Commit Graph

13 Commits (34d01e62547652f912aea3dba52a44e648dfa63f)

Author SHA1 Message Date
Jack Pearkes 8c684db488 New command: consul debug (#4754)
* agent/debug: add package for debugging, host info

* api: add v1/agent/host endpoint

* agent: add v1/agent/host endpoint

* command/debug: implementation of static capture

* command/debug: tests and only configured targets

* agent/debug: add basic test for host metrics

* command/debug: add methods for dynamic data capture

* api: add debug/pprof endpoints

* command/debug: add pprof

* command/debug: timing, wg, logs to disk

* vendor: add gopsutil/disk

* command/debug: add a usage section

* website: add docs for consul debug

* agent/host: require operator:read

* api/host: improve docs and no retry timing

* command/debug: fail on extra arguments

* command/debug: fixup file permissions to 0644

* command/debug: remove server flags

* command/debug: improve clarity of usage section

* api/debug: add Trace for profiling, fix profile

* command/debug: capture profile and trace at the same time

* command/debug: add index document

* command/debug: use "clusters" in place of members

* command/debug: remove address in output

* command/debug: improve comment on metrics sleep

* command/debug: clarify usage

* agent: always register pprof handlers and protect

This will allow us to avoid a restart of a target agent
for profiling by always registering the pprof handlers.

Given this is a potentially sensitive path, it is protected
with an operator:read ACL and enable debug being
set to true on the target agent. enable_debug still requires
a restart.

If ACLs are disabled, enable_debug is sufficient.

* command/debug: use trace.out instead of .prof

More in line with golang docs.

* agent: fix comment wording

* agent: wrap table driven tests in t.run()
2018-10-19 08:41:03 -07:00
Frank Schroeder 7b675f2710 vendor: drop unused dependencies 2017-07-15 14:35:20 -07:00
Frank Schroeder 4403db0d63
vendor: Update github.com/shirou/gopsutil
Pull in fix for data race on host.BootTime.
2017-06-02 07:51:08 +02:00
Sean Chittenden 7d9c9881fc
Update `shirou/gopsutil/313` to pull in lowercased `HostID`s. 2017-02-06 16:27:56 -08:00
Sean Chittenden f228812746
Update github.com/shiriou/gopsutil's `vendor.json` entries.
Direct to `master` commit now that
https://github.com/shirou/gopsutil/pull/312 has been merged.
2017-02-03 22:31:51 -08:00
Sean Chittenden abceea206d
Chase an upstream `go fmt` that has been long overdue. 2017-02-03 22:31:11 -08:00
Sean Chittenden 95a8ee35d6
Remove _test.go files from shirou/gopsutil 2017-02-03 22:29:02 -08:00
Sean Chittenden ee8705f549
Add durable HostID generation for Windows.
https://github.com/shirou/gopsutil/pull/312
2017-02-02 16:11:54 -08:00
Sean Chittenden 1e5534a27a
Add missing shirou/gopsutils vendor dependencies and files that were reverted 2017-02-01 10:26:00 -08:00
Sean Chittenden 504d16fdb8 Merge branch 'master' into f-gopsutil 2017-02-01 08:44:30 -08:00
Sean Chittenden 18760e1fb5
Reintroduce the necessary vendor bits for per-node IDs
* `shirou/gopsutil`
* `shirou/w32`
2017-02-01 08:36:24 -08:00
James Phillips 91f3555dd8 Revert "Adds gopsutil in the loop when trying to make the node ID." 2017-01-31 19:13:49 -08:00
James Phillips 9d27dadedb
Adds gopsutil to vendored deps. 2017-01-31 08:51:25 -08:00