Commit Graph

626 Commits

Author SHA1 Message Date
Satyam Zode
2f69973de6 Add adjacencies for kubernetes storage components
- Kubernetes storage components such as PV and PVC are connected based on two
parameters Persistent volume claim name and Persistent Volume name.
- PVC contains the volume name which is, PV name itself. Hence, we can
show edge for PVC and PV.
- This will bring higher level visibility for kubernetes storage components.

Signed-off-by: Satyam Zode <satyam.zode@openebs.io>
2018-06-07 17:04:56 +05:30
Satyam Zode
23210a6a77 Add Kubernetes volumes support in Weave Scope
This will

- Add Kubernetes volume resources such as PV, PVC.
- Add shapes for Kubernetes PV and PVC
- Add `Cylinder` shape for PV and `Dotted Cylinder` shape for PVC.

Signed-off-by: Satyam Zode <satyam.zode@openebs.io>
2018-06-07 17:01:29 +05:30
Matthias Radestock
feae4f4fcf don't show Failed pods
these are not alive, and Scope generally only shows the living, not
the dead.
2018-04-02 11:03:25 +01:00
Ilya Dmitrichenko
e024ab2d1f Add (cloud.)weave.works to the list of known services 2018-02-22 17:19:55 +00:00
Bryan Boreham
b5cdcb9a42 Move DNS name mapping from endpoint to report 2018-02-20 16:14:21 +00:00
Roberto Bruggemann
95a490da3a Service metrics: fix naming assumption
The link returned by service metrics is now built by looking up the deployment name in `report.Report` instead of assuming the service and the deployment have the same name.
2018-02-08 14:13:50 +00:00
Roberto Bruggemann
23f8d40355 Replace service cpu/mem link to 'Monitor'
The previous link to 'Monitor' contained a recording rule metric, and since not all Weave Clound instances have recording rules, the link would redirect to a 'Monitor' page without data points.
The recording rule metric has been substituted with the underlying query.
2018-02-07 13:11:01 +00:00
Matthias Radestock
f2bdbbde22 tiny tidy-up / refactor 2018-01-10 10:37:29 +00:00
Matthias Radestock
fd5fa7a962 refactor: extract common code in endpoint mapping
This isn't quite as neat as we'd want to make it, because two of the
three call sites still require a closure, but it's still an
improvement.

Note that every instance of MapEndpoints only ever maps to one
topology, which, furthermore, is a core report topology. Hence we can
just parameterise MapEndpoints with that topology, and then the map
functions can return just the node ids.
2018-01-07 08:20:06 +00:00
Matthias Radestock
dd41956d60 refactor: remove support for non-linkable connections
Connections have always been linkable, so this is dead code.
2018-01-02 10:20:01 +00:00
Matthias Radestock
9754bf2385 refactor: remove support for non-linkable nodes
since they are now always linkable.
2018-01-02 10:19:22 +00:00
Matthias Radestock
3582c221fe processes are now always linkable 2018-01-02 09:47:15 +00:00
Matthias Radestock
74c72945ef optimisation: no need to prune adjacencies in filterUnconnected
since, by definition, unconnected nodes do not appear in adjacencies
of other nodes
2018-01-02 06:41:19 +00:00
Matthias Radestock
915535e0a2 Merge pull request #3007 from weaveworks/less-derived-node-metadata
remove unnecessary metadata propagation
2017-12-29 15:10:48 +00:00
Matthias Radestock
c8ea7ba49e refactor: simplify joinResults.add*
After dropping extra metadata in the rest of this PR, our usage of
joinResults.add* only ever ends creating minimal nodes, from just an
id and topology. Hence joinResults.add* can be invoked with simply an
id and topology instead of a generic node creation function.
2017-12-29 14:40:18 +00:00
Matthias Radestock
a7b6bb09a1 refactor: lift closures and extract constants 2017-12-29 14:40:18 +00:00
Matthias Radestock
2d6badba79 cope with processes that have no HostNodeID metadata
Some process nodes may not have a HostNodeID metadata, e.g. when an
endpoint references a pid that we know nothing about. When mapping
processes to containers, we therefore shouldn't rely on
HostNodeID. Instead we can obtain the hostID from the process node ID.

This has been broken for a while, possibly forever.
2017-12-29 14:40:16 +00:00
Matthias Radestock
ff03d7d86e Merge pull request #3008 from weaveworks/propagate-single-metrics-renderer
refactor: make PropagateSingleMetrics a renderer
2017-12-29 14:18:09 +00:00
Matthias Radestock
ecf1cf43f6 Merge pull request #3005 from weaveworks/move-rendercontext
refactor: move RenderContext where it belongs
2017-12-29 14:16:59 +00:00
Matthias Radestock
4984da6f04 fly-by optimisation
save a few allocations
2017-12-28 20:04:01 +00:00
Matthias Radestock
30bef738c0 refactor: make PropagateSingleMetrics a renderer
instead of a Map, since it's not really a map as it just updates the
given node.

This is more efficient and also matches what we do in similar
situations elsewhere, e.g. in ContainerWithImageNameRenderer and
ProcessWithContainerNameRenderer.
2017-12-28 20:04:01 +00:00
Matthias Radestock
4c1d5640ae don't propagate IsConnectedMark in MapProcess2Container
...when creating Uncontained pseudo nodes. IsConnectedMark only
affects summarisation of genuine process nodes.
2017-12-28 12:56:52 +00:00
Matthias Radestock
5d06f90f10 don't propagate HostNodeID in MapProcess2Container
...when creating Uncontained pseudo nodes. Summarisation of
Uncontained/Umanaged only looks at the ID, which includes the
HostNodeID.

We adjust the promotion of Uncontained to Unmanaged, to operate on the
ID instead of (re)extracting the hostID from the HostNodeID
metadata. With that, nothing looks at the HostNodeID metadata of
Uncontained/Unmanaged nodes.
2017-12-28 12:54:21 +00:00
Matthias Radestock
7ce160d492 don't propagate ImageID in MapContainer2ContainerImage
The ImageID is already the id of the node we are creation, and that's
what summarisation renders in the event we fail to join this node with
a node from the ContainerImage topology that has more metadata.
Nothing is looking at the ImageID metadata field.
2017-12-28 12:50:11 +00:00
Matthias Radestock
9034296209 don't propagate ImageID in MapContainerImage2Name
This was building a set of all the image ids represented by the same
unversioned image. Well, it was doing that until I broke it with a
silly mistake in #1739 - instead of extracting the imageID from the
original node ID, it's extracting it from the updated ID, which is the
unversioned image. Even if it was working though, it's pointless
since nothing is looking at that info.
2017-12-28 12:50:11 +00:00
Matthias Radestock
a46b9c9c24 don't propagate ContainerHostname in MapContainer2Hostname
The container hostname is already the id of the node, and that's what
summarisation renders. Nothing looks at the docker.ContainerHostname
metadata of nodes in the ContainerHostname group topology.
2017-12-28 12:50:11 +00:00
Matthias Radestock
bbd6c5fe47 don't propagate HostNodeID in endpoints2Hosts
The HostNodeID is already the id of host nodes (as the name suggests),
and that's what summarisation renders. Nothing looks at the HostNodeID
metadata of host nodes.
2017-12-28 12:50:11 +00:00
Matthias Radestock
a3ba3a5a55 don't propagate Name in processes2Names
The name is already the id of the node, and that's what summarisation
renders. Nothing looks at process.Name.
2017-12-28 12:50:11 +00:00
Matthias Radestock
d7e90303a6 don't propagate PID in endpoints2Processes
The 'create' function passed to addChild is only ever invoked when we
cannot find a matching process in the process topology. In these cases
the host and pid will be _all_ the info we are ever going to have,
both of which are incorporated in the id. Node summarisation renders
that as best it can; adding the PID as metadata does not make a
difference but for a line with that info in the detail panel, which
adds nothing since the PID is already included in the label.
2017-12-28 12:50:11 +00:00
Matthias Radestock
27c2f3a5d2 refactor: use propagateLatest
instead of the equivalent long-hand code.
2017-12-28 12:50:11 +00:00
Matthias Radestock
e69c8209fb remove redundant operation
We were setting the very same k/v that we just looked up.
2017-12-28 12:50:11 +00:00
Matthias Radestock
a8ad7f8898 refactor: simplify summarisation of internet nodes 2017-12-28 12:48:13 +00:00
Matthias Radestock
3d1a44aae0 extract label from id when summarising un[contained,managed]
I missed this in #2998.
2017-12-28 12:48:12 +00:00
Matthias Radestock
286453b9a9 refactor: move RenderContext where it belongs
It shouldn't be in 'report' because that is shared between the probe
and the app, and RenderContext, as the name suggests, is only needed
in the app.
2017-12-27 16:22:52 +00:00
Matthias Radestock
0b4512bd9b refactor: clarify and comment on summarisation logic 2017-12-27 13:54:30 +00:00
Matthias Radestock
705c6d159d sensible defaults/fallback for label and shape 2017-12-27 13:54:30 +00:00
Matthias Radestock
4206760021 refactor: lift some code out of inner loop 2017-12-27 13:54:30 +00:00
Matthias Radestock
7c5e9339bb render parents which we cannot resolve
The id and topology are enough to get some basic info for rendering.

This isn't just a fall-through for exceptional cases.
ContainerwithImageNameRenderer produces parent references using the
image name without version as the ID, and containers-by-image topology
uses that for grouping. By contrast, the container-image topology in
the report is keyed on docker image IDs.
2017-12-27 13:54:30 +00:00
Matthias Radestock
b88a2e4509 render sensible labels for parent nodes with little/no metadata
We eliminate the custom parent renderer, which was a very partial
implementation MakeBasicNodeSummary.

We also ensure that parents are always rendered in the same, sensible
order. Previously the order was an alphabetic sort of the parent
topology IDs. Now lower level topologies come before higher level
topologies.
2017-12-27 13:54:30 +00:00
Matthias Radestock
8cf65ea8b6 use BasicNodeSummary for rendering links in connection table
instead of the full NodeSummary
2017-12-27 13:54:30 +00:00
Matthias Radestock
0237b13916 refactor: extract BasicNodeSummary
This is sufficient for rendering links to nodes, and is cheaper to
compute that the full NodeSummary.
2017-12-27 13:54:30 +00:00
Matthias Radestock
367f2db003 always render metric urls
Fixes an omission.
2017-12-27 13:54:29 +00:00
Matthias Radestock
d1149dc29e add a basic test for rendering nodes with little/no metadata 2017-12-27 13:54:29 +00:00
Matthias Radestock
a9b8ced0a7 refactor: drop superfluous return value
Now that summary renderers always produce something, they no longer
need to indicate whether they did.
2017-12-27 13:54:29 +00:00
Matthias Radestock
da11655659 render sensible labels for group nodes with little/no metadata
The node ID of group nodes is in fact the same value as we get from
looking up the metadata key contained in the group topology id. So
just use that since a) we always have it, and b) we save a LatestMap
lookup.
2017-12-27 13:54:29 +00:00
Matthias Radestock
15881cd7fd render sensible labels for weave peer nodes with little/no metadata
We fall back to using the peerName as the label, which we always have.
2017-12-27 13:54:29 +00:00
Matthias Radestock
5e099640eb render sensible labels for swarm service nodes with little/no metadata
We fall back to using the service ID as the label.
2017-12-27 13:54:29 +00:00
Matthias Radestock
9aed0792ac render sensible labels for ecs task nodes with little/no metadata
We fall back to using the ARN as the label.
2017-12-27 13:54:29 +00:00
Matthias Radestock
289226707d render sensible labels for k8s nodes with little/no metadata
We fall back to using the object id as the label.
2017-12-27 13:54:29 +00:00
Matthias Radestock
f192e79346 render sensible labels for host nodes with little/no metadata
The node id, which we always have, actually contains the hostname.
2017-12-27 13:54:29 +00:00