Commit Graph

699 Commits

Author SHA1 Message Date
Bryan Boreham
5264b61951 improvement: stop rendering if Context is cancelled
Typically this means the http caller has closed the connection,
so no point responding to them.

Also check at the point we send a response back, and log to OpenTracing.
2020-06-11 11:13:38 +00:00
Bryan Boreham
f66e91e37f Merge pull request #3748 from weaveworks/move-counters-to-latest
Move Counters into Latest
2020-03-11 21:14:01 +00:00
Bryan Boreham
ffa90719b0 Change containers-by-hostname renderer from Map to Renderer
It was relying on the previous behaviour of Merge() adding up counters.
2020-03-10 13:16:10 +00:00
Bryan Boreham
62d4fbd94e Add a second container to fixture to check counts 2020-03-10 12:30:05 +00:00
Bryan Boreham
c03aeb5d43 Move Counters into Latest
The only place Counters are used is in rendering, for the number of
nodes under a topology, so the overhead of holding a unique data
structure in every Node is unwarranted.

Counters are not set in the probe, so we don't need any
backwards-compatibility in report decoding. Similarly they are not set
until after all nodes are merged, so we don't need that logic.
2020-03-10 12:30:05 +00:00
Bryan Boreham
1ce1ecad7c In unit tests, check counters 2020-03-10 11:30:25 +00:00
Bryan Boreham
a47cf0a2aa Remove copying Merge() on Report
It was only used in a few places, and all of those were better off
using the Unsafe variant.
2020-03-06 15:03:43 +00:00
Bryan Boreham
b07bfb294b Merge pull request #3747 from weaveworks/simplify-renderers
Simplify some renderers
2020-02-25 11:07:55 +00:00
Bryan Boreham
8aca4d6452 Remove MapToEmpty() - no longer used 2020-02-18 12:14:18 +00:00
Bryan Boreham
574c76ac40 Merge pull request #3709 from weaveworks/report-endpoint-subset
Report a subset of connections from/to the same endpoint
2020-01-27 22:42:47 +00:00
Bryan Boreham
f732eed3a5 refactor: remove unused parameterisation of containerWithImageNameRenderer 2020-01-27 21:30:52 +00:00
Bryan Boreham
875fdba352 rendering: simplify ContainerHostnameRenderer
The second half of the render added all the same nodes, except for
those with no Docker image information, so we could show a figure for
those filtered out on that basis.

This just isn't worth the effort.
2020-01-27 21:28:23 +00:00
Bryan Boreham
bbce9e3d69 refactor: simplify ContainerImageRenderer
Crunch a Map and Reduce into a single Renderer that has the same function.
2020-01-27 21:27:49 +00:00
Bryan Boreham
53297eb07c Merge pull request #3743 from weaveworks/more-pause
kubernetes: detect more 'pause' containers
2020-01-23 14:43:06 +00:00
Bryan Boreham
92b8a489e7 kubernetes: detect more 'pause' containers
Dockershim has added a label `io.kubernetes.docker.type` for at least
four years, where the pause container is of type `podsandbox`.  This
should be more reliable than trying to keep up with everyone's name
for the pause container.
2020-01-15 10:26:10 +00:00
Bryan Boreham
4c9cf138d6 ui: include skipped connection count in rendering 2020-01-13 08:53:47 +00:00
Bryan Boreham
85d2f6309c performance: Send active controls as a single string per node
Instead of a whole extra data structure which is quite expensive to
marshal and unmarshal, just send the information in a string.  No
clever merging strategy is required - the states are all set in one
place per node type.
2019-11-26 11:29:42 +00:00
Bryan Boreham
ad34c5fd26 refactor: camlistore lru package moved location 2019-09-23 10:43:17 +00:00
Bryan Boreham
871751873b Stop render package depending on probe
This dependency makes it harder to see the structure of the program,
and sometimes complicates compilation.

Mostly just changing the source of strings that are already exported
from the report package.  A few new strings have to be moved there,
plus the function `IsPauseImageName()`.
2019-09-15 17:03:04 +00:00
Bryan Boreham
4210bc76f4 Refactor: stop depending on probe code to render image names 2019-09-13 11:41:16 +00:00
Bryan Boreham
15467d7310 Move host-related names out of probe code
Reduce the dependency on low-level libraries
2019-09-13 11:41:09 +00:00
Satyam Zode
36361d6b7d Add Kubernetes Job support to Weave Scope
This covers:
- Implementation of the job resource in probe
- Reporter changes for the job
- Add Describe Control to the job
- Pass job object to the kube controller renderer

ToDo:
- Need to decide the shape for the Job.

Signed-off-by: Satyam Zode <satyamzode@gmail.com>
2019-05-19 02:36:45 +05:30
Filip Barl
e66a3e08dc Add a confirmation dialog for deleting a pod. 2019-02-26 11:57:00 +01:00
Filip Barl
353ab75ddb Added some tests for censoring. 2019-02-23 19:30:42 +01:00
Filip Barl
c5022bd2bb Code cleanup. 2019-02-22 14:56:44 +01:00
Filip Barl
2c56ec2bf1 Made censoring work properly. 2019-02-21 16:46:17 +01:00
Filip Barl
0f1b7e5972 Prepare to filter node summaries post-render. 2019-02-21 16:18:24 +01:00
Filip Barl
3c5320ef09 Polished the code and applied censoring to other API endpoints. 2019-02-21 14:34:05 +01:00
Filip Barl
97fdcdc525 Option to censor raw reports by command line args and env vars. 2019-02-15 17:31:08 +01:00
Akash Srivastava
60a1c66430 Fix one pod to multiple PVC connection
Read all the PVC source from a pod spec
and add adjacency between the pod and its PVCs.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>
2019-01-13 20:10:51 +05:30
Roland Schilter
f8412c3204 Rename :orgId to :instanceId in metrics graph url
- Renames placeholders `:orgId` to `:instanceId` in
  `--app.metrics-graph`
- Adjusts frontend client to use the provided instanceId by its host
  application (Weave Cloud)
2018-12-17 17:57:00 -08:00
Akash Srivastava
00168819c5 Check Pod and PVC namespace while rendering
- Name of the PVC can be same in different namespaces, in this
scenario an application pod is connected to multiple PVC.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>
2018-12-08 19:34:30 +05:30
Bryan Boreham
5c9b0f179d Don't look for blank volume claims
If a pod has no VolumeClaim set, just move on to the next pod.
Eliminates small waste of time.
2018-11-26 11:53:06 +00:00
Bryan Boreham
94dbee2124 Move "hideous hack" for Kubernetes service network from probe to app
This avoids side-effects from reporting Kubernetes from a
cluster-level probe, and removes a lie from the probe data.

Rather than do the work every time the probe sends a report, we do it
every time the app renders endpoints, which should be once per merged
report set.
2018-11-19 14:54:20 +00:00
Simon Howe
d3a36cf873 Load up fa5 instead of 4
- Switch to fa5 icons and tweak font-sizes a bit
2018-11-13 12:51:31 +01:00
Simon
e78f8a8de4 Revert "Upgrade to Font Awesome 5" 2018-11-12 11:22:19 +01:00
Simon Howe
2cc58f5b00 Switch to fa5 icons and tweak font-sizes a bit 2018-11-09 14:59:53 +01:00
Bryan Boreham
3be8cf71dd Add more Opentracing detail to the app (#3383)
* Pass Go context down to Renderers

This is useful for cancellation or tracing.

* Add tracing spans to app

Also log things like number of nodes in Map, total number of reports.
2018-10-26 11:21:33 +05:30
Bryan Boreham
8cccbb695b Merge pull request #3274 from weaveworks/kubernetes-tagger
Enable Kubernetes objects to be reported just once in a cluster
2018-10-19 16:48:37 +01:00
Akash Srivastava
81a682893f Add kubernetes volume snapshot support
- Add a new client in probe/kubernetes/client.go
  which will be used to fetch details of Snapshot CRD
- Visualize VolumeSnapshot and VolumeSnapshotData
- Add adjacency between PV and VolumeSnapshot
- Add adjacency between VolumeSnapshot and VolumeSnapshotData
- Add snapshot filter to hide and show snapshots

Signed-off-by: Akash Srivastava <akash.srivastava@openebs.io>
2018-10-16 01:04:44 +05:30
Akash Srivastava
ea9ad0a1e6 Update topology to include tag
Tag can be used to specify the sub-shape for the given node.

Signed-off-by: Akash Srivastava <akash.srivastava@openebs.io>
2018-10-16 01:04:42 +05:30
Bryan Boreham
0c394e689a Fix pod host propagation 2018-10-12 13:47:39 +00:00
Bryan Boreham
1279a02b7d Stop tagging pods with host ID
So they can be reported centrally, find the pod host ID from the child
containers.
2018-10-11 17:54:29 +00:00
Bryan Boreham
c1b1ee2a1b Merge pull request #3266 from weaveworks/slim-metrics
Remove First and Last data members from Metrics structs
2018-08-24 17:39:21 +01:00
guyfedwards
a38b6213d1 rename storagesheet to sheet
the client now expects a node shape of `sheet` not `storagesheet`
update report.go to reflect this.

fixes #3322
2018-08-22 13:07:45 +01:00
Bryan Boreham
aa40f944d3 Merge pull request #3260 from openebs/storage-driver
Add storage driver name to Persistent Volume
2018-07-31 17:58:38 +01:00
Akash Srivastava
715747bda4 Add storage driver name to Persistent Volume
Every PV is backed by storage driver. This will show
storage driver in the PV metadata.

Signed-off-by: Akash Srivastava <akash.srivastava@openebs.io>
2018-07-20 11:41:06 +05:30
Bryan Boreham
9efd6afd7c Merge pull request #3268 from weaveworks/optimise-withlatests
Optimise Node.WithLatests()
2018-07-18 14:04:35 +01:00
Bryan Boreham
cc79b7631e Propagate multiple container values at once
This is more efficient than repeatedly inserting a single value.
2018-07-18 12:52:27 +00:00
Bryan Boreham
0d2409c72c Add method to add a single string into Sets
This avoids creating and discarding a StringSet just to pass the parameter
2018-07-17 13:51:46 +00:00