Commit Graph

173 Commits

Author SHA1 Message Date
Tom Wilkie
cb52acbc46 Add pod delete control
- Push shortcut reports when pods are created/deleted
- Buffer upto 2 reports instead of dropping them
2016-04-28 14:48:05 +01:00
Paul Bellamy
64450a4830 Merge pull request #1371 from weaveworks/1219-grouped-node-counts-2
Fixing grouped node count for filtered children nodes
2016-04-28 13:30:15 +01:00
Paul Bellamy
3d3aed2bb3 Fixing grouped node count for filtered children nodes
Squash of:

* We have to keep all the container hostnames until the end so we can
  count how many we've filtered

* Adding tests for ContainerHostnameRenderer and PodServiceRenderer with
  filters

* Because we filter on image name we need the image name before
  filtering

* Alternative approach to passing decorators.

* Refactor out some of the decorator capture

* Don't memoise decorated calls to Render

* Fixing filtered counts on containers topology

  Tricky, because we need the filters to be silent sometimes (when they're
  in the middle), but not when they're at the top, so we take the "top"
  filter's stats. However, this means we have to compose all
  user-specified filters into a single Filter layer, so we can get all
  stats.

  There are no more Silent filters, as all filters are silent (unless they
  are at the top).

  Additionally, I clarified some of the filters as their usage/terminology
  was inconsistent and confused. Now Filter(IsFoo, ...) *keeps* only nodes
  where IsFoo is true.
2016-04-28 12:23:43 +01:00
Tom Wilkie
b05ef74552 Report hostname and version in probe struct, and version in host node. 2016-04-26 09:25:15 +01:00
Paul Bellamy
e7ebb83e23 Prune is only used in tests, so let's move it there 2016-04-22 14:14:30 +01:00
Tom Wilkie
8b06f6c0d8 Add rank field to controls. 2016-04-21 18:05:48 +01:00
Tom Wilkie
99204e1ff7 Add k8s pod log control (#1298)
* Remove individually vendored k8s.io/kubernetes/pkg/<foo>

* Vendor the whole of vendor/k8s.io/kubernetes/pkg

* Add k8s pod log control

* Tag pods with host id and include them in the host topology as children.

* adding a basic test for kubernetes.Reporter.GetLogs
2016-04-21 13:48:50 +01:00
Paul Bellamy
4bd3832219 move counting sublabel definition to the topologies 2016-04-20 12:17:46 +01:00
Paul Bellamy
4ad1ae80df move shapes determination to the topology 2016-04-20 12:17:46 +01:00
Tom Wilkie
9eda27822c Show k8s labels and container env vars in the details panel. (#1342)
* Show k8s labels and container env vars in the details panel.

* Add show more bar to the env vars and labels

* React key was in the wrong place; empty tables render section labels.
2016-04-20 08:18:03 +01:00
Paul Bellamy
1edeb8d190 Removing report.Node.WithID (#1315)
* removing usage of report.Node.WithID

* report.Topology.AddNode can use the node's ID field
2016-04-19 16:48:03 +01:00
Paul Bellamy
f211d48cda Merge pull request #1126 from weaveworks/plugins
Plugins
2016-04-12 18:03:26 +01:00
Paul Bellamy
7632e0b3c5 Adding support for plugins, with basic example of iowait, and ebpf
Squash of:
* Include plugins in the report
* show plugin list in the UI
* moving metric and metadata templates into the probe reports
* update js for prime -> priority
* added retry to plugin handshake
* added iowait plugin
* review feedback
* plugin documentation
2016-04-12 17:22:14 +01:00
Tom Wilkie
281ba58845 Add /api/probes endpoint 2016-04-12 17:17:18 +01:00
Paul Bellamy
fe6203fd3f Review Feedback
Squash of:
- including children in topologies_test.go
- report.Node.Prune should prune children also
- rewrote ShortLivedInternetConnections test to express its intent
- adding tests for detail Summary rendering
2016-03-29 14:13:20 +01:00
Paul Bellamy
2c6b6e6707 Refactoring rendering to remove RenderableNode
Squash of:
- use detailed.Summaries to render topology nodes
- ban merging nodes of different topologies (they should be mapped)
- need to prune parents when mapping node types
- render container images by id if they have no name
- remove separate render ids and prune parents in NewDerived*
- don't render metrics/metadata for groups of nodes
- fixing up tests
- removing pending unit tests (for mapping.go, for now)
- updating experimental dir for RenderableNode removal
2016-03-29 14:13:03 +01:00
Paul Bellamy
30b81a581b adding tests for report.Counters.String 2016-03-29 14:00:12 +01:00
Tom Wilkie
7e2e4c9c45 Fix spelling mistakes in the codebase. 2016-03-23 10:51:27 +00:00
Tom Wilkie
e7c5fc7016 Remove address topology 2016-03-08 13:23:30 +00:00
Tom Wilkie
f154e7a483 Add connection tables to details panel 2016-03-03 16:17:55 +00:00
Tom Wilkie
28a0dd9d76 Fix for new go1.6 lint rules. 2016-03-01 13:01:19 +00:00
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