57 Commits

Author SHA1 Message Date
Peter Bourgon
d9a37df783 WeaveTagger becomes Weave, both Reporter & Tagger 2015-06-30 12:05:32 +02:00
Peter Bourgon
f4b3930a19 Probe re-org
- tag/weave* -> package overlay
- tag/origin_host* -> package host
- tag/topology* -> package main
2015-06-30 10:18:00 +02:00
Peter Bourgon
69785493ba Merge pull request #289 from weaveworks/fix-host-on-darwin
Fix host on darwin
2015-06-29 18:32:18 +02:00
Peter Bourgon
36212cea3e Fix probe/host for Darwin
Also, add explicit GOOS=darwin target for circle.
2015-06-29 18:27:22 +02:00
Peter Bourgon
f8be412dbb Remove forgotten half-comment line 2015-06-29 15:08:39 +02:00
Tom Wilkie
b9e968ff43 Cache the walk of the process tree, reusing it in docker tagger and process reporter.
Update the cache every spy tick.

This change make CPU usage of scope on my box go from ~40% to ~17%.
2015-06-29 11:16:38 +00:00
Tom Wilkie
eb250ecb7c Trim whitespace from process names
This causes detailed node lookups for the grouped-by-process-name view to fail.  Also, add a test for process walker trimmming whitespace, and a test the process-by-name view gives the right result.
2015-06-24 14:01:17 +00:00
Tom Wilkie
ead58a3483 Make scope compile on Mac again. 2015-06-23 15:41:12 +00:00
Tom Wilkie
626320d7f4 Move probe host topology code into its own module
- add tests
- use constants for NodeMetadata keys
- add host uptime and kernel version
2015-06-23 13:31:22 +00:00
Tom Wilkie
a4ddd0094f Duplicate endpoints in the endpoint topology to account for NAT mapping.
Also, move spy.go into probe/endpoint and make it adhere to the Reporter interface.
2015-06-23 10:33:06 +00:00
Tom Wilkie
560cf66454 Refactor PIDTree
- Move pidtree to its own module and disaggregate it into tree, walker and reporter.
- Extend testing for probe/process
- Extend process metadata; add command line & # threads.
2015-06-23 09:40:35 +00:00
Tom Wilkie
82a7f93e17 Treat addresses on the docker bridge as local. 2015-06-22 11:24:47 +00:00
Tom Wilkie
c793e86d5b Expose some more information on containers. 2015-06-19 13:02:07 +00:00
Tom Wilkie
49dae07cca Make render module produce The Internet pseudo node. 2015-06-19 11:09:52 +00:00
Tom Wilkie
314af5ca89 Improve probe docker code quality & test coverage.
- Move docker probe code into it's own module
- Put PIDTree behind and interface for mocking
- Disaggregate dockerTagger into a registry, tagger and reporter
- Similarly disaggregate tests
- Add mocks for docker container and registry
- Add test for docker events & stats
2015-06-18 17:09:33 +00:00
Tom Wilkie
25ca0c0eb7 Add ContainerImage topology and use it to build the Container By Image graph.
This makes container image details show the containers (and processes) correctly.

Also:
- introduces a 'test' package, moved Diff function there.
- adds some tests for this new rendered view.
2015-06-18 09:16:20 +00:00
Tom Wilkie
f30539601d Restore docker tagging to the endpoint topology until we have the docker images topology. 2015-06-17 17:29:37 +00:00
Tom Wilkie
ee9ac591fd DockerTagger should tag the Process topology now. 2015-06-17 17:23:31 +00:00
Tom Wilkie
786a1588ea Don't emit process name and domain from procspy. 2015-06-17 17:23:29 +00:00
Tom Wilkie
16e2ccd2be Produce the container topology by way of the process topology. 2015-06-17 17:23:20 +00:00
Peter Bourgon
e3c5b7f36d Add WeaveTagger
- report: add Overlay topology
- probe/tag: introduce WeaveTagger
2015-06-16 16:29:50 +02:00
Tom Wilkie
e84848278a Merge pull request #234 from tomwilkie/114-docker-stats
Add docker stats to the Container Topology
2015-06-16 10:53:03 +02:00
Peter Bourgon
20eb64968b probe: origin host tagger: use report.Topologies method 2015-06-15 14:58:27 +02:00
Peter Bourgon
c65aecd9e1 Fix node scoping rules
We only want to scope (i.e. prefix with hostID) those addresses that are
deemed loopback, to disambiguate them. Otherwise, we want to leave
addresses in unscoped form, so they can be matched, and links between
communicating nodes properly made.

So, we make the isLoopback check in MakeAddressID, and omit hostID if
the address isn't loopback. So far so good.

But this breaks topology rendering, as we were relying on extracting
hostID from adjacency node IDs, to populate origin hosts in the rendered
node output. So we need another way to get origin host from an arbitrary
node.

A survey revealed no reliable way to get that information from IDs in
their new form. However, we have access to node metadata, so this
changeset introduces the OriginHostTagger, which tags each node with its
origin host, via the foreign-key semantics we'll use going forward.
2015-06-15 14:36:48 +02:00
Peter Bourgon
8dc44012f0 probe: don't spam logs on Darwin 2015-06-12 12:56:59 +02:00
Tom Wilkie
a2adaa2566 Add docker stats to the Container Topology 2015-06-11 18:42:35 +00:00
Tom Wilkie
53456179e4 All merging of RenderableNodes, such that we can merge multiple topologies. 2015-06-11 17:11:10 +00:00
Tom Wilkie
ae84861e00 Now we have merged topologies, we don't need to put so much data on the endpoint topology, or render so much info. 2015-06-11 16:57:24 +00:00
Tom Wilkie
ff11022862 Add Containers topology populated by the Docker tagger. 2015-06-10 16:01:15 +00:00
Peter Bourgon
7df63d1bc4 Decouple PIDTree from DockerTagger
PIDTree is created in each spy tick, regardless if Docker Tagger is
used.
2015-06-10 17:49:50 +02:00
Peter Bourgon
d435e36834 Add and populate Process topology
Also, add comm value (name) to process node metadata.
2015-06-10 17:27:07 +02:00
Tom Wilkie
719f933c21 Refactor MakeAdjacencyID & ParseAdjacencyID; add ParseNodeID (which separates scope and the rest of node id) 2015-06-10 09:21:45 +00:00
Tom Wilkie
5be7235da2 GOOS might be 'linux', but never 'Linux'! 2015-06-09 17:51:05 +00:00
Peter Bourgon
b8170313e4 This commit from #182 got lost somehow 2015-06-09 18:08:02 +02:00
Peter Bourgon
d438261742 HostMetadata becomes Host Topology
- All HostMetadata information becomes NodeMetadata
- Significant change to mechanics, but same net effect
- LocalNets becomes "local_networks", space-separated list of CIDRs
- Load becomes simple single string
- Use MakeHostNodeID for indexing into Host topology
- (That changes the app /origin/{id} handler; will be removed later)
2015-06-09 15:38:08 +02:00
Peter Bourgon
1e0b83eb6d Merge branch report-fields (#190) 2015-06-09 14:25:54 +02:00
Peter Bourgon
f8230d2a00 Merge pull request #185 from weaveworks/id-constructors
ID constructors
2015-06-08 18:06:21 +02:00
Peter Bourgon
4832ee76f3 Add the various ID constructors
- Use constructors instead of ScopeDelim everywhere
- Use constructors instead of IDDelim everywhere
- IDDelim is renamed EdgeDelim, for clarity
- Partial import of the new test fixtures, to be completed later
2015-06-08 17:53:01 +02:00
Tom Wilkie
76d6deb263 Expose containers from DockerTagger for tracer. 2015-06-08 13:28:27 +00:00
Peter Bourgon
d486d1074a Refactor process mappers to taggers
- Reduce tagger interface to operate on reports
- Remove cgroup tagger
2015-06-08 15:04:40 +02:00
Peter Bourgon
1278dca1da probe: only allow Docker on Linux
Fixes #173
2015-06-05 17:06:06 +02:00
Peter Bourgon
754eac3152 Rename NewReport -> MakeReport. 2015-06-05 13:55:40 +00:00
Tom Wilkie
9fccb2126a Gracefully shutdown goroutines in the probe. 2015-06-03 14:41:43 +00:00
Tom Wilkie
121c86a52d Use Docker events API instead of polling Docker daemon.
Unfortunately we still have to poll pidtree and docker images, but I think we can get rid of the docker image polling as we only care about images on running containers.
2015-06-02 16:41:32 +00:00
Peter Bourgon
92adbf1c40 Merge pull request #107 from weaveworks/errcheck
Address non-Close errors identified by errcheck
2015-05-26 17:32:04 +02:00
Peter Bourgon
8f6b9895ac Fix errcheck errors in probe 2015-05-26 16:49:47 +02:00
Peter Bourgon
bf49e12094 Add Containers topology 2015-05-26 16:37:44 +02:00
Tom Wilkie
18c38a6bf4 Expose docker image id and name 2015-05-26 10:15:23 +00:00
Tom Wilkie
b536d1161b Set git version variable at build time. 2015-05-22 13:34:23 +00:00
Peter Bourgon
2d5f58e8ed Expand details pane 2015-05-22 13:20:00 +02:00