32 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
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
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
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
Peter Bourgon
e3c5b7f36d Add WeaveTagger
- report: add Overlay topology
- probe/tag: introduce WeaveTagger
2015-06-16 16:29:50 +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
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
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
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
8f6b9895ac Fix errcheck errors in probe 2015-05-26 16:49:47 +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
7b07c0abc3 Reduce default spy and publish intervals
Closes #81
2015-05-22 11:39:09 +02:00
Tom Wilkie
8c66c061c6 A docker process mapper 2015-05-20 11:21:54 +00:00
Peter Bourgon
11f85cda1b Remove needless probe -version 2015-05-19 12:22:02 +02:00
Peter Bourgon
0e19360215 Redo import statements 2015-05-19 10:02:59 +00:00
Tom Wilkie
d50e827fd5 Intial commit 2015-05-19 10:02:02 +00:00