Commit Graph

62 Commits

Author SHA1 Message Date
Mike Lang
316ae2947c Fiddle with k8s topology shapes again
Final list of shapes for controllers view, with rationale:
Heptagon for Deployment - same shape as Service, which typically have a corresponding Deployment
Triangle for CronJob - weird shape for weird thing
Pentagon for DaemonSet - because pentagons and daemon worship :P
Octagon for StatefulSet - last shape left
2017-07-19 11:16:59 -07:00
Mike Lang
9fb6c46467 Add report topologies for Stateful Sets, Cron Jobs 2017-07-18 11:35:50 -07:00
jpellizzari
4f341cb1d2 Add new node shapes for k8s combined view
While we're there, adopt a consistent ordering for all places that shapes are listed
Order is least sides to most sides, with circle before polygons, and complex shapes (currently just Cloud) after.

On shape choices for topologies:
* Since the k8s logo is a heptagon, we want pods to be heptagons.
* Since triangle is 'a bit weird', we put it on the least-important type, replica sets.
* Pentagons look a little weirder than octogons (it's the lack of symmetry) so we put octogons on the most common (deployments)
2017-06-27 10:19:04 -07:00
Mike Lang
c60731b043 Add report topology for daemonsets 2017-05-19 15:00:01 -07:00
Mike Lang
6bf34ab95d Add SwarmService topology containing data on Docker Swarm services 2017-04-14 12:51:28 -07:00
Mike Lang
7ba3555fe6 report: Reintroduce explicit topology listing for Walk functions
To avoid needing to allocate a new map every time, since we're already
hitting GC-related perf issues
2017-04-10 14:30:53 -07:00
Mike Lang
eb0298b9d5 report: Refactor various methods to avoid explicitly listing topologies
By reducing the number of times we refer to every topology by name line by line,
we make it easier to add new topologies, reduce the risk of bugs where a topology is not listed,
and reduce the risk of the repeated lines getting out of sync with each other.

We introduce two new methods to assist this:
	WalkPairedTopologies, a modified WalkTopologies that gives the called function
		the same topology from two reports. This is used, for example, to implement Copy and Merge.
	TopologyMap, which returns a map of all topologies by name. This is then used to implement all other methods.

This leaves only 4 instances of listing topologies:
	In the consts at the top of the file, to give it a name
	In the struct itself
	In the constructor, where we need to set per-topology settings
	In TopologyMap
2017-03-30 16:38:34 -07:00
Jonathan Lange
e8085b01b6 Use 'common' library 2016-12-07 11:22:38 +00:00
Alfonso Acosta
78775bbdb8 Initial rendering for ECS
(not working yet)
2016-11-29 07:18:05 -08:00
Mike Lang
db23e64e9c Add new topologies ECSTask and ECSService 2016-11-29 07:17:16 -08:00
Alfonso Acosta
c10c58459b Fix spelling mistakes 2016-08-18 17:48:45 +00:00
Krzesimir Nowak
0ecb908c22 Ensure backward compatilibity in report's node controls
The new probe will convert all node's LatestControls to Controls, so
the old app can consume them. Also, the new app will convert all
node's Controls to LatestControl, so it can consume the reports from
old probes.
2016-08-12 17:15:43 +02:00
Matthias Radestock
c4fa72110c don't Copy() self on Merge()
Merge() is always returning a copy, so there is no need to Copy()
struct fields first before calling Merge() on them.

This reduces GC pressure (#1010) and helps overall app performance
(#1457).
2016-07-28 22:21:06 +01:00
Alfonso Acosta
6175880725 Review feedback 2016-07-05 10:47:57 +00:00
Paul Bellamy
16a5c738d9 Deployment and ReplicaSet views for k8s 2016-05-09 09:03:57 +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
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
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
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
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
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
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
Paul Bellamy
e30c9dc264 use constants for the topology names in Parents/metadata/metrics 2016-01-19 16:47:48 +01:00
Tom Wilkie
47ef1e02b3 Shortcut app -> UI ws push for certain reports. 2015-11-10 13:46:57 +00:00
Tom Wilkie
76d34330a9 Add Control plumbing. 2015-11-06 17:39:48 +00:00
Paul Bellamy
be1d1d52d0 Basic Kubernetes integration
* Added helper for installing scope on gcloud
* Added topologies Pods and Pods-by-Service
* Uses k8s.io/kubernetes/pkg/client/cache for the client
* Filter kube-system nodes by default
* Only show the k8s topologies if we've received a non-empty k8s report
2015-10-06 12:55:51 +01:00
Tom Wilkie
21675f3000 Remove LeafMap - have a generic function which converts a Topology to a RenderableNodes. 2015-09-02 15:03:57 +00:00
Peter Bourgon
42be036428 report: always copy 2015-08-25 17:52:20 +01:00
Peter Bourgon
b138dda3b3 Move merge functions with their types 2015-08-25 13:31:25 +01:00
Peter Bourgon
0dafad763f Calculate rates in detailed nodes 2015-08-03 16:04:06 +02:00
Peter Bourgon
e1f7752a34 Split PacketCount to Egress and Ingress
Also, 1 packet may be counted in N topologies, so you can't rely on the
sum of all packet counts across topologies having any relation to the
sampling data.
2015-08-03 14:58:41 +02:00
Peter Bourgon
c7a06d2a43 Don't flat-embed sampling in the report
In the JSON representation, we want the Sampling data to be distinct.
2015-08-03 10:55:59 +02:00
Peter Bourgon
b9afa67ad6 gopacket-based traffic sniffing 2015-08-03 10:55:59 +02:00
Tom Wilkie
49dae07cca Make render module produce The Internet pseudo node. 2015-06-19 11:09:52 +00:00
Tom Wilkie
f32d2b5a5e Remove report squash logic. 2015-06-18 17:20:20 +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
16e2ccd2be Produce the container topology by way of the process topology. 2015-06-17 17:23:20 +00:00
Tom Wilkie
7f9eee3b08 Merge pull request #242 from tomwilkie/228-more-moves
Move RenderableNode and DetailedNode into render/
2015-06-16 18:36:31 +02:00
Tom Wilkie
2a4a33f30a Move RenderableNode and DetailedNode into render/ 2015-06-16 15:37:08 +00:00
Peter Bourgon
990d527664 Merge pull request #219 from weaveworks/weave-tagger
WeaveTagger and the Overlay topology
2015-06-16 16:56:12 +02:00
Peter Bourgon
e3c5b7f36d Add WeaveTagger
- report: add Overlay topology
- probe/tag: introduce WeaveTagger
2015-06-16 16:29:50 +02:00
Tom Wilkie
ae9ea5c97f Move mapping functions and main render function in render package. 2015-06-16 14:23:56 +00: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
Tom Wilkie
53456179e4 All merging of RenderableNodes, such that we can merge multiple topologies. 2015-06-11 17:11:10 +00:00