152 Commits

Author SHA1 Message Date
Alfonso Acosta
b33c516758 Review feedback+test 2016-02-26 12:58:07 +00:00
Alfonso Acosta
a559a23dba Distinguish between reporting probes and controlling probes 2016-02-26 01:46:18 +00:00
Paul Bellamy
6cef1b10ca adding direction to connections from conntrack
* Remove report.EdgeMetadata.MaxConnCountTCP, as we don't display it anywhere
* Remove hostname metadata from local end of connection. We should be using the hostnodeid
2016-02-23 14:17:45 +00:00
Alfonso Acosta
6ac176a492 Remove github.com/2opremio/go-1/codec
* Bump github.com/ugorji/go/codec, to get fixes which make
  github.com/2opremio/go-1/codec unnecessary

* Remove github.com/2opremio/go-1/codec

* Remove type embeddings to avoid the problem explained at
  https://github.com/ugorji/go/issues/141#issuecomment-185450157
2016-02-18 12:47:06 +00:00
Alfonso Acosta
9c368c4e84 Implement Selfers for all render types
To workaround https://github.com/ugorji/go/issues/141
2016-02-16 23:52:32 +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
Paul Bellamy
852b8c0d5e adding test for EdgeMetadata.DeepEqual 2016-02-02 15:28:41 +00:00
Paul Bellamy
e12b54b8ce valid zero-value for report.Sets 2016-02-02 15:28:41 +00:00
Tom Wilkie
fc67ff10e2 Merge pull request #890 from weaveworks/refactor-deepequal
refactoring deepequal to satisfy linter
2016-02-01 06:30:38 -08:00
Tom Wilkie
638c5676cb Add container uptime and restart count to details panel. 2016-01-29 14:31:40 -08:00
Paul Bellamy
00afc203fd refactoring deepequal to satisfy linter 2016-01-27 16:16:22 +00:00
Paul Bellamy
1cdedcd3a7 Review feedback 2016-01-27 11:10:51 +00:00
Paul Bellamy
66790f4436 use immutability for the NodeSet 2016-01-27 11:10:51 +00:00
Tom Wilkie
41d48224aa Fix tests 2016-01-25 13:46:28 -08:00
Tom Wilkie
b8daa02488 Memoise & cache the result of renderers, so we don't recalculate views multiple times. 2016-01-25 13:31:10 -08:00
Tom Wilkie
7a70a076b8 Make counter zero value useable. 2016-01-25 12:52:19 -08:00
Paul Bellamy
b809f94272 make zero value of LatestMap valid 2016-01-25 17:33:24 +00:00
Tom Wilkie
d1c0fcec2d Review feedback. 2016-01-25 08:39:42 -08:00
Paul Bellamy
d44f9cbf77 fixing panic on EdgeMetadatas deserialization by making valid zero value 2016-01-25 15:51:14 +00:00
Paul Bellamy
5751db2a5a Always merge into the larger ps.Map
Because they are commutative and immutable, we can do this!
2016-01-25 15:25:01 +00:00
Tom Wilkie
728572cb51 Lint 2016-01-24 14:06:44 -08:00
Tom Wilkie
e125fb5e88 Add tests for counters 2016-01-24 14:04:08 -08:00
Tom Wilkie
f2df789503 Add tests for latest map. 2016-01-24 13:55:48 -08:00
Tom Wilkie
f071067289 Extend testing for EdgeMetadatas. 2016-01-24 09:50:08 -08:00
Tom Wilkie
bc3f946810 Make NodeMetadatas immutable. 2016-01-23 13:02:16 -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
3d32d10e2d fixing up some performance issues in NodeSet 2016-01-19 16:31:08 +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
caff695f96 Gather per-process CPU and memory metrics. 2015-12-16 14:38:21 +00:00
Tom Wilkie
e1585e7ac1 Merge pull request #711 from weaveworks/576-host-metrics
Add host memory and CPU usage metrics
2015-12-04 14:38:48 +00:00
Tom Wilkie
4a475466f6 Add host memory and CPU usage metrics 2015-12-04 13:57:32 +00:00
Tom Wilkie
490f650755 Introduce intermediate type for on-the-wire controls encoding. 2015-12-04 12:43:04 +00:00
Tom Wilkie
d747eebcb7 Omit controls field from json if emtpy. 2015-12-04 10:25:56 +00:00
Paul Bellamy
5dcd53e24c fix bug in metrics first/last calculation if second arg was zero 2015-11-12 17:06:40 +00:00
Paul Bellamy
9176699941 omit metric first/last timestamps if they are zero 2015-11-12 17:06:40 +00:00
Paul Bellamy
8f63d7be7f Metrics plumbing for reports.
- base load graph x-axis on data, not a hardcoded window
- format memory dynamically to scale
- add some tests for the immutability of metrics
- use ps.List for Sample storage, so it is immutable. Have to implement custom marshalling
- adding tests for report.Metrics
- check the ordering of the json samples
- Make the nil value for Metrics valid.
- Sort samples from oldest to newest on the wire.
2015-11-11 17:16:13 +00:00
Tom Wilkie
47ef1e02b3 Shortcut app -> UI ws push for certain reports. 2015-11-10 13:46:57 +00:00
Tom Wilkie
a89c0b9b88 Make an empty StringSet nil. 2015-11-09 16:25:49 +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
76d34330a9 Add Control plumbing. 2015-11-06 17:39:48 +00:00
Tom Wilkie
bdf39aeaab Don't mutate the input array for MakeStringSet 2015-10-29 12:23:38 +00:00
Tom Wilkie
6e9ad995b0 Use Node.Sets for Docker/Weave IPs 2015-10-27 14:12:35 +00:00
Tom Wilkie
6913431138 Make IDList an alias for StringSet 2015-10-27 14:12:34 +00:00
Tom Wilkie
5a0e23b3ea Some additional methods for using Sets. 2015-10-27 14:12:34 +00:00
Peter Bourgon
c68516ec22 report: add StringSet (port of IDList, effectively) 2015-10-27 14:12:34 +00:00
Tom Wilkie
cd97708af0 Review feedback 2015-10-21 10:04:27 +00:00
Paul Bellamy
6ad182a144 Merge pull request #441 from weaveworks/kubernetes
Basic Kubernetes Integration
2015-10-06 14:49:55 +01:00