Commit Graph

83 Commits

Author SHA1 Message Date
Paul Bellamy
fbe567187a Merge pull request #1014 from weaveworks/977-docker-event-crash
Handle closing of docker events channel gracefully
2016-02-24 17:38:30 +00:00
Alfonso Acosta
2982166e03 Handle closing of docker events channel gracefully 2016-02-23 16:35:58 +00:00
Paul Bellamy
d2bf204181 Merge pull request #960 from weaveworks/no-ips-for-no-network
Don't show blank IPs metadata row for containers with no IP
2016-02-19 17:39:01 +00:00
Paul Bellamy
5535f5e738 Review Feedback 2016-02-19 17:04:00 +00:00
Alfonso Acosta
49f6568138 Place buffer infront of the docker stats decoder 2016-02-19 14:06:47 +00:00
Paul Bellamy
38653c4f7a Merge pull request #969 from weaveworks/759-term-env-var
set TERM=xterm on execs to work around docker issue 9299
2016-02-19 11:08:18 +00:00
Paul Bellamy
e49d1a721c set TERM=xterm on execs to work around docker issue 9299 2016-02-18 11:50:11 +00:00
Paul Bellamy
df856d78dc set container IPs to host IPs for containers with --net=host 2016-02-17 16:42:52 +00:00
Paul Bellamy
092342c0ff don't show blank ips metadata row for containers with no IP 2016-02-17 16:21:37 +00:00
Alfonso Acosta
0d917b2d8b Use github.com/ugorji/go/codec/ for wiring messages
* New encoding format:
  * Msgpack reports between probe<->app (smaller representation, faster to
    encode/decode).
  * Still use JSON between app<->UI (try to avoid making javascript deal with
    mspack).

  The app still suports publishing reports in both gob and JSON, not braking
  backwards compatibility.

* Use compile-time generated marshallers/unmarshallers for higher performance. In
  order to be able to skip code-generation for certain types, I included
  https://github.com/2opremio/go-1/tree/master/codec/codecgen instead of
  upstream until https://github.com/ugorji/go/pull/139 is merged.

* Encode/decode intermediate types using github.com/ugorji/go/codec.Selfer
  for higher performance and reducing garbage collection (no temporary buffers).
2016-02-16 06:31:31 +00:00
Alfonso Acosta
3d94082b07 Add debug logging 2016-02-05 16:58:40 +00:00
Tom Wilkie
638c5676cb Add container uptime and restart count to details panel. 2016-01-29 14:31:40 -08:00
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
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
Tom Wilkie
ffa955a21b Split and move xfer package. 2016-01-06 14:01:39 +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
1ef6006c55 Make tests pass. 2015-12-17 11:18:57 +00:00
Tom Wilkie
662b792781 Make it compile again. 2015-12-16 15:24:53 +00:00
Tom Wilkie
e09774ba5a Prototype to trace incoming and outgoing connections from containers. 2015-12-16 15:21:34 +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
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
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
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
Tom Wilkie
c610bf0ea1 Review feedback. 2015-11-11 11:42:28 +00:00
Tom Wilkie
47ef1e02b3 Shortcut app -> UI ws push for certain reports. 2015-11-10 13:46:57 +00:00
Tom Wilkie
92b24793f1 Push mini-reports when container's state changes. 2015-11-10 13:46:57 +00:00
Tom Wilkie
5e2c165fd8 Review feedback 2015-11-09 11:38:15 +00:00
Tom Wilkie
43d0ce986f Add 'latest' CRDT; use it to store container state.
Also use same technique to merge the controls, returning the latest
set of controls instead of the union.
2015-11-06 18:26:38 +00:00
Tom Wilkie
8f957c4f13 Add docker lifecycle controls, containers in states other that running, and a filter for those containers.
Also add integration test for container controls.
2015-11-06 17:39:54 +00:00
Tom Wilkie
244e2f4b4a gofmt + build 2015-10-27 14:48:43 +00:00
Tom Wilkie
6e9ad995b0 Use Node.Sets for Docker/Weave IPs 2015-10-27 14:12:35 +00:00
Tom Wilkie
cd97708af0 Review feedback 2015-10-21 10:04:27 +00:00
Tom Wilkie
811bde4d4a Include host scope for contianer joins based on IP. 2015-10-20 14:50:40 +00:00
Tom Wilkie
eaf52f4769 Review feedback 2015-10-10 07:47:34 +00:00
Tom Wilkie
de6742db11 Add containers by hostname view. 2015-10-09 10:52:12 +00:00
Tom Wilkie
d3aa975eb9 In containers view, show short lived connections to/from the internet by including port mappings in the join. 2015-10-01 16:31:38 +00:00
Peter Bourgon
36b743fe1f probe, app: reliable shutdown
- Restructure main funcs for clean defer-stack-unwinds
- Fix Docker container to handle signals properly
- Introduce runsvinit for container init process
- Integration test
2015-09-29 11:45:12 +02:00
Tom Wilkie
92b5b639dd Extend docker module testing. 2015-09-24 05:30:40 +00:00
Tom Wilkie
792e274745 Audit uses to Topology.Nodes, use AddNode where appropriate. 2015-09-23 07:36:51 +00:00
Tom Wilkie
7d6b5a540e Revert "Merge pull request #450 from weaveworks/scope-284"
This reverts commit 46345e3bdb, reversing
changes made to bf3e9a1601.

Conflicts:
	probe/process/walker_darwin.go
2015-09-15 03:14:39 +00:00
Alvaro Saurin
2f9f54688f Keep a cache of open files, reducing the number of open/close cycles in the /proc dir 2015-09-14 10:59:23 +02:00