250 Commits

Author SHA1 Message Date
Tom Wilkie
68a3748f01 Don't allocate lots of docker.Stats structs, do some copying instead 2016-01-29 11:38:55 -08:00
Tom Wilkie
34447fd502 Close response body for docker stats calls. 2016-01-29 10:45:20 -08:00
Tom Wilkie
41d48224aa Fix tests 2016-01-25 13:46:28 -08:00
Tom Wilkie
6b56475766 Use ps.Map for Counters and Sets, remove Metadata in favour of Latest.
Also
- Add more complicated report.json for benchmark
- Break up report/topology.go
- Implement our own DeepEqual for ps.Map
2016-01-22 15:10:32 -08:00
Paul Bellamy
bf57aeb8d9 Rename the various metric keys so they don't accidentally overlap 2016-01-20 16:14:32 +00:00
Paul Bellamy
e30c9dc264 use constants for the topology names in Parents/metadata/metrics 2016-01-19 16:47:48 +01:00
Paul Bellamy
3cda328976 remove hostID from container image node ids 2016-01-19 16:47:48 +01:00
Paul Bellamy
56122dd0cc Details panel backend redesign
Megasquish:
  [app] remove unused edge endpoint
  [WIP] refactoring node details api endpoint
  [WIP] plumbing the children through the rendering process
  adding IDList.Remove and StringSet.Remove
  [WIP] working on adding parents to detailed node renderings
  WIP UI components with mock backend data for new details
  grouping children by type
  UI components for node details health and info
  metric formatters for details panel
  Column headers and links for details table
  [WIP] started on rendering node metadata and metrics in the detail view
  DetailedNode.LabelMajor -> DetailedNode.Label
  rendering decent labels for parents of detailed nodes
  render metrics onto the top-level detailed node
  removing dead code
  Links to relatives
  metrics have a Format not Unit
  Show more/less actions for tables and relatives
  adjusted metric formatter
  TopologyTagger should tag k8s topology nodes
  make renderablenode ids more consistent, e.g. container:abcd1234
  working on rendering correct summaries for each node
  adding report.Node.Rank, so that merging is independent of order
  rendering children and parents correctly
  output child renderableNode ids, so we can link to them
  add group field to metrics, so they can be grouped
  Refactored details health items to prepare for grouping
  add metrics to processNodeSummaries
  hide summary section if there is no data for it
  fixing up tests
  moving detailed node rendering into a separate package
  Node ID/Topology are fields not metadata
    - This way I think we don't have to care about Metadata being non-commutative.
    - ID and topology are still non-commutative, as I'm not sure how to sanely
  merge them, but it's possible we don't care.
  host memory usage is a filesize, not a percent
  working on fixing some tests
  adding children to hosts detail panel
    - Had to redo how parents are calculated, so that children wouldn't interfere with it
    - have to have the host at the end because it is non-commutative
  only render links for linkable children (i.e. not unconnected processes)
  resolving TODOs
  fixing up lint errors
  make nil a valid value for render.Children so tests are cleaner
  working on backend tests
  make client handle missing metrics property
  Stop rendering container image nodes with process summaries/parents
  fix parent link to container images
  Calculate parents as a set on report.Node (except k8s)
  refactoring detailed.NodeSummary stuff
  removing RenderableNode.Summary*, we already track it on report.Node
  working on tests
  add Columns field to NodeSummaryGroup
  fixing up render/topologies_test
  fix children links to container images
  get children of hosts rendering right
  working on host renderer tests
  Change container report.Node.ID to a1b2c3;<container>
  The id should be globally unique, so we don't need the host id.
    This lets the kubernetes probe return a container node with the pod id,
    which will get merged into the real containers with other reports. The
    catch is that the kubernetes api doesn't tell us which hostname the
    container is running on, so we can't populate the old-style node ids.
  change terminology of system pods and services
  Fix kubernetes services with no selector
  Fixes handling of kubernetes service, which has no pods
  fix parent links for pods/services
  refactor detailed metadata to include sets and latest data
  fixing up host rendering tests
  fleshing out tests for node metadata and metrics
  don't render container pseudo-nodes as processes
  Update test for id format change.
2016-01-19 16:39:37 +01:00
Paul Bellamy
a84da6cf1c nil selector for a k8s service means nothing, not everything 2016-01-18 10:27:56 +00:00
Alfonso Acosta
fa43df2de7 k8s: Log errors when contacting the API server 2016-01-12 15:31:32 +00:00
Alfonso Acosta
e0e7644acd k8s: Use service account token when no api server url is provided 2016-01-12 15:31:19 +00:00
Tom Wilkie
ffa955a21b Split and move xfer package. 2016-01-06 14:01:39 +00:00
Tom Wilkie
e9e152b9a3 Use argv[0] for process name to be more like ps. 2016-01-06 11:55:34 +00:00
Tom Wilkie
d12cc9a5bd Don't report network stats (we don't show them in UI anyway) 2016-01-04 16:48:19 +00:00
Tom Wilkie
2faa58aa41 Merge pull request #776 from weaveworks/tracer
Tracer!
2015-12-17 13:55:10 +00:00
Tom Wilkie
1ef6006c55 Make tests pass. 2015-12-17 11:18:57 +00:00
Tom Wilkie
13a82bc9a8 Make it lint and compile after rebase. 2015-12-16 15:30:53 +00:00
Tom Wilkie
662b792781 Make it compile again. 2015-12-16 15:24:53 +00:00
Tom Wilkie
3e4b3ad0eb Trace all processes in a container. 2015-12-16 15:21:34 +00:00
Tom Wilkie
e09774ba5a Prototype to trace incoming and outgoing connections from containers. 2015-12-16 15:21:34 +00:00
Tom Wilkie
8efa0d147b Review feedback 2015-12-16 14:38:22 +00:00
Tom Wilkie
21a16771c9 Make host report memory usage in bytes. 2015-12-16 14:38:21 +00:00
Tom Wilkie
caff695f96 Gather per-process CPU and memory metrics. 2015-12-16 14:38:21 +00:00
Tom Wilkie
bc8f86a75f Merge pull request #751 from weaveworks/testing
Add some more testing to procspy
2015-12-15 17:56:41 +00:00
Tom Wilkie
550f21511a We need to read /proc/PID/net/tcp6 to see the pids for the server end of local connections. 2015-12-15 13:38:30 +00:00
Tom Wilkie
8024827f76 Add some more testing to procspy 2015-12-11 13:01:59 +00:00
Paul Bellamy
1b39659d10 Merge pull request #742 from weaveworks/284-profiling
Various CPU usage gains from profiling
2015-12-11 12:05:24 +00:00
Tom Wilkie
d8c759c455 Merge pull request #650 from weaveworks/365-pipes
Pipes
2015-12-11 12:01:36 +00:00
Tom Wilkie
a2862baf33 Don't list fds if there are not connections in the net namespace. 2015-12-11 10:27:27 +00:00
Tom Wilkie
cc90c6c95d Don't read tcp6 file (we don't deal with ipv6 anywhere else). 2015-12-11 10:27:26 +00:00
Tom Wilkie
cde5920f9a Cache the contents of some files in /proc
Also cache contents of /proc/foo/stat, but only for 10s.
2015-12-11 10:27:15 +00:00
Tom Wilkie
6259307491 Don't use a global variable to store the pipe client. 2015-12-10 15:44:25 +00:00
Tom Wilkie
1fcd079563 Use Readdirnames to reduce number of stats we're doing. 2015-12-10 14:43:40 +00:00
Tom Wilkie
cc5935a89d Review feedback 2015-12-10 14:10:36 +00:00
Tom Wilkie
ed6c4088fa Fix up tests. 2015-12-10 14:00:43 +00:00
Tom Wilkie
e15fe2b747 Use caching proc walker in procspy. 2015-12-10 14:00:42 +00:00
Tom Wilkie
3a344f12ea Backend review feedback 2015-12-10 12:53:31 +00:00
Tom Wilkie
b77cd3f300 Add pipe controls for Docker attach & exec. 2015-12-10 12:51:17 +00:00
Tom Wilkie
ac9c011475 Pipe plumbing
- Add store of pipes in the app
- Add pipe type, handling impedance mismatch, used in app and probe.
- App <-> Probe pipes have their own websockets.
- Add pipe websocket endpoint in app.
- Pipe IDs are strings, lose the request/response IDs, and give the json encoder lowercase field names.
- Add simple golang ws client, for testing.
- Pipe lifecycle plumbing.
- Ref count and timeout both ends of pipes in the app
- Deal with POST /api/pipe/:pid?_method=delete
- Add end-to-end unit test for pipes.
- Add test for timing out pipes.
- Update go-docker client to tomwilkie/go-dockerclient
- Backend work for non-raw ttys
- Close pipes when they close themselves in the probe
- Ensure all http connections are done before returning from client.Stop()
2015-12-10 12:51:17 +00:00
Tom Wilkie
5cadafcda4 Extend testing of procspy. 2015-12-09 14:47:00 +00:00
Tom Wilkie
b94751ac10 Move procspy out of vendor into probe/endpoint. 2015-12-09 11:06:04 +00:00
David
72cb96b75a Merge pull request #707 from weaveworks/282-hostname-in-api
Show hostname of app you are connected to
2015-12-04 16:38:34 +01:00
Tom Wilkie
f1d225c836 Add hostname to /api 2015-12-04 15:33:12 +01:00
Tom Wilkie
4a475466f6 Add host memory and CPU usage metrics 2015-12-04 13:57:32 +00:00
Tom Wilkie
ab3927617d Update tests 2015-11-16 10:44:30 +00:00
Tom Wilkie
78c86372c8 Maintain container-by-pid index correctly. 2015-11-16 10:44:30 +00:00
Tom Wilkie
23be0d9aa9 Don't tag processes with stopped container ids. 2015-11-16 10:44:30 +00:00
Tom Wilkie
3e1be5cbfe Move calls to weave ps to a background goroutine. 2015-11-12 17:02:28 +00:00
Tom Wilkie
9142325d54 Instruments probe runtime to find slow reporter. 2015-11-12 17:01:52 +00:00
Paul Bellamy
a074278cca Add metrics for docker container cpu and memory, and host load. 2015-11-11 17:24:19 +00:00