Commit Graph

420 Commits

Author SHA1 Message Date
Bryan Boreham
de3c34ddc6 performance(probe): thin out many connections between the same point
The app will only show one line, regardless of how many connections we
have, so reduce the number to save bandwidth and rendering time.

We filter by choosing a modulus, e.g. send every connection that is a
multiple of 3, or 9, and so on. We avoid multiples of 2 because port
numbers are often a multiple of 2 or 4 for bit-encoding reasons.
2020-01-13 08:53:47 +00:00
Bryan Boreham
b9c71f30d6 Update comments based on review feedback 2019-10-17 10:38:58 +00:00
Bryan Boreham
6ccbd2d0cf Fix accidental rename of DNS to 'nodes'
In commit 951629af29 the `DNS` field was accidentally renamed in
serialised data to `nodes`.  Put it back, and also add a field to fix
up data coming from a probe with that fault.
2019-10-14 15:08:39 +00:00
Bryan Boreham
23d8a418e1 performance: network namespace ID is a 32-bit quantity
This shrinks some data-structures slightly.

Citation: https://github.com/torvalds/linux/blob/6f0d349d922b/include/linux/ns_common.h#L10
2019-10-04 13:11:30 +00:00
Bryan Boreham
7b4fa141d3 fix: add back check on missing namespace in MakeEndpointNodeIDB() 2019-09-27 15:08:31 +00:00
Bryan Boreham
2941850a75 performance: in connection tracker, hold IP addresses in binary rather than strings
This is more compact, and saves effort converting to and from the string format.
2019-09-25 20:15:05 +00:00
Akash Srivastava
ca420b07aa Merge pull request #3687 from weaveworks/refactor-reading
Refactor report reading
2019-09-24 12:26:01 +05:30
Bryan Boreham
13af359bcf refactor: eliminate report.ReadBinary() in favour of MakeFromBinary()
The signature of MakeFromFile changed to return a pointer for
consistency.
2019-09-23 10:01:43 +00:00
Bryan Boreham
f675c87826 Merge pull request #3680 from weaveworks/remove-old-control-code
refactor: remove old unnecessary controls code
2019-09-19 09:32:19 +01:00
Bryan Boreham
6ee9738581 Merge pull request #3686 from weaveworks/analyze-reports
feature(app): Add a debugging summary function, exposed via http
2019-09-18 15:54:50 +01:00
Bryan Boreham
57918b0ac5 formatting 2019-09-18 14:43:49 +00:00
Bryan Boreham
a7d3cbedb5 lint: make lint happy 2019-09-18 14:42:47 +00:00
Bryan Boreham
da030d1618 test: add TestReportUnMerge()
Testing the new delta-report internals
2019-09-18 08:01:13 +00:00
Bryan Boreham
951629af29 chore: allow Report.DNS field to be nil
Primarily to help when writing tests; may give a tiny performance benefit.
2019-09-18 08:00:28 +00:00
Bryan Boreham
b6d5594f9f perf(probe): publish delta reports to reduce data size
Similar to video compression which uses key-frames and differences
between them: every N publishes we send a full report, but inbetween
we only send what has changed.

Fairly simple approach in the probe - hold on to the last full report,
and for the deltas remove anything that would be merged in from the
full report.

On the receiving side in the app it already merges a set of reports
together to produce the final output for rendering, so provided N is
smaller than that set we don't need to do anything different.

Deltas don't need to represent nodes that have disappeared - an
earlier full node will have that node so it would be merged into the
final output anyway.
2019-09-18 08:00:28 +00:00
Bryan Boreham
a811afdba1 Merge pull request #3678 from weaveworks/nodes-omitempty
perf(probe): add 'omitempty' tag to Topology.Nodes
2019-09-17 16:25:52 +01:00
Bryan Boreham
5ffb563051 refactor: eliminate ReadBytes() function that is only called once 2019-09-17 10:55:44 +00:00
Bryan Boreham
2bbd4a3f0d refactor: remove MakeFromBytes() function which is almost the same as ReadBinary() 2019-09-17 10:55:44 +00:00
Bryan Boreham
3f8ba95bea refactor: pass msgpack flag into ReadBinary
instead of a codec.Handle.  This is a cleaner dependency.
2019-09-17 10:55:44 +00:00
Bryan Boreham
11e76f1740 feature(app): Add a debugging summary function, exposed via http
URL is /admin/summary
2019-09-17 10:48:23 +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
4c52889316 Add 'omitempty' tag to Topology.Nodes
So we save space writing out empty topologies.

Need to fix up `app_client_internal_test.go` to use Scope's
`test/reflect` package that understands empty==nil, so now it doesn't
need a previous workaround.

Remove a similar workaround in `probe_internal_test.go` that isn't
necessary since it's already using that package.
2019-09-15 15:50:08 +00:00
Bryan Boreham
b9b7d03354 refactor: remove old unnecessary controls code
Scope stopped using NodeControls in bd43c34852, and since
1cfc8f4581 WireMetrics is identical to Metrics so unnecessary.
2019-09-14 22:11:28 +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
6c4b01dcd9 Change shape of K8s Job to dottedtriangle
Signed-off-by: Satyam Zode <satyamzode@gmail.com>
2019-05-20 16:55:48 +05:30
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
cdc33855d4 Merge pull request #3589 from openebs/feature/kubectl-describe
Add describe control to all k8s resources
2019-05-17 13:37:15 +02:00
Bryan Boreham
711aa66bd5 Add OpenTracing span for report.ReadBinary()
So we can see the timing and size in Jaeger.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2019-05-10 15:34:53 +00:00
Akash Srivastava
029bbbcec8 Add describe control to all k8s resources
This commit will add a new control i.e. Describe
which will describe a k8s resource similar to kubectl describe.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>
2019-04-01 11:22:12 +05:30
Filip Barl
e66a3e08dc Add a confirmation dialog for deleting a pod. 2019-02-26 11:57:00 +01:00
Filip Barl
b9e692c3b3 Lock the time in tests to make them pass. 2019-02-25 11:35:33 +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
Bryan Boreham
ee0ce7b087 Merge pull request #3384 from weaveworks/drop-big-topologies
In multitenant app, drop all nodes for big topologies
2018-11-01 17:21:55 +00:00
Akash Srivastava
4701c61969 Add clone support for volume snapshot
- Add control on volume snapshot to take clone
- Add control on volume snapshot to delete it

Signed-off-by: Akash Srivastava <akash.srivastava@openebs.io>
2018-10-16 01:04:44 +05:30
Akash Srivastava
8692a4d57d Add control on PVC to take volume snapshot
Signed-off-by: Akash Srivastava <akash.srivastava@openebs.io>
2018-10-16 01:04:44 +05:30
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
05b350850f Drop topologies which are way too big 2018-10-11 17:20:16 +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
d624337dc1 Merge pull request #3272 from weaveworks/remove-old-controls
Remove old 'Controls' field which was replaced two years ago
2018-07-31 17:59:33 +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
Bryan Boreham
74883b89b7 Merge branch 'release-1.9' 2018-07-25 12:37:32 +00:00
Bryan Boreham
ba656a37f7 Fix WithLatests() de-duplication
The fixup() method was modifying a copy of its input, so you could get
duplicate keys in the output. Change it to return the new slice.

Thankfully this is rare: in most cases WithLatests() is called with
fields that are not duplicates of existing ones.
2018-07-25 11:58:08 +00:00
Marc Carré
d46c2266ce Change Sirupsen/logrus to sirupsen/logrus
```
$ git grep -l Sirupsen | grep -v vendor | xargs sed -i '' 's:github.com/Sirupsen/logrus:github.com/sirupsen/logrus:g'
$ gofmt -s -w app
$ gofmt -s -w common
$ gofmt -s -w probe
$ gofmt -s -w prog
$ gofmt -s -w tools
```
2018-07-23 20:10:14 +02:00